@fluentui-react-native/tester 0.101.6 → 0.101.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/CHANGELOG.json +193 -1
  2. package/CHANGELOG.md +45 -2
  3. package/lib/E2E/FocusZone/pages/FocusZonePageObject.d.ts +37 -0
  4. package/lib/E2E/FocusZone/pages/FocusZonePageObject.d.ts.map +1 -1
  5. package/lib/E2E/FocusZone/pages/FocusZonePageObject.js +197 -4
  6. package/lib/E2E/FocusZone/pages/FocusZonePageObject.js.map +1 -1
  7. package/lib/E2E/FocusZone/specs/FocusZone.spec.win.js +457 -0
  8. package/lib/E2E/FocusZone/specs/FocusZone.spec.win.js.map +1 -1
  9. package/lib/E2E/common/BasePage.d.ts +2 -0
  10. package/lib/E2E/common/BasePage.d.ts.map +1 -1
  11. package/lib/E2E/common/BasePage.js +34 -14
  12. package/lib/E2E/common/BasePage.js.map +1 -1
  13. package/lib/E2E/common/consts.d.ts +15 -0
  14. package/lib/E2E/common/consts.d.ts.map +1 -1
  15. package/lib/TestComponents/Common/MenuPicker.d.ts +2 -0
  16. package/lib/TestComponents/Common/MenuPicker.d.ts.map +1 -1
  17. package/lib/TestComponents/Common/MenuPicker.js +2 -2
  18. package/lib/TestComponents/Common/MenuPicker.js.map +1 -1
  19. package/lib/TestComponents/FocusZone/FocusZoneE2ETest.d.ts +20 -0
  20. package/lib/TestComponents/FocusZone/FocusZoneE2ETest.d.ts.map +1 -0
  21. package/lib/TestComponents/FocusZone/FocusZoneE2ETest.js +51 -0
  22. package/lib/TestComponents/FocusZone/FocusZoneE2ETest.js.map +1 -0
  23. package/lib/TestComponents/FocusZone/FocusZoneTest.d.ts.map +1 -1
  24. package/lib/TestComponents/FocusZone/FocusZoneTest.js +26 -70
  25. package/lib/TestComponents/FocusZone/FocusZoneTest.js.map +1 -1
  26. package/lib/TestComponents/FocusZone/consts.d.ts +10 -0
  27. package/lib/TestComponents/FocusZone/consts.d.ts.map +1 -1
  28. package/lib/TestComponents/FocusZone/consts.js +11 -0
  29. package/lib/TestComponents/FocusZone/consts.js.map +1 -1
  30. package/lib/TestComponents/FocusZone/styles.d.ts +5 -0
  31. package/lib/TestComponents/FocusZone/styles.d.ts.map +1 -1
  32. package/lib/TestComponents/FocusZone/styles.js +5 -0
  33. package/lib/TestComponents/FocusZone/styles.js.map +1 -1
  34. package/lib-commonjs/E2E/FocusZone/pages/FocusZonePageObject.d.ts +37 -0
  35. package/lib-commonjs/E2E/FocusZone/pages/FocusZonePageObject.d.ts.map +1 -1
  36. package/lib-commonjs/E2E/FocusZone/pages/FocusZonePageObject.js +196 -3
  37. package/lib-commonjs/E2E/FocusZone/pages/FocusZonePageObject.js.map +1 -1
  38. package/lib-commonjs/E2E/FocusZone/specs/FocusZone.spec.win.js +457 -0
  39. package/lib-commonjs/E2E/FocusZone/specs/FocusZone.spec.win.js.map +1 -1
  40. package/lib-commonjs/E2E/common/BasePage.d.ts +2 -0
  41. package/lib-commonjs/E2E/common/BasePage.d.ts.map +1 -1
  42. package/lib-commonjs/E2E/common/BasePage.js +34 -14
  43. package/lib-commonjs/E2E/common/BasePage.js.map +1 -1
  44. package/lib-commonjs/E2E/common/consts.d.ts +15 -0
  45. package/lib-commonjs/E2E/common/consts.d.ts.map +1 -1
  46. package/lib-commonjs/TestComponents/Common/MenuPicker.d.ts +2 -0
  47. package/lib-commonjs/TestComponents/Common/MenuPicker.d.ts.map +1 -1
  48. package/lib-commonjs/TestComponents/Common/MenuPicker.js +2 -2
  49. package/lib-commonjs/TestComponents/Common/MenuPicker.js.map +1 -1
  50. package/lib-commonjs/TestComponents/FocusZone/FocusZoneE2ETest.d.ts +20 -0
  51. package/lib-commonjs/TestComponents/FocusZone/FocusZoneE2ETest.d.ts.map +1 -0
  52. package/lib-commonjs/TestComponents/FocusZone/FocusZoneE2ETest.js +57 -0
  53. package/lib-commonjs/TestComponents/FocusZone/FocusZoneE2ETest.js.map +1 -0
  54. package/lib-commonjs/TestComponents/FocusZone/FocusZoneTest.d.ts.map +1 -1
  55. package/lib-commonjs/TestComponents/FocusZone/FocusZoneTest.js +27 -71
  56. package/lib-commonjs/TestComponents/FocusZone/FocusZoneTest.js.map +1 -1
  57. package/lib-commonjs/TestComponents/FocusZone/consts.d.ts +10 -0
  58. package/lib-commonjs/TestComponents/FocusZone/consts.d.ts.map +1 -1
  59. package/lib-commonjs/TestComponents/FocusZone/consts.js +14 -1
  60. package/lib-commonjs/TestComponents/FocusZone/consts.js.map +1 -1
  61. package/lib-commonjs/TestComponents/FocusZone/styles.d.ts +5 -0
  62. package/lib-commonjs/TestComponents/FocusZone/styles.d.ts.map +1 -1
  63. package/lib-commonjs/TestComponents/FocusZone/styles.js +5 -0
  64. package/lib-commonjs/TestComponents/FocusZone/styles.js.map +1 -1
  65. package/package.json +29 -29
  66. package/src/E2E/FocusZone/pages/FocusZonePageObject.ts +135 -4
  67. package/src/E2E/FocusZone/specs/FocusZone.spec.win.ts +177 -2
  68. package/src/E2E/common/BasePage.ts +8 -3
  69. package/src/E2E/common/consts.ts +17 -0
  70. package/src/TestComponents/Common/MenuPicker.tsx +5 -2
  71. package/src/TestComponents/FocusZone/FocusZoneE2ETest.tsx +126 -0
  72. package/src/TestComponents/FocusZone/FocusZoneTest.tsx +40 -127
  73. package/src/TestComponents/FocusZone/consts.ts +17 -0
  74. package/src/TestComponents/FocusZone/styles.ts +5 -0
