@fluentui-react-native/tester 0.101.5 → 0.101.7

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 +169 -1
  2. package/CHANGELOG.md +41 -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 +25 -25
  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,175 @@
2
2
  "name": "@fluentui-react-native/tester",
3
3
  "entries": [
4
4
  {
5
- "date": "Fri, 14 Oct 2022 18:04:12 GMT",
5
+ "date": "Fri, 14 Oct 2022 23:01:45 GMT",
6
+ "tag": "@fluentui-react-native/tester_v0.101.7",
7
+ "version": "0.101.7",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "winlarry@microsoft.com",
12
+ "package": "@fluentui-react-native/tester",
13
+ "commit": "f3d39c0fbe8e5e5c2387e47d4f8cea187cdc0a50",
14
+ "comment": "Port partner focuszone tests to FURN"
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ {
20
+ "date": "Fri, 14 Oct 2022 19:11:13 GMT",
21
+ "tag": "@fluentui-react-native/tester_v0.101.6",
22
+ "version": "0.101.6",
23
+ "comments": {
24
+ "patch": [
25
+ {
26
+ "author": "beachball",
27
+ "package": "@fluentui-react-native/tester",
28
+ "comment": "Bump @fluentui-react-native/avatar to v1.2.21",
29
+ "commit": "7263bc3c7cd4796b28fadad4f14a73d967deda0f"
30
+ },
31
+ {
32
+ "author": "beachball",
33
+ "package": "@fluentui-react-native/tester",
34
+ "comment": "Bump @fluentui-react-native/badge to v0.1.43",
35
+ "commit": "7263bc3c7cd4796b28fadad4f14a73d967deda0f"
36
+ },
37
+ {
38
+ "author": "beachball",
39
+ "package": "@fluentui-react-native/tester",
40
+ "comment": "Bump @fluentui-react-native/button to v0.25.11",
41
+ "commit": "7263bc3c7cd4796b28fadad4f14a73d967deda0f"
42
+ },
43
+ {
44
+ "author": "beachball",
45
+ "package": "@fluentui-react-native/tester",
46
+ "comment": "Bump @fluentui-react-native/dropdown to v0.4.13",
47
+ "commit": "7263bc3c7cd4796b28fadad4f14a73d967deda0f"
48
+ },
49
+ {
50
+ "author": "beachball",
51
+ "package": "@fluentui-react-native/tester",
52
+ "comment": "Bump @fluentui-react-native/experimental-activity-indicator to v0.6.11",
53
+ "commit": "7263bc3c7cd4796b28fadad4f14a73d967deda0f"
54
+ },
55
+ {
56
+ "author": "beachball",
57
+ "package": "@fluentui-react-native/tester",
58
+ "comment": "Bump @fluentui-react-native/experimental-avatar to v0.16.15",
59
+ "commit": "7263bc3c7cd4796b28fadad4f14a73d967deda0f"
60
+ },
61
+ {
62
+ "author": "beachball",
63
+ "package": "@fluentui-react-native/tester",
64
+ "comment": "Bump @fluentui-react-native/experimental-button to v0.16.38",
65
+ "commit": "7263bc3c7cd4796b28fadad4f14a73d967deda0f"
66
+ },
67
+ {
68
+ "author": "beachball",
69
+ "package": "@fluentui-react-native/tester",
70
+ "comment": "Bump @fluentui-react-native/experimental-checkbox to v0.12.28",
71
+ "commit": "7263bc3c7cd4796b28fadad4f14a73d967deda0f"
72
+ },
73
+ {
74
+ "author": "beachball",
75
+ "package": "@fluentui-react-native/tester",
76
+ "comment": "Bump @fluentui-react-native/experimental-expander to v0.4.13",
77
+ "commit": "7263bc3c7cd4796b28fadad4f14a73d967deda0f"
78
+ },
79
+ {
80
+ "author": "beachball",
81
+ "package": "@fluentui-react-native/tester",
82
+ "comment": "Bump @fluentui-react-native/experimental-menu-button to v0.4.44",
83
+ "commit": "7263bc3c7cd4796b28fadad4f14a73d967deda0f"
84
+ },
85
+ {
86
+ "author": "beachball",
87
+ "package": "@fluentui-react-native/tester",
88
+ "comment": "Bump @fluentui-react-native/experimental-radio-group to v0.6.2",
89
+ "commit": "7263bc3c7cd4796b28fadad4f14a73d967deda0f"
90
+ },
91
+ {
92
+ "author": "beachball",
93
+ "package": "@fluentui-react-native/tester",
94
+ "comment": "Bump @fluentui-react-native/experimental-shadow to v0.2.29",
95
+ "commit": "7263bc3c7cd4796b28fadad4f14a73d967deda0f"
96
+ },
97
+ {
98
+ "author": "beachball",
99
+ "package": "@fluentui-react-native/tester",
100
+ "comment": "Bump @fluentui-react-native/experimental-shimmer to v0.7.12",
101
+ "commit": "7263bc3c7cd4796b28fadad4f14a73d967deda0f"
102
+ },
103
+ {
104
+ "author": "beachball",
105
+ "package": "@fluentui-react-native/tester",
106
+ "comment": "Bump @fluentui-react-native/experimental-tabs to v0.5.25",
107
+ "commit": "7263bc3c7cd4796b28fadad4f14a73d967deda0f"
108
+ },
109
+ {
110
+ "author": "beachball",
111
+ "package": "@fluentui-react-native/tester",
112
+ "comment": "Bump @fluentui-react-native/experimental-text to v0.11.13",
113
+ "commit": "7263bc3c7cd4796b28fadad4f14a73d967deda0f"
114
+ },
115
+ {
116
+ "author": "beachball",
117
+ "package": "@fluentui-react-native/tester",
118
+ "comment": "Bump @fluentui-react-native/framework to v0.8.11",
119
+ "commit": "7263bc3c7cd4796b28fadad4f14a73d967deda0f"
120
+ },
121
+ {
122
+ "author": "beachball",
123
+ "package": "@fluentui-react-native/tester",
124
+ "comment": "Bump @fluentui-react-native/icon to v0.13.16",
125
+ "commit": "7263bc3c7cd4796b28fadad4f14a73d967deda0f"
126
+ },
127
+ {
128
+ "author": "beachball",
129
+ "package": "@fluentui-react-native/tester",
130
+ "comment": "Bump @fluentui-react-native/interactive-hooks to v0.18.14",
131
+ "commit": "7263bc3c7cd4796b28fadad4f14a73d967deda0f"
132
+ },
133
+ {
134
+ "author": "beachball",
135
+ "package": "@fluentui-react-native/tester",
136
+ "comment": "Bump @fluentui-react-native/menu to v1.0.50",
137
+ "commit": "7263bc3c7cd4796b28fadad4f14a73d967deda0f"
138
+ },
139
+ {
140
+ "author": "beachball",
141
+ "package": "@fluentui-react-native/tester",
142
+ "comment": "Bump @fluentui-react-native/notification to v0.17.23",
143
+ "commit": "7263bc3c7cd4796b28fadad4f14a73d967deda0f"
144
+ },
145
+ {
146
+ "author": "beachball",
147
+ "package": "@fluentui-react-native/tester",
148
+ "comment": "Bump @fluentui-react-native/stack to v0.7.15",
149
+ "commit": "7263bc3c7cd4796b28fadad4f14a73d967deda0f"
150
+ },
151
+ {
152
+ "author": "beachball",
153
+ "package": "@fluentui-react-native/tester",
154
+ "comment": "Bump @fluentui-react-native/switch to v0.6.16",
155
+ "commit": "7263bc3c7cd4796b28fadad4f14a73d967deda0f"
156
+ },
157
+ {
158
+ "author": "beachball",
159
+ "package": "@fluentui-react-native/tester",
160
+ "comment": "Bump @fluentui-react-native/text to v0.15.7",
161
+ "commit": "7263bc3c7cd4796b28fadad4f14a73d967deda0f"
162
+ },
163
+ {
164
+ "author": "beachball",
165
+ "package": "@fluentui-react-native/tester",
166
+ "comment": "Bump @fluentui/react-native to v0.32.37",
167
+ "commit": "7263bc3c7cd4796b28fadad4f14a73d967deda0f"
168
+ }
169
+ ]
170
+ }
171
+ },
172
+ {
173
+ "date": "Fri, 14 Oct 2022 18:04:42 GMT",
6
174
  "tag": "@fluentui-react-native/tester_v0.101.5",
7
175
  "version": "0.101.5",
8
176
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,51 @@
1
1
  # Change Log - @fluentui-react-native/tester
2
2
 
3
- This log was last generated on Fri, 14 Oct 2022 18:04:12 GMT and should not be manually modified.
3
+ This log was last generated on Fri, 14 Oct 2022 23:01:45 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 0.101.7
8
+
9
+ Fri, 14 Oct 2022 23:01:45 GMT
10
+
11
+ ### Patches
12
+
13
+ - Port partner focuszone tests to FURN (winlarry@microsoft.com)
14
+
15
+ ## 0.101.6
16
+
17
+ Fri, 14 Oct 2022 19:11:13 GMT
18
+
19
+ ### Patches
20
+
21
+ - Bump @fluentui-react-native/avatar to v1.2.21
22
+ - Bump @fluentui-react-native/badge to v0.1.43
23
+ - Bump @fluentui-react-native/button to v0.25.11
24
+ - Bump @fluentui-react-native/dropdown to v0.4.13
25
+ - Bump @fluentui-react-native/experimental-activity-indicator to v0.6.11
26
+ - Bump @fluentui-react-native/experimental-avatar to v0.16.15
27
+ - Bump @fluentui-react-native/experimental-button to v0.16.38
28
+ - Bump @fluentui-react-native/experimental-checkbox to v0.12.28
29
+ - Bump @fluentui-react-native/experimental-expander to v0.4.13
30
+ - Bump @fluentui-react-native/experimental-menu-button to v0.4.44
31
+ - Bump @fluentui-react-native/experimental-radio-group to v0.6.2
32
+ - Bump @fluentui-react-native/experimental-shadow to v0.2.29
33
+ - Bump @fluentui-react-native/experimental-shimmer to v0.7.12
34
+ - Bump @fluentui-react-native/experimental-tabs to v0.5.25
35
+ - Bump @fluentui-react-native/experimental-text to v0.11.13
36
+ - Bump @fluentui-react-native/framework to v0.8.11
37
+ - Bump @fluentui-react-native/icon to v0.13.16
38
+ - Bump @fluentui-react-native/interactive-hooks to v0.18.14
39
+ - Bump @fluentui-react-native/menu to v1.0.50
40
+ - Bump @fluentui-react-native/notification to v0.17.23
41
+ - Bump @fluentui-react-native/stack to v0.7.15
42
+ - Bump @fluentui-react-native/switch to v0.6.16
43
+ - Bump @fluentui-react-native/text to v0.15.7
44
+ - Bump @fluentui/react-native to v0.32.37
45
+
7
46
  ## 0.101.5
8
47
 
9
- Fri, 14 Oct 2022 18:04:12 GMT
48
+ Fri, 14 Oct 2022 18:04:42 GMT
10
49
 
11
50
  ### Patches
12
51
 
@@ -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,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AAI,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;YACE,OAAO,EAAE,CAAC,wBAAwB,CAAC,CAAC;QACtC,CAAC;;;OAAA;IAED,sBAAI,4CAAW;aAAf;YACE,OAAO,EAAE,CAAC,yBAAyB,CAAC,CAAC;QACvC,CAAC;;;OAAA;IACH,0BAAC;AAAD,CAAC,AA1BD,CAAkC,QAAQ,GA0BzC;AAED,eAAe,IAAI,mBAAmB,EAAE,CAAC"}
1
+ {"version":3,"file":"FocusZonePageObject.js","sourceRoot":"","sources":["../../../../src/E2E/FocusZone/pages/FocusZonePageObject.ts"],"names":[],"mappings":";AAEA,OAAO,EACL,2BAA2B,EAC3B,iCAAiC,EACjC,sBAAsB,EACtB,0BAA0B,EAC1B,yBAAyB,EACzB,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,EAClB,wBAAwB,EACxB,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,E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