@fluentui-react-native/tester 0.52.2 → 0.53.3
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.
- package/CHANGELOG.json +141 -1
- package/CHANGELOG.md +46 -2
- package/lib/E2E/ActivityIndicator/specs/ActivityIndicator.spec.win.js +3 -2
- package/lib/E2E/ActivityIndicator/specs/ActivityIndicator.spec.win.js.map +1 -1
- package/lib/E2E/Button/specs/Button.spec.win.js +9 -2
- package/lib/E2E/Button/specs/Button.spec.win.js.map +1 -1
- package/lib/E2E/ButtonExperimental/specs/ButtonExperimental.spec.win.js +6 -2
- package/lib/E2E/ButtonExperimental/specs/ButtonExperimental.spec.win.js.map +1 -1
- package/lib/E2E/Callout/specs/Callout.spec.win.js +3 -2
- package/lib/E2E/Callout/specs/Callout.spec.win.js.map +1 -1
- package/lib/E2E/Checkbox/specs/Checkbox.spec.win.js +8 -2
- package/lib/E2E/Checkbox/specs/Checkbox.spec.win.js.map +1 -1
- package/lib/E2E/CheckboxExperimental/specs/ExperimentalCheckbox.spec.win.js +6 -2
- package/lib/E2E/CheckboxExperimental/specs/ExperimentalCheckbox.spec.win.js.map +1 -1
- package/lib/E2E/ContextualMenu/specs/ContextualMenu.spec.win.js +5 -2
- package/lib/E2E/ContextualMenu/specs/ContextualMenu.spec.win.js.map +1 -1
- package/lib/E2E/FocusTrapZone/specs/FocusTrapZone.spec.win.js +3 -2
- package/lib/E2E/FocusTrapZone/specs/FocusTrapZone.spec.win.js.map +1 -1
- package/lib/E2E/FocusZone/specs/FocusZone.spec.win.js +3 -2
- package/lib/E2E/FocusZone/specs/FocusZone.spec.win.js.map +1 -1
- package/lib/E2E/Icon/specs/Icon.spec.win.js +3 -2
- package/lib/E2E/Icon/specs/Icon.spec.win.js.map +1 -1
- package/lib/E2E/Link/specs/Link.spec.win.js +5 -2
- package/lib/E2E/Link/specs/Link.spec.win.js.map +1 -1
- package/lib/E2E/MenuButton/specs/MenuButton.spec.win.js +8 -2
- package/lib/E2E/MenuButton/specs/MenuButton.spec.win.js.map +1 -1
- package/lib/E2E/MenuButtonExperimental/specs/ExperimentalMenuButton.spec.win.js +6 -2
- package/lib/E2E/MenuButtonExperimental/specs/ExperimentalMenuButton.spec.win.js.map +1 -1
- package/lib/E2E/Persona/specs/Persona.spec.win.js +3 -2
- package/lib/E2E/Persona/specs/Persona.spec.win.js.map +1 -1
- package/lib/E2E/PersonaCoin/specs/PersonaCoin.spec.win.js +3 -2
- package/lib/E2E/PersonaCoin/specs/PersonaCoin.spec.win.js.map +1 -1
- package/lib/E2E/Pressable/specs/Pressable.spec.win.js +3 -2
- package/lib/E2E/Pressable/specs/Pressable.spec.win.js.map +1 -1
- package/lib/E2E/RadioGroup/specs/RadioGroup.spec.win.js +12 -2
- package/lib/E2E/RadioGroup/specs/RadioGroup.spec.win.js.map +1 -1
- package/lib/E2E/Separator/specs/Separator.spec.win.js +3 -2
- package/lib/E2E/Separator/specs/Separator.spec.win.js.map +1 -1
- package/lib/E2E/Shimmer/specs/Shimmer.spec.win.js +3 -2
- package/lib/E2E/Shimmer/specs/Shimmer.spec.win.js.map +1 -1
- package/lib/E2E/Svg/specs/Svg.spec.win.js +3 -2
- package/lib/E2E/Svg/specs/Svg.spec.win.js.map +1 -1
- package/lib/E2E/Tabs/specs/Tabs.spec.win.js +7 -2
- package/lib/E2E/Tabs/specs/Tabs.spec.win.js.map +1 -1
- package/lib/E2E/TabsExperimental/specs/TabsExperimental.spec.win.js +5 -2
- package/lib/E2E/TabsExperimental/specs/TabsExperimental.spec.win.js.map +1 -1
- package/lib/E2E/Text/specs/Text.spec.win.js +6 -2
- package/lib/E2E/Text/specs/Text.spec.win.js.map +1 -1
- package/lib/E2E/TextExperimental/specs/ExperimentalText.spec.win.js +4 -2
- package/lib/E2E/TextExperimental/specs/ExperimentalText.spec.win.js.map +1 -1
- package/lib/E2E/Theme/specs/Theme.spec.win.js +3 -2
- package/lib/E2E/Theme/specs/Theme.spec.win.js.map +1 -1
- package/lib/E2E/Tokens/specs/Tokens.spec.win.js +3 -2
- package/lib/E2E/Tokens/specs/Tokens.spec.win.js.map +1 -1
- package/lib/E2E/common/BasePage.win.d.ts +6 -0
- package/lib/E2E/common/BasePage.win.d.ts.map +1 -1
- package/lib/E2E/common/BasePage.win.js +45 -0
- package/lib/E2E/common/BasePage.win.js.map +1 -1
- package/lib/FluentTester/TestComponents/ButtonExperimental/ButtonVariantTestSection.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/ButtonExperimental/ButtonVariantTestSection.js +2 -1
- package/lib/FluentTester/TestComponents/ButtonExperimental/ButtonVariantTestSection.js.map +1 -1
- package/lib/FluentTester/TestComponents/ButtonExperimental/ToggleButtonTestSection.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/ButtonExperimental/ToggleButtonTestSection.js +3 -2
- package/lib/FluentTester/TestComponents/ButtonExperimental/ToggleButtonTestSection.js.map +1 -1
- package/lib-commonjs/E2E/ActivityIndicator/specs/ActivityIndicator.spec.win.js +3 -2
- package/lib-commonjs/E2E/ActivityIndicator/specs/ActivityIndicator.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/Button/specs/Button.spec.win.js +9 -2
- package/lib-commonjs/E2E/Button/specs/Button.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/ButtonExperimental/specs/ButtonExperimental.spec.win.js +6 -2
- package/lib-commonjs/E2E/ButtonExperimental/specs/ButtonExperimental.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/Callout/specs/Callout.spec.win.js +3 -2
- package/lib-commonjs/E2E/Callout/specs/Callout.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/Checkbox/specs/Checkbox.spec.win.js +8 -2
- package/lib-commonjs/E2E/Checkbox/specs/Checkbox.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/CheckboxExperimental/specs/ExperimentalCheckbox.spec.win.js +6 -2
- package/lib-commonjs/E2E/CheckboxExperimental/specs/ExperimentalCheckbox.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/ContextualMenu/specs/ContextualMenu.spec.win.js +5 -2
- package/lib-commonjs/E2E/ContextualMenu/specs/ContextualMenu.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/FocusTrapZone/specs/FocusTrapZone.spec.win.js +3 -2
- package/lib-commonjs/E2E/FocusTrapZone/specs/FocusTrapZone.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/FocusZone/specs/FocusZone.spec.win.js +3 -2
- package/lib-commonjs/E2E/FocusZone/specs/FocusZone.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/Icon/specs/Icon.spec.win.js +3 -2
- package/lib-commonjs/E2E/Icon/specs/Icon.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/Link/specs/Link.spec.win.js +5 -2
- package/lib-commonjs/E2E/Link/specs/Link.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/MenuButton/specs/MenuButton.spec.win.js +8 -2
- package/lib-commonjs/E2E/MenuButton/specs/MenuButton.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/MenuButtonExperimental/specs/ExperimentalMenuButton.spec.win.js +6 -2
- package/lib-commonjs/E2E/MenuButtonExperimental/specs/ExperimentalMenuButton.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/Persona/specs/Persona.spec.win.js +3 -2
- package/lib-commonjs/E2E/Persona/specs/Persona.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/PersonaCoin/specs/PersonaCoin.spec.win.js +3 -2
- package/lib-commonjs/E2E/PersonaCoin/specs/PersonaCoin.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/Pressable/specs/Pressable.spec.win.js +3 -2
- package/lib-commonjs/E2E/Pressable/specs/Pressable.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/RadioGroup/specs/RadioGroup.spec.win.js +12 -2
- package/lib-commonjs/E2E/RadioGroup/specs/RadioGroup.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/Separator/specs/Separator.spec.win.js +3 -2
- package/lib-commonjs/E2E/Separator/specs/Separator.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/Shimmer/specs/Shimmer.spec.win.js +3 -2
- package/lib-commonjs/E2E/Shimmer/specs/Shimmer.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/Svg/specs/Svg.spec.win.js +3 -2
- package/lib-commonjs/E2E/Svg/specs/Svg.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/Tabs/specs/Tabs.spec.win.js +7 -2
- package/lib-commonjs/E2E/Tabs/specs/Tabs.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/TabsExperimental/specs/TabsExperimental.spec.win.js +5 -2
- package/lib-commonjs/E2E/TabsExperimental/specs/TabsExperimental.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/Text/specs/Text.spec.win.js +6 -2
- package/lib-commonjs/E2E/Text/specs/Text.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/TextExperimental/specs/ExperimentalText.spec.win.js +4 -2
- package/lib-commonjs/E2E/TextExperimental/specs/ExperimentalText.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/Theme/specs/Theme.spec.win.js +3 -2
- package/lib-commonjs/E2E/Theme/specs/Theme.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/Tokens/specs/Tokens.spec.win.js +3 -2
- package/lib-commonjs/E2E/Tokens/specs/Tokens.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/common/BasePage.win.d.ts +6 -0
- package/lib-commonjs/E2E/common/BasePage.win.d.ts.map +1 -1
- package/lib-commonjs/E2E/common/BasePage.win.js +45 -0
- package/lib-commonjs/E2E/common/BasePage.win.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/ButtonExperimental/ButtonVariantTestSection.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/ButtonExperimental/ButtonVariantTestSection.js +2 -1
- package/lib-commonjs/FluentTester/TestComponents/ButtonExperimental/ButtonVariantTestSection.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/ButtonExperimental/ToggleButtonTestSection.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/ButtonExperimental/ToggleButtonTestSection.js +3 -2
- package/lib-commonjs/FluentTester/TestComponents/ButtonExperimental/ToggleButtonTestSection.js.map +1 -1
- package/package.json +9 -9
- package/src/E2E/ActivityIndicator/specs/ActivityIndicator.spec.win.ts +3 -2
- package/src/E2E/Button/specs/Button.spec.win.ts +9 -2
- package/src/E2E/ButtonExperimental/specs/ButtonExperimental.spec.win.ts +9 -2
- package/src/E2E/Callout/specs/Callout.spec.win.ts +3 -2
- package/src/E2E/Checkbox/specs/Checkbox.spec.win.ts +8 -2
- package/src/E2E/CheckboxExperimental/specs/ExperimentalCheckbox.spec.win.ts +9 -2
- package/src/E2E/ContextualMenu/specs/ContextualMenu.spec.win.ts +5 -2
- package/src/E2E/FocusTrapZone/specs/FocusTrapZone.spec.win.ts +3 -2
- package/src/E2E/FocusZone/specs/FocusZone.spec.win.ts +3 -2
- package/src/E2E/Icon/specs/Icon.spec.win.ts +3 -2
- package/src/E2E/Link/specs/Link.spec.win.ts +7 -2
- package/src/E2E/MenuButton/specs/MenuButton.spec.win.ts +8 -2
- package/src/E2E/MenuButtonExperimental/specs/ExperimentalMenuButton.spec.win.ts +9 -2
- package/src/E2E/Persona/specs/Persona.spec.win.ts +3 -2
- package/src/E2E/PersonaCoin/specs/PersonaCoin.spec.win.ts +3 -2
- package/src/E2E/Pressable/specs/Pressable.spec.win.ts +3 -2
- package/src/E2E/RadioGroup/specs/RadioGroup.spec.win.ts +12 -2
- package/src/E2E/Separator/specs/Separator.spec.win.ts +3 -2
- package/src/E2E/Shimmer/specs/Shimmer.spec.win.ts +3 -2
- package/src/E2E/Svg/specs/Svg.spec.win.ts +3 -2
- package/src/E2E/Tabs/specs/Tabs.spec.win.ts +7 -2
- package/src/E2E/TabsExperimental/specs/TabsExperimental.spec.win.ts +7 -2
- package/src/E2E/Text/specs/Text.spec.win.ts +6 -2
- package/src/E2E/TextExperimental/specs/ExperimentalText.spec.win.ts +5 -2
- package/src/E2E/Theme/specs/Theme.spec.win.ts +3 -2
- package/src/E2E/Tokens/specs/Tokens.spec.win.ts +3 -2
- package/src/E2E/common/BasePage.win.ts +34 -0
- package/src/FluentTester/TestComponents/ButtonExperimental/ButtonVariantTestSection.tsx +4 -1
- package/src/FluentTester/TestComponents/ButtonExperimental/ToggleButtonTestSection.tsx +5 -2
|
@@ -131,6 +131,23 @@ export class BasePage {
|
|
|
131
131
|
);
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
+
/* FUNCTIONALITY: Determines if an Assert has fired. True if yes; false otherwise
|
|
135
|
+
*
|
|
136
|
+
* WHY/HOW: Unfortunately, some Asserts don't take focus away from the test app. Because of this, the test execution is able
|
|
137
|
+
* to continue without realizing an assert as popped up (unless the assert is a crashing one).
|
|
138
|
+
*
|
|
139
|
+
* In order to detect an assert, this function gets the number of window handles currently open within the test app.
|
|
140
|
+
* Only one instance SHOULD be open at a time (the app itself). If another instance of the app is open, we know an assert dialogue
|
|
141
|
+
* has popped up. With this information, we know to fail the test.
|
|
142
|
+
*
|
|
143
|
+
* Additionally, you might think it's logical to simply place this in the afterEach() hook so it's called after every test (rather than duplicating this call in every test).
|
|
144
|
+
* Unfortunately, afterEach() is designed for setup/teardown - not for determining if a test should fail or not.
|
|
145
|
+
* */
|
|
146
|
+
didAssertPopup(): boolean {
|
|
147
|
+
// If more than 1 instance of the app is open, we know an assert dialogue popped up.
|
|
148
|
+
return browser.getWindowHandles().length > 1;
|
|
149
|
+
}
|
|
150
|
+
|
|
134
151
|
/*****************************************/
|
|
135
152
|
/**************** Getters ****************/
|
|
136
153
|
/*****************************************/
|
|
@@ -172,6 +189,23 @@ export class BasePage {
|
|
|
172
189
|
return DUMMY_CHAR;
|
|
173
190
|
}
|
|
174
191
|
|
|
192
|
+
/****************** Error Messages ******************/
|
|
193
|
+
get ERRORMESSAGE_SUFFIX(): string {
|
|
194
|
+
return 'Please review logs and error screenshots for more information.';
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
get ERRORMESSAGE_APPLOAD(): string {
|
|
198
|
+
return 'The FluentTester app did not load correctly. ' + this.ERRORMESSAGE_SUFFIX;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
get ERRORMESSAGE_PAGELOAD(): string {
|
|
202
|
+
return 'The ' + this._pageName + ' test page did not load correctly. ' + this.ERRORMESSAGE_SUFFIX;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
get ERRORMESSAGE_ASSERT(): string {
|
|
206
|
+
return 'An assert popped up. ' + this.ERRORMESSAGE_SUFFIX;
|
|
207
|
+
}
|
|
208
|
+
|
|
175
209
|
// Default timeout to wait until page is displayed (10s)
|
|
176
210
|
waitForPageTimeout: number = 15000;
|
|
177
211
|
}
|
|
@@ -15,11 +15,14 @@ export const ButtonVariantTest: React.FunctionComponent = () => {
|
|
|
15
15
|
<View style={[stackStyle, commonTestStyles.view]}>
|
|
16
16
|
<Button style={commonTestStyles.vmargin}>Default</Button>
|
|
17
17
|
<Button disabled style={commonTestStyles.vmargin}>
|
|
18
|
-
Disabled
|
|
18
|
+
Default Disabled
|
|
19
19
|
</Button>
|
|
20
20
|
<Button appearance="primary" style={commonTestStyles.vmargin}>
|
|
21
21
|
Primary
|
|
22
22
|
</Button>
|
|
23
|
+
<Button disabled appearance="primary" style={commonTestStyles.vmargin}>
|
|
24
|
+
Primary Disabled
|
|
25
|
+
</Button>
|
|
23
26
|
<Button appearance="subtle" style={commonTestStyles.vmargin}>
|
|
24
27
|
Subtle
|
|
25
28
|
</Button>
|
|
@@ -34,10 +34,13 @@ export const ToggleButtonTest: React.FunctionComponent = () => {
|
|
|
34
34
|
Unchecked Default Toggle
|
|
35
35
|
</ToggleButton>
|
|
36
36
|
<ToggleButton appearance="primary" style={commonTestStyles.vmargin}>
|
|
37
|
-
Primary Toggle
|
|
37
|
+
Checked Primary Toggle
|
|
38
|
+
</ToggleButton>
|
|
39
|
+
<ToggleButton disabled defaultChecked appearance="primary" style={commonTestStyles.vmargin}>
|
|
40
|
+
Checked Primary Toggle Disabled
|
|
38
41
|
</ToggleButton>
|
|
39
42
|
<ToggleButton defaultChecked appearance="primary" style={commonTestStyles.vmargin}>
|
|
40
|
-
Primary Toggle
|
|
43
|
+
Unchecked Primary Toggle
|
|
41
44
|
</ToggleButton>
|
|
42
45
|
<View style={styles.row}>
|
|
43
46
|
<ToggleButton appearance="subtle" onClick={onGhostClicked} checked={subtleChecked} style={commonTestStyles.vmargin}>
|