package/CHANGELOG.json CHANGED
@@ -2,7 +2,199 @@
2
2
  "name": "@fluentui-react-native/tester",
3
3
  "entries": [
4
4
  {
5
- "date": "Fri, 14 Oct 2022 19:09:04 GMT",
5
+ "date": "Mon, 17 Oct 2022 17:50:04 GMT",
6
+ "tag": "@fluentui-react-native/tester_v0.101.8",
7
+ "version": "0.101.8",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "beachball",
12
+ "package": "@fluentui-react-native/tester",
13
+ "comment": "Bump @fluentui-react-native/android-theme to v0.12.9",
14
+ "commit": "14bd4084276efd59f022ab5074441eca421c96d0"
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@fluentui-react-native/tester",
19
+ "comment": "Bump @fluentui-react-native/apple-theme to v0.16.3",
20
+ "commit": "14bd4084276efd59f022ab5074441eca421c96d0"
21
+ },
22
+ {
23
+ "author": "beachball",
24
+ "package": "@fluentui-react-native/tester",
25
+ "comment": "Bump @fluentui-react-native/avatar to v1.2.22",
26
+ "commit": "14bd4084276efd59f022ab5074441eca421c96d0"
27
+ },
28
+ {
29
+ "author": "beachball",
30
+ "package": "@fluentui-react-native/tester",
31
+ "comment": "Bump @fluentui-react-native/badge to v0.1.44",
32
+ "commit": "14bd4084276efd59f022ab5074441eca421c96d0"
33
+ },
34
+ {
35
+ "author": "beachball",
36
+ "package": "@fluentui-react-native/tester",
37
+ "comment": "Bump @fluentui-react-native/button to v0.25.12",
38
+ "commit": "14bd4084276efd59f022ab5074441eca421c96d0"
39
+ },
40
+ {
41
+ "author": "beachball",
42
+ "package": "@fluentui-react-native/tester",
43
+ "comment": "Bump @fluentui-react-native/default-theme to v0.16.5",
44
+ "commit": "14bd4084276efd59f022ab5074441eca421c96d0"
45
+ },
46
+ {
47
+ "author": "beachball",
48
+ "package": "@fluentui-react-native/tester",
49
+ "comment": "Bump @fluentui-react-native/dropdown to v0.4.14",
50
+ "commit": "14bd4084276efd59f022ab5074441eca421c96d0"
51
+ },
52
+ {
53
+ "author": "beachball",
54
+ "package": "@fluentui-react-native/tester",
55
+ "comment": "Bump @fluentui-react-native/experimental-activity-indicator to v0.6.12",
56
+ "commit": "14bd4084276efd59f022ab5074441eca421c96d0"
57
+ },
58
+ {
59
+ "author": "beachball",
60
+ "package": "@fluentui-react-native/tester",
61
+ "comment": "Bump @fluentui-react-native/experimental-avatar to v0.16.16",
62
+ "commit": "14bd4084276efd59f022ab5074441eca421c96d0"
63
+ },
64
+ {
65
+ "author": "beachball",
66
+ "package": "@fluentui-react-native/tester",
67
+ "comment": "Bump @fluentui-react-native/experimental-button to v0.16.39",
68
+ "commit": "14bd4084276efd59f022ab5074441eca421c96d0"
69
+ },
70
+ {
71
+ "author": "beachball",
72
+ "package": "@fluentui-react-native/tester",
73
+ "comment": "Bump @fluentui-react-native/experimental-checkbox to v0.12.29",
74
+ "commit": "14bd4084276efd59f022ab5074441eca421c96d0"
75
+ },
76
+ {
77
+ "author": "beachball",
78
+ "package": "@fluentui-react-native/tester",
79
+ "comment": "Bump @fluentui-react-native/experimental-expander to v0.4.14",
80
+ "commit": "14bd4084276efd59f022ab5074441eca421c96d0"
81
+ },
82
+ {
83
+ "author": "beachball",
84
+ "package": "@fluentui-react-native/tester",
85
+ "comment": "Bump @fluentui-react-native/experimental-menu-button to v0.4.45",
86
+ "commit": "14bd4084276efd59f022ab5074441eca421c96d0"
87
+ },
88
+ {
89
+ "author": "beachball",
90
+ "package": "@fluentui-react-native/tester",
91
+ "comment": "Bump @fluentui-react-native/experimental-radio-group to v0.6.3",
92
+ "commit": "14bd4084276efd59f022ab5074441eca421c96d0"
93
+ },
94
+ {
95
+ "author": "beachball",
96
+ "package": "@fluentui-react-native/tester",
97
+ "comment": "Bump @fluentui-react-native/experimental-shadow to v0.2.30",
98
+ "commit": "14bd4084276efd59f022ab5074441eca421c96d0"
99
+ },
100
+ {
101
+ "author": "beachball",
102
+ "package": "@fluentui-react-native/tester",
103
+ "comment": "Bump @fluentui-react-native/experimental-shimmer to v0.7.13",
104
+ "commit": "14bd4084276efd59f022ab5074441eca421c96d0"
105
+ },
106
+ {
107
+ "author": "beachball",
108
+ "package": "@fluentui-react-native/tester",
109
+ "comment": "Bump @fluentui-react-native/experimental-tabs to v0.5.26",
110
+ "commit": "14bd4084276efd59f022ab5074441eca421c96d0"
111
+ },
112
+ {
113
+ "author": "beachball",
114
+ "package": "@fluentui-react-native/tester",
115
+ "comment": "Bump @fluentui-react-native/experimental-text to v0.11.14",
116
+ "commit": "14bd4084276efd59f022ab5074441eca421c96d0"
117
+ },
118
+ {
119
+ "author": "beachball",
120
+ "package": "@fluentui-react-native/tester",
121
+ "comment": "Bump @fluentui-react-native/framework to v0.8.12",
122
+ "commit": "14bd4084276efd59f022ab5074441eca421c96d0"
123
+ },
124
+ {
125
+ "author": "beachball",
126
+ "package": "@fluentui-react-native/tester",
127
+ "comment": "Bump @fluentui-react-native/icon to v0.13.17",
128
+ "commit": "14bd4084276efd59f022ab5074441eca421c96d0"
129
+ },
130
+ {
131
+ "author": "beachball",
132
+ "package": "@fluentui-react-native/tester",
133
+ "comment": "Bump @fluentui-react-native/interactive-hooks to v0.18.15",
134
+ "commit": "14bd4084276efd59f022ab5074441eca421c96d0"
135
+ },
136
+ {
137
+ "author": "beachball",
138
+ "package": "@fluentui-react-native/tester",
139
+ "comment": "Bump @fluentui-react-native/menu to v1.0.51",
140
+ "commit": "14bd4084276efd59f022ab5074441eca421c96d0"
141
+ },
142
+ {
143
+ "author": "beachball",
144
+ "package": "@fluentui-react-native/tester",
145
+ "comment": "Bump @fluentui-react-native/notification to v0.17.24",
146
+ "commit": "14bd4084276efd59f022ab5074441eca421c96d0"
147
+ },
148
+ {
149
+ "author": "beachball",
150
+ "package": "@fluentui-react-native/tester",
151
+ "comment": "Bump @fluentui-react-native/stack to v0.7.16",
152
+ "commit": "14bd4084276efd59f022ab5074441eca421c96d0"
153
+ },
154
+ {
155
+ "author": "beachball",
156
+ "package": "@fluentui-react-native/tester",
157
+ "comment": "Bump @fluentui-react-native/switch to v0.6.17",
158
+ "commit": "14bd4084276efd59f022ab5074441eca421c96d0"
159
+ },
160
+ {
161
+ "author": "beachball",
162
+ "package": "@fluentui-react-native/tester",
163
+ "comment": "Bump @fluentui-react-native/text to v0.15.8",
164
+ "commit": "14bd4084276efd59f022ab5074441eca421c96d0"
165
+ },
166
+ {
167
+ "author": "beachball",
168
+ "package": "@fluentui-react-native/tester",
169
+ "comment": "Bump @fluentui-react-native/win32-theme to v0.22.0",
170
+ "commit": "14bd4084276efd59f022ab5074441eca421c96d0"
171
+ },
172
+ {
173
+ "author": "beachball",
174
+ "package": "@fluentui-react-native/tester",
175
+ "comment": "Bump @fluentui/react-native to v0.32.38",
176
+ "commit": "14bd4084276efd59f022ab5074441eca421c96d0"
177
+ }
178
+ ]
179
+ }
180
+ },
181
+ {
182
+ "date": "Fri, 14 Oct 2022 23:01:57 GMT",
183
+ "tag": "@fluentui-react-native/tester_v0.101.7",
184
+ "version": "0.101.7",
185
+ "comments": {
186
+ "patch": [
187
+ {
188
+ "author": "winlarry@microsoft.com",
189
+ "package": "@fluentui-react-native/tester",
190
+ "commit": "f3d39c0fbe8e5e5c2387e47d4f8cea187cdc0a50",
191
+ "comment": "Port partner focuszone tests to FURN"
192
+ }
193
+ ]
194
+ }
195
+ },
196
+ {
197
+ "date": "Fri, 14 Oct 2022 19:11:13 GMT",
6
198
  "tag": "@fluentui-react-native/tester_v0.101.6",
7
199
  "version": "0.101.6",
8
200
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,55 @@
1
1
  # Change Log - @fluentui-react-native/tester
2
2
 
3
- This log was last generated on Fri, 14 Oct 2022 19:09:04 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 17 Oct 2022 17:50:04 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 0.101.8
8
+
9
+ Mon, 17 Oct 2022 17:50:04 GMT
10
+
11
+ ### Patches
12
+
13
+ - Bump @fluentui-react-native/android-theme to v0.12.9
14
+ - Bump @fluentui-react-native/apple-theme to v0.16.3
15
+ - Bump @fluentui-react-native/avatar to v1.2.22
16
+ - Bump @fluentui-react-native/badge to v0.1.44
17
+ - Bump @fluentui-react-native/button to v0.25.12
18
+ - Bump @fluentui-react-native/default-theme to v0.16.5
19
+ - Bump @fluentui-react-native/dropdown to v0.4.14
20
+ - Bump @fluentui-react-native/experimental-activity-indicator to v0.6.12
21
+ - Bump @fluentui-react-native/experimental-avatar to v0.16.16
22
+ - Bump @fluentui-react-native/experimental-button to v0.16.39
23
+ - Bump @fluentui-react-native/experimental-checkbox to v0.12.29
24
+ - Bump @fluentui-react-native/experimental-expander to v0.4.14
25
+ - Bump @fluentui-react-native/experimental-menu-button to v0.4.45
26
+ - Bump @fluentui-react-native/experimental-radio-group to v0.6.3
27
+ - Bump @fluentui-react-native/experimental-shadow to v0.2.30
28
+ - Bump @fluentui-react-native/experimental-shimmer to v0.7.13
29
+ - Bump @fluentui-react-native/experimental-tabs to v0.5.26
30
+ - Bump @fluentui-react-native/experimental-text to v0.11.14
31
+ - Bump @fluentui-react-native/framework to v0.8.12
32
+ - Bump @fluentui-react-native/icon to v0.13.17
33
+ - Bump @fluentui-react-native/interactive-hooks to v0.18.15
34
+ - Bump @fluentui-react-native/menu to v1.0.51
35
+ - Bump @fluentui-react-native/notification to v0.17.24
36
+ - Bump @fluentui-react-native/stack to v0.7.16
37
+ - Bump @fluentui-react-native/switch to v0.6.17
38
+ - Bump @fluentui-react-native/text to v0.15.8
39
+ - Bump @fluentui-react-native/win32-theme to v0.22.0
40
+ - Bump @fluentui/react-native to v0.32.38
41
+
42
+ ## 0.101.7
43
+
44
+ Fri, 14 Oct 2022 23:01:57 GMT
45
+
46
+ ### Patches
47
+
48
+ - Port partner focuszone tests to FURN (winlarry@microsoft.com)
49
+
7
50
  ## 0.101.6
8
51
 
9
- Fri, 14 Oct 2022 19:09:04 GMT
52
+ Fri, 14 Oct 2022 19:11:13 GMT
10
53
 
11
54
  ### Patches
12
55
 
@@ -1,7 +1,37 @@
1
1
  /// <reference types="webdriverio/async" />
2
+ import { FocusZoneDirection } from '@fluentui/react-native';
3
+ import { Keys } from '../../common/consts';
2
4
  import { BasePage } from '../../common/BasePage';
5
+ export declare const enum GridFocusZoneOption {
6
+ SetDirection = 0,
7
+ Set2DNavigation = 1,
8
+ SetCircularNavigation = 2,
9
+ UseDefaultTabbableElement = 3,
10
+ Disable = 4
11
+ }
12
+ export declare const enum GridButtonSelector {
13
+ Before = 0,
14
+ One = 1,
15
+ Two = 2,
16
+ Three = 3,
17
+ Four = 4,
18
+ Five = 5,
19
+ Six = 6,
20
+ Seven = 7,
21
+ Eight = 8,
22
+ Nine = 9,
23
+ After = 10
24
+ }
25
+ declare type BooleanGridFocusZoneOption = GridFocusZoneOption.UseDefaultTabbableElement | GridFocusZoneOption.Set2DNavigation | GridFocusZoneOption.SetCircularNavigation | GridFocusZoneOption.Disable;
3
26
  declare class FocusZonePageObject extends BasePage {
4
27
  waitForPrimaryElementDisplayed(timeout?: number): Promise<void>;
28
+ resetTest(): Promise<void>;
29
+ configureGridFocusZone(option: GridFocusZoneOption.SetDirection, direction: FocusZoneDirection): any;
30
+ configureGridFocusZone(option: BooleanGridFocusZoneOption, value: boolean): any;
31
+ sendKeys(selector: GridButtonSelector, keys: Keys[]): Promise<void>;
32
+ gridButtonIsFocused(selector: GridButtonSelector): Promise<boolean>;
33
+ private _getGridButton;
34
+ private _getGridFocusZoneMenuOption;
5
35
  /*****************************************/
6
36
  /**************** Getters ****************/
7
37
  /*****************************************/
@@ -9,6 +39,13 @@ declare class FocusZonePageObject extends BasePage {
9
39
  get _pageName(): string;
10
40
  get _primaryComponent(): import("webdriverio").ChainablePromiseElement<WebdriverIO.Element>;
11
41
  get _pageButton(): import("webdriverio").ChainablePromiseElement<WebdriverIO.Element>;
42
+ get _directionPicker(): import("webdriverio").ChainablePromiseElement<WebdriverIO.Element>;
43
+ get _twoDimSwitch(): import("webdriverio").ChainablePromiseElement<WebdriverIO.Element>;
44
+ get _disabledSwitch(): import("webdriverio").ChainablePromiseElement<WebdriverIO.Element>;
45
+ get _circleNavSwitch(): import("webdriverio").ChainablePromiseElement<WebdriverIO.Element>;
46
+ get _defaultTabbableElementSwitch(): import("webdriverio").ChainablePromiseElement<WebdriverIO.Element>;
47
+ get _gridBeforeButton(): import("webdriverio").ChainablePromiseElement<WebdriverIO.Element>;
48
+ get _gridAfterButton(): import("webdriverio").ChainablePromiseElement<WebdriverIO.Element>;
12
49
  }
13
50
  declare const _default: FocusZonePageObject;
14
51
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"FocusZonePageObject.d.ts","sourceRoot":"","sources":["../../../../src/E2E/FocusZone/pages/FocusZonePageObject.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAM,MAAM,uBAAuB,CAAC;AAErD,cAAM,mBAAoB,SAAQ,QAAQ;IAGlC,8BAA8B,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKrE,2CAA2C;IAC3C,2CAA2C;IAC3C,2CAA2C;IAC3C,IAAI,SAAS,uEAEZ;IAED,IAAI,SAAS,WAEZ;IAED,IAAI,iBAAiB,uEAEpB;IAED,IAAI,WAAW,uEAEd;CACF;;AAED,wBAAyC"}
1
+ {"version":3,"file":"FocusZonePageObject.d.ts","sourceRoot":"","sources":["../../../../src/E2E/FocusZone/pages/FocusZonePageObject.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAA6B,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAetE,OAAO,EAAE,QAAQ,EAAM,MAAM,uBAAuB,CAAC;AAErD,0BAAkB,mBAAmB;IACnC,YAAY,IAAI;IAChB,eAAe,IAAA;IACf,qBAAqB,IAAA;IACrB,yBAAyB,IAAA;IACzB,OAAO,IAAA;CACR;AAED,0BAAkB,kBAAkB;IAClC,MAAM,IAAI;IACV,GAAG,IAAA;IACH,GAAG,IAAA;IACH,KAAK,IAAA;IACL,IAAI,IAAA;IACJ,IAAI,IAAA;IACJ,GAAG,IAAA;IACH,KAAK,IAAA;IACL,KAAK,IAAA;IACL,IAAI,IAAA;IACJ,KAAK,KAAA;CACN;AAED,aAAK,0BAA0B,GAC3B,mBAAmB,CAAC,yBAAyB,GAC7C,mBAAmB,CAAC,eAAe,GACnC,mBAAmB,CAAC,qBAAqB,GACzC,mBAAmB,CAAC,OAAO,CAAC;AAEhC,cAAM,mBAAoB,SAAQ,QAAQ;IAClC,8BAA8B,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAK/D,SAAS;IAOT,sBAAsB,CAAC,MAAM,EAAE,mBAAmB,CAAC,YAAY,EAAE,SAAS,EAAE,kBAAkB;IAC9F,sBAAsB,CAAC,MAAM,EAAE,0BAA0B,EAAE,KAAK,EAAE,OAAO;IA6BzE,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAKnE,mBAAmB,CAAC,QAAQ,EAAE,kBAAkB,GAAG,OAAO,CAAC,OAAO,CAAC;YAK3D,cAAc;YAWd,2BAA2B;IAIzC,2CAA2C;IAC3C,2CAA2C;IAC3C,2CAA2C;IAC3C,IAAI,SAAS,uEAEZ;IAED,IAAI,SAAS,WAEZ;IAED,IAAI,iBAAiB,uEAEpB;IAED,IAAI,WAAW,uEAEd;IAED,IAAI,gBAAgB,uEAEnB;IAED,IAAI,aAAa,uEAEhB;IAED,IAAI,eAAe,uEAElB;IAED,IAAI,gBAAgB,uEAEnB;IAED,IAAI,6BAA6B,uEAEhC;IAED,IAAI,iBAAiB,uEAEpB;IAED,IAAI,gBAAgB,uEAEnB;CACF;;AAED,wBAAyC"}
@@ -1,13 +1,11 @@
1
1
  import { __awaiter, __extends, __generator } from "tslib";
2
- import { FOCUSZONE_TESTPAGE, FOCUSZONE_TEST_COMPONENT, HOMEPAGE_FOCUSZONE_BUTTON } from '../../../TestComponents/FocusZone/consts';
2
+ import { FOCUSZONE_CIRCLE_NAV_SWITCH, FOCUSZONE_DEFAULT_TABBABLE_SWITCH, FOCUSZONE_DIRECTION_ID, FOCUSZONE_DIRECTION_PICKER, FOCUSZONE_DISABLED_SWITCH, FOCUSZONE_GRID_AFTER, FOCUSZONE_GRID_BEFORE, FOCUSZONE_GRID_BUTTON, FOCUSZONE_TESTPAGE, FOCUSZONE_TEST_COMPONENT, FOCUSZONE_TWO_DIM_SWITCH, HOMEPAGE_FOCUSZONE_BUTTON, } from '../../../TestComponents/FocusZone/consts';
3
3
  import { BasePage, By } from '../../common/BasePage';
4
4
  var FocusZonePageObject = /** @class */ (function (_super) {
5
5
  __extends(FocusZonePageObject, _super);
6
6
  function FocusZonePageObject() {
7
7
  return _super !== null && _super.apply(this, arguments) || this;
8
8
  }
9
- // OVERRIDE: We use isExisting() here instead of isDisplayed() because FocusZone does not have any UI to it, it's simply
10
- // a wrapper that adds keyboard focus functionality
11
9
  FocusZonePageObject.prototype.waitForPrimaryElementDisplayed = function (timeout) {
12
10
  return __awaiter(this, void 0, void 0, function () {
13
11
  var errorMsg;
@@ -18,7 +16,7 @@ var FocusZonePageObject = /** @class */ (function (_super) {
18
16
  errorMsg = 'The FocusZone UI Element did not load correctly. Please see logs.';
19
17
  return [4 /*yield*/, this.waitForCondition(function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
20
18
  switch (_a.label) {
21
- case 0: return [4 /*yield*/, this._primaryComponent.isExisting()];
19
+ case 0: return [4 /*yield*/, this._primaryComponent.isDisplayed()];
22
20
  case 1: return [2 /*return*/, _a.sent()];
23
21
  }
24
22
  }); }); }, errorMsg, timeout)];
@@ -29,6 +27,152 @@ var FocusZonePageObject = /** @class */ (function (_super) {
29
27
  });
30
28
  });
31
29
  };
30
+ FocusZonePageObject.prototype.resetTest = function () {
31
+ return __awaiter(this, void 0, void 0, function () {
32
+ return __generator(this, function (_a) {
33
+ switch (_a.label) {
34
+ case 0: return [4 /*yield*/, this.configureGridFocusZone(0 /* SetDirection */, 'bidirectional')];
35
+ case 1:
36
+ _a.sent();
37
+ return [4 /*yield*/, this.configureGridFocusZone(1 /* Set2DNavigation */, false)];
38
+ case 2:
39
+ _a.sent();
40
+ return [4 /*yield*/, this.configureGridFocusZone(2 /* SetCircularNavigation */, false)];
41
+ case 3:
42
+ _a.sent();
43
+ return [4 /*yield*/, this.configureGridFocusZone(4 /* Disable */, false)];
44
+ case 4:
45
+ _a.sent();
46
+ return [2 /*return*/];
47
+ }
48
+ });
49
+ });
50
+ };
51
+ FocusZonePageObject.prototype.configureGridFocusZone = function (option, arg) {
52
+ return __awaiter(this, void 0, void 0, function () {
53
+ var switchElement, _a, switchValue;
54
+ var _this = this;
55
+ return __generator(this, function (_b) {
56
+ switch (_b.label) {
57
+ case 0:
58
+ _a = option;
59
+ switch (_a) {
60
+ case 0 /* SetDirection */: return [3 /*break*/, 1];
61
+ case 1 /* Set2DNavigation */: return [3 /*break*/, 7];
62
+ case 2 /* SetCircularNavigation */: return [3 /*break*/, 9];
63
+ case 3 /* UseDefaultTabbableElement */: return [3 /*break*/, 11];
64
+ case 4 /* Disable */: return [3 /*break*/, 13];
65
+ }
66
+ return [3 /*break*/, 15];
67
+ case 1: return [4 /*yield*/, this._directionPicker];
68
+ case 2: return [4 /*yield*/, (_b.sent()).click()];
69
+ case 3:
70
+ _b.sent();
71
+ return [4 /*yield*/, browser.waitUntil(function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
72
+ switch (_a.label) {
73
+ case 0: return [4 /*yield*/, this._getGridFocusZoneMenuOption(arg)];
74
+ case 1: return [4 /*yield*/, (_a.sent()).isDisplayed()];
75
+ case 2: return [2 /*return*/, _a.sent()];
76
+ }
77
+ }); }); })];
78
+ case 4:
79
+ _b.sent();
80
+ return [4 /*yield*/, this._getGridFocusZoneMenuOption(arg)];
81
+ case 5: return [4 /*yield*/, (_b.sent()).click()];
82
+ case 6:
83
+ _b.sent();
84
+ return [2 /*return*/];
85
+ case 7: return [4 /*yield*/, this._twoDimSwitch];
86
+ case 8:
87
+ switchElement = _b.sent();
88
+ return [3 /*break*/, 15];
89
+ case 9: return [4 /*yield*/, this._circleNavSwitch];
90
+ case 10:
91
+ switchElement = _b.sent();
92
+ return [3 /*break*/, 15];
93
+ case 11: return [4 /*yield*/, this._defaultTabbableElementSwitch];
94
+ case 12:
95
+ switchElement = _b.sent();
96
+ return [3 /*break*/, 15];
97
+ case 13: return [4 /*yield*/, this._disabledSwitch];
98
+ case 14:
99
+ switchElement = _b.sent();
100
+ return [3 /*break*/, 15];
101
+ case 15: return [4 /*yield*/, switchElement.isSelected()];
102
+ case 16:
103
+ switchValue = _b.sent();
104
+ if (!(switchValue !== arg)) return [3 /*break*/, 18];
105
+ return [4 /*yield*/, switchElement.click()];
106
+ case 17:
107
+ _b.sent();
108
+ _b.label = 18;
109
+ case 18: return [2 /*return*/];
110
+ }
111
+ });
112
+ });
113
+ };
114
+ FocusZonePageObject.prototype.sendKeys = function (selector, keys) {
115
+ return __awaiter(this, void 0, void 0, function () {
116
+ var btn;
117
+ return __generator(this, function (_a) {
118
+ switch (_a.label) {
119
+ case 0: return [4 /*yield*/, this._getGridButton(selector)];
120
+ case 1:
121
+ btn = _a.sent();
122
+ return [4 /*yield*/, btn.addValue(keys)];
123
+ case 2:
124
+ _a.sent();
125
+ return [2 /*return*/];
126
+ }
127
+ });
128
+ });
129
+ };
130
+ FocusZonePageObject.prototype.gridButtonIsFocused = function (selector) {
131
+ return __awaiter(this, void 0, void 0, function () {
132
+ var btn;
133
+ return __generator(this, function (_a) {
134
+ switch (_a.label) {
135
+ case 0: return [4 /*yield*/, this._getGridButton(selector)];
136
+ case 1:
137
+ btn = _a.sent();
138
+ return [4 /*yield*/, this.getElementAttribute(btn, "HasKeyboardFocus" /* IsFocused */)];
139
+ case 2: return [2 /*return*/, (_a.sent()) === "True" /* true */];
140
+ }
141
+ });
142
+ });
143
+ };
144
+ FocusZonePageObject.prototype._getGridButton = function (selector) {
145
+ return __awaiter(this, void 0, void 0, function () {
146
+ var _a;
147
+ return __generator(this, function (_b) {
148
+ switch (_b.label) {
149
+ case 0:
150
+ _a = selector;
151
+ switch (_a) {
152
+ case 0 /* Before */: return [3 /*break*/, 1];
153
+ case 10 /* After */: return [3 /*break*/, 3];
154
+ }
155
+ return [3 /*break*/, 5];
156
+ case 1: return [4 /*yield*/, this._gridBeforeButton];
157
+ case 2: return [2 /*return*/, _b.sent()];
158
+ case 3: return [4 /*yield*/, this._gridAfterButton];
159
+ case 4: return [2 /*return*/, _b.sent()];
160
+ case 5: return [4 /*yield*/, By(FOCUSZONE_GRID_BUTTON(selector))];
161
+ case 6: return [2 /*return*/, _b.sent()];
162
+ }
163
+ });
164
+ });
165
+ };
166
+ FocusZonePageObject.prototype._getGridFocusZoneMenuOption = function (direction) {
167
+ return __awaiter(this, void 0, void 0, function () {
168
+ return __generator(this, function (_a) {
169
+ switch (_a.label) {
170
+ case 0: return [4 /*yield*/, By(FOCUSZONE_DIRECTION_ID(direction))];
171
+ case 1: return [2 /*return*/, _a.sent()];
172
+ }
173
+ });
174
+ });
175
+ };
32
176
  Object.defineProperty(FocusZonePageObject.prototype, "_testPage", {
33
177
  /*****************************************/
34
178
  /**************** Getters ****************/
@@ -60,6 +204,55 @@ var FocusZonePageObject = /** @class */ (function (_super) {
60
204
  enumerable: false,
61
205
  configurable: true
62
206
  });
207
+ Object.defineProperty(FocusZonePageObject.prototype, "_directionPicker", {
208
+ get: function () {
209
+ return By(FOCUSZONE_DIRECTION_PICKER);
210
+ },
211
+ enumerable: false,
212
+ configurable: true
213
+ });
214
+ Object.defineProperty(FocusZonePageObject.prototype, "_twoDimSwitch", {
215
+ get: function () {
216
+ return By(FOCUSZONE_TWO_DIM_SWITCH);
217
+ },
218
+ enumerable: false,
219
+ configurable: true
220
+ });
221
+ Object.defineProperty(FocusZonePageObject.prototype, "_disabledSwitch", {
222
+ get: function () {
223
+ return By(FOCUSZONE_DISABLED_SWITCH);
224
+ },
225
+ enumerable: false,
226
+ configurable: true
227
+ });
228
+ Object.defineProperty(FocusZonePageObject.prototype, "_circleNavSwitch", {
229
+ get: function () {
230
+ return By(FOCUSZONE_CIRCLE_NAV_SWITCH);
231
+ },
232
+ enumerable: false,
233
+ configurable: true
234
+ });
235
+ Object.defineProperty(FocusZonePageObject.prototype, "_defaultTabbableElementSwitch", {
236
+ get: function () {
237
+ return By(FOCUSZONE_DEFAULT_TABBABLE_SWITCH);
238
+ },
239
+ enumerable: false,
240
+ configurable: true
241
+ });
242
+ Object.defineProperty(FocusZonePageObject.prototype, "_gridBeforeButton", {
243
+ get: function () {
244
+ return By(FOCUSZONE_GRID_BEFORE);
245
+ },
246
+ enumerable: false,
247
+ configurable: true
248
+ });
249
+ Object.defineProperty(FocusZonePageObject.prototype, "_gridAfterButton", {
250
+ get: function () {
251
+ return By(FOCUSZONE_GRID_AFTER);
252
+ },
253
+ enumerable: false,
254
+ configurable: true
255
+ });
63
256
  return FocusZonePageObject;
64
257
  }(BasePage));
65
258
  export default new FocusZonePageObject();
@@ -1 +1 @@
1
- {"version":3,"file":"FocusZonePageObject.js","sourceRoot":"","sources":["../../../../src/E2E/FocusZone/pages/FocusZonePageObject.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AACnI,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,uBAAuB,CAAC;AAErD;IAAkC,uCAAQ;IAA1C;;IA0BA,CAAC;IAzBC,wHAAwH;IACxH,mDAAmD;IAC7C,4DAA8B,GAApC,UAAqC,OAAgB;;;;;;;wBAC7C,QAAQ,GAAG,mEAAmE,CAAC;wBACrF,qBAAM,IAAI,CAAC,gBAAgB,CAAC;;4CAAY,qBAAM,IAAI,CAAC,iBAAiB,CAAC,UAAU,EAAE,EAAA;4CAAzC,sBAAA,SAAyC,EAAA;;qCAAA,EAAE,QAAQ,EAAE,OAAO,CAAC,EAAA;;wBAArG,SAAqG,CAAC;;;;;KACvG;IAKD,sBAAI,0CAAS;QAHb,2CAA2C;QAC3C,2CAA2C;QAC3C,2CAA2C;aAC3C;YACE,OAAO,EAAE,CAAC,kBAAkB,CAAC,CAAC;QAChC,CAAC;;;OAAA;IAED,sBAAI,0CAAS;aAAb;YACE,OAAO,kBAAkB,CAAC;QAC5B,CAAC;;;OAAA;IAED,sBAAI,kDAAiB;aAArB;Y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