@fluentui-react-native/tester 0.56.0 → 0.58.0
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 +190 -1
- package/CHANGELOG.md +54 -2
- package/lib/E2E/CheckboxExperimental/pages/ExperimentalCheckboxPageObject.d.ts +12 -0
- package/lib/E2E/CheckboxExperimental/pages/ExperimentalCheckboxPageObject.d.ts.map +1 -1
- package/lib/E2E/CheckboxExperimental/pages/ExperimentalCheckboxPageObject.js +45 -1
- package/lib/E2E/CheckboxExperimental/pages/ExperimentalCheckboxPageObject.js.map +1 -1
- package/lib/E2E/CheckboxExperimental/specs/ExperimentalCheckbox.spec.win.js +35 -0
- package/lib/E2E/CheckboxExperimental/specs/ExperimentalCheckbox.spec.win.js.map +1 -1
- package/lib/E2E/common/NativeTesting/pages/NativeTestingPageObject.win.d.ts +11 -0
- package/lib/E2E/common/NativeTesting/pages/NativeTestingPageObject.win.d.ts.map +1 -0
- package/lib/E2E/common/NativeTesting/pages/NativeTestingPageObject.win.js +57 -0
- package/lib/E2E/common/NativeTesting/pages/NativeTestingPageObject.win.js.map +1 -0
- package/lib/E2E/common/NativeTesting/specs/NativeTesting.spec.win.d.ts +2 -0
- package/lib/E2E/common/NativeTesting/specs/NativeTesting.spec.win.d.ts.map +1 -0
- package/lib/E2E/common/NativeTesting/specs/NativeTesting.spec.win.js +26 -0
- package/lib/E2E/common/NativeTesting/specs/NativeTesting.spec.win.js.map +1 -0
- package/lib/FluentTester/FluentTester.d.ts.map +1 -1
- package/lib/FluentTester/FluentTester.js +8 -8
- package/lib/FluentTester/FluentTester.js.map +1 -1
- package/lib/FluentTester/TestComponents/ActivityIndicator/ActivityIndicatorTest.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/ActivityIndicator/ActivityIndicatorTest.js +28 -23
- package/lib/FluentTester/TestComponents/ActivityIndicator/ActivityIndicatorTest.js.map +1 -1
- package/lib/FluentTester/TestComponents/Avatar/CustomizedAvatar.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/Avatar/CustomizedAvatar.js +24 -29
- package/lib/FluentTester/TestComponents/Avatar/CustomizedAvatar.js.map +1 -1
- package/lib/FluentTester/TestComponents/Badge/BadgeTest.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/Badge/BadgeTest.js +9 -9
- package/lib/FluentTester/TestComponents/Badge/BadgeTest.js.map +1 -1
- package/lib/FluentTester/TestComponents/Button/ButtonHOCTestSection.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/Button/ButtonHOCTestSection.js +29 -16
- package/lib/FluentTester/TestComponents/Button/ButtonHOCTestSection.js.map +1 -1
- package/lib/FluentTester/TestComponents/Button/ButtonSizeTestSection.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/Button/ButtonSizeTestSection.js.map +1 -1
- package/lib/FluentTester/TestComponents/Checkbox/CheckboxTest.js +27 -27
- package/lib/FluentTester/TestComponents/Checkbox/CheckboxTest.js.map +1 -1
- package/lib/FluentTester/TestComponents/CheckboxExperimental/CheckboxTest.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/CheckboxExperimental/CheckboxTest.js +38 -26
- package/lib/FluentTester/TestComponents/CheckboxExperimental/CheckboxTest.js.map +1 -1
- package/lib/FluentTester/TestComponents/CheckboxExperimental/E2ECheckboxExperimentalTest.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/CheckboxExperimental/E2ECheckboxExperimentalTest.js +9 -3
- package/lib/FluentTester/TestComponents/CheckboxExperimental/E2ECheckboxExperimentalTest.js.map +1 -1
- package/lib/FluentTester/TestComponents/CheckboxExperimental/consts.d.ts +1 -0
- package/lib/FluentTester/TestComponents/CheckboxExperimental/consts.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/CheckboxExperimental/consts.js +1 -0
- package/lib/FluentTester/TestComponents/CheckboxExperimental/consts.js.map +1 -1
- package/lib/FluentTester/TestComponents/ContextualMenu/ContextualMenuTest.js +2 -2
- package/lib/FluentTester/TestComponents/ContextualMenu/ContextualMenuTest.js.map +1 -1
- package/lib/FluentTester/TestComponents/Expander/ExpanderTest.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/Expander/ExpanderTest.js +22 -22
- package/lib/FluentTester/TestComponents/Expander/ExpanderTest.js.map +1 -1
- package/lib/FluentTester/TestComponents/MenuButton/CustomizedMenuButtonTest.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/MenuButton/CustomizedMenuButtonTest.js +11 -11
- package/lib/FluentTester/TestComponents/MenuButton/CustomizedMenuButtonTest.js.map +1 -1
- package/lib/FluentTester/TestComponents/MenuButtonExperimental/CustomizedMenuButtonTest.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/MenuButtonExperimental/CustomizedMenuButtonTest.js +11 -11
- package/lib/FluentTester/TestComponents/MenuButtonExperimental/CustomizedMenuButtonTest.js.map +1 -1
- package/lib/FluentTester/TestComponents/Persona/CustomizeUsage.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/Persona/CustomizeUsage.js +13 -26
- package/lib/FluentTester/TestComponents/Persona/CustomizeUsage.js.map +1 -1
- package/lib/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.js +24 -29
- package/lib/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.js.map +1 -1
- package/lib/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.mobile.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.mobile.js +11 -20
- package/lib/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.mobile.js.map +1 -1
- package/lib/FluentTester/TestComponents/Shimmer/ShimmerTest.d.ts +2 -0
- package/lib/FluentTester/TestComponents/Shimmer/ShimmerTest.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/Shimmer/ShimmerTest.js +21 -9
- package/lib/FluentTester/TestComponents/Shimmer/ShimmerTest.js.map +1 -1
- package/lib/FluentTester/TestComponents/Text/CustomizeUsage.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/Text/CustomizeUsage.js +36 -36
- package/lib/FluentTester/TestComponents/Text/CustomizeUsage.js.map +1 -1
- package/lib/FluentTester/TestComponents/TextExperimental/CustomizeUsage.d.ts.map +1 -1
- package/lib/FluentTester/TestComponents/TextExperimental/CustomizeUsage.js +36 -36
- package/lib/FluentTester/TestComponents/TextExperimental/CustomizeUsage.js.map +1 -1
- package/lib-commonjs/E2E/CheckboxExperimental/pages/ExperimentalCheckboxPageObject.d.ts +12 -0
- package/lib-commonjs/E2E/CheckboxExperimental/pages/ExperimentalCheckboxPageObject.d.ts.map +1 -1
- package/lib-commonjs/E2E/CheckboxExperimental/pages/ExperimentalCheckboxPageObject.js +44 -0
- package/lib-commonjs/E2E/CheckboxExperimental/pages/ExperimentalCheckboxPageObject.js.map +1 -1
- package/lib-commonjs/E2E/CheckboxExperimental/specs/ExperimentalCheckbox.spec.win.js +35 -0
- package/lib-commonjs/E2E/CheckboxExperimental/specs/ExperimentalCheckbox.spec.win.js.map +1 -1
- package/lib-commonjs/E2E/common/NativeTesting/pages/NativeTestingPageObject.win.d.ts +11 -0
- package/lib-commonjs/E2E/common/NativeTesting/pages/NativeTestingPageObject.win.d.ts.map +1 -0
- package/lib-commonjs/E2E/common/NativeTesting/pages/NativeTestingPageObject.win.js +59 -0
- package/lib-commonjs/E2E/common/NativeTesting/pages/NativeTestingPageObject.win.js.map +1 -0
- package/lib-commonjs/E2E/common/NativeTesting/specs/NativeTesting.spec.win.d.ts +2 -0
- package/lib-commonjs/E2E/common/NativeTesting/specs/NativeTesting.spec.win.d.ts.map +1 -0
- package/lib-commonjs/E2E/common/NativeTesting/specs/NativeTesting.spec.win.js +29 -0
- package/lib-commonjs/E2E/common/NativeTesting/specs/NativeTesting.spec.win.js.map +1 -0
- package/lib-commonjs/FluentTester/FluentTester.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/FluentTester.js +8 -8
- package/lib-commonjs/FluentTester/FluentTester.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/ActivityIndicator/ActivityIndicatorTest.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/ActivityIndicator/ActivityIndicatorTest.js +28 -23
- package/lib-commonjs/FluentTester/TestComponents/ActivityIndicator/ActivityIndicatorTest.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Avatar/CustomizedAvatar.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Avatar/CustomizedAvatar.js +24 -29
- package/lib-commonjs/FluentTester/TestComponents/Avatar/CustomizedAvatar.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Badge/BadgeTest.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Badge/BadgeTest.js +9 -9
- package/lib-commonjs/FluentTester/TestComponents/Badge/BadgeTest.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Button/ButtonHOCTestSection.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Button/ButtonHOCTestSection.js +28 -15
- package/lib-commonjs/FluentTester/TestComponents/Button/ButtonHOCTestSection.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Button/ButtonSizeTestSection.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Button/ButtonSizeTestSection.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Checkbox/CheckboxTest.js +27 -27
- package/lib-commonjs/FluentTester/TestComponents/Checkbox/CheckboxTest.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/CheckboxExperimental/CheckboxTest.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/CheckboxExperimental/CheckboxTest.js +38 -26
- package/lib-commonjs/FluentTester/TestComponents/CheckboxExperimental/CheckboxTest.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/CheckboxExperimental/E2ECheckboxExperimentalTest.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/CheckboxExperimental/E2ECheckboxExperimentalTest.js +8 -2
- package/lib-commonjs/FluentTester/TestComponents/CheckboxExperimental/E2ECheckboxExperimentalTest.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/CheckboxExperimental/consts.d.ts +1 -0
- package/lib-commonjs/FluentTester/TestComponents/CheckboxExperimental/consts.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/CheckboxExperimental/consts.js +2 -1
- package/lib-commonjs/FluentTester/TestComponents/CheckboxExperimental/consts.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/ContextualMenu/ContextualMenuTest.js +2 -2
- package/lib-commonjs/FluentTester/TestComponents/ContextualMenu/ContextualMenuTest.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Expander/ExpanderTest.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Expander/ExpanderTest.js +22 -22
- package/lib-commonjs/FluentTester/TestComponents/Expander/ExpanderTest.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/MenuButton/CustomizedMenuButtonTest.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/MenuButton/CustomizedMenuButtonTest.js +11 -11
- package/lib-commonjs/FluentTester/TestComponents/MenuButton/CustomizedMenuButtonTest.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/MenuButtonExperimental/CustomizedMenuButtonTest.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/MenuButtonExperimental/CustomizedMenuButtonTest.js +11 -11
- package/lib-commonjs/FluentTester/TestComponents/MenuButtonExperimental/CustomizedMenuButtonTest.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Persona/CustomizeUsage.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Persona/CustomizeUsage.js +13 -26
- package/lib-commonjs/FluentTester/TestComponents/Persona/CustomizeUsage.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.js +24 -29
- package/lib-commonjs/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.mobile.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.mobile.js +11 -20
- package/lib-commonjs/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.mobile.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Shimmer/ShimmerTest.d.ts +2 -0
- package/lib-commonjs/FluentTester/TestComponents/Shimmer/ShimmerTest.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Shimmer/ShimmerTest.js +24 -10
- package/lib-commonjs/FluentTester/TestComponents/Shimmer/ShimmerTest.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Text/CustomizeUsage.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/Text/CustomizeUsage.js +36 -36
- package/lib-commonjs/FluentTester/TestComponents/Text/CustomizeUsage.js.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/TextExperimental/CustomizeUsage.d.ts.map +1 -1
- package/lib-commonjs/FluentTester/TestComponents/TextExperimental/CustomizeUsage.js +36 -36
- package/lib-commonjs/FluentTester/TestComponents/TextExperimental/CustomizeUsage.js.map +1 -1
- package/package.json +10 -11
- package/src/E2E/CheckboxExperimental/pages/ExperimentalCheckboxPageObject.ts +63 -0
- package/src/E2E/CheckboxExperimental/specs/ExperimentalCheckbox.spec.win.ts +48 -2
- package/src/E2E/common/NativeTesting/pages/NativeTestingPageObject.win.ts +56 -0
- package/src/E2E/common/NativeTesting/specs/NativeTesting.spec.win.ts +28 -0
- package/src/FluentTester/FluentTester.tsx +10 -10
- package/src/FluentTester/TestComponents/ActivityIndicator/ActivityIndicatorTest.tsx +36 -26
- package/src/FluentTester/TestComponents/Avatar/CustomizedAvatar.tsx +25 -31
- package/src/FluentTester/TestComponents/Badge/BadgeTest.tsx +11 -11
- package/src/FluentTester/TestComponents/Button/ButtonHOCTestSection.tsx +33 -17
- package/src/FluentTester/TestComponents/Button/ButtonSizeTestSection.tsx +0 -1
- package/src/FluentTester/TestComponents/Checkbox/CheckboxTest.tsx +29 -29
- package/src/FluentTester/TestComponents/CheckboxExperimental/CheckboxTest.tsx +51 -34
- package/src/FluentTester/TestComponents/CheckboxExperimental/E2ECheckboxExperimentalTest.tsx +13 -0
- package/src/FluentTester/TestComponents/CheckboxExperimental/consts.ts +2 -0
- package/src/FluentTester/TestComponents/ContextualMenu/ContextualMenuTest.tsx +3 -3
- package/src/FluentTester/TestComponents/Expander/ExpanderTest.tsx +23 -22
- package/src/FluentTester/TestComponents/MenuButton/CustomizedMenuButtonTest.tsx +12 -11
- package/src/FluentTester/TestComponents/MenuButtonExperimental/CustomizedMenuButtonTest.tsx +12 -11
- package/src/FluentTester/TestComponents/Persona/CustomizeUsage.tsx +15 -28
- package/src/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.mobile.tsx +12 -22
- package/src/FluentTester/TestComponents/PersonaCoin/CustomizeUsage.tsx +25 -31
- package/src/FluentTester/TestComponents/Shimmer/ShimmerTest.tsx +50 -10
- package/src/FluentTester/TestComponents/Text/CustomizeUsage.tsx +42 -42
- package/src/FluentTester/TestComponents/TextExperimental/CustomizeUsage.tsx +42 -42
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import NavigateAppPage from '../../../common/NavigateAppPage.win';
|
|
2
|
+
import NativeTestingPageObject from '../pages/NativeTestingPageObject.win';
|
|
3
|
+
import { PAGE_TIMEOUT, BOOT_APP_TIMEOUT } from '../../../common/consts';
|
|
4
|
+
|
|
5
|
+
describe('Native Safety Check Testing Initialization', () => {
|
|
6
|
+
it('Wait for app load', () => {
|
|
7
|
+
NavigateAppPage.waitForPageDisplayed(BOOT_APP_TIMEOUT);
|
|
8
|
+
expect(NavigateAppPage.isPageLoaded()).toBeTruthy(NavigateAppPage.ERRORMESSAGE_APPLOAD);
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
// The ScrollView in testing is the one that contains all the buttons that navigate to each component's
|
|
12
|
+
// test page. This is vital for our native testing, as we grab this ScrollView on the native side and
|
|
13
|
+
// to climb down the UI tree and find all of FURN's testable components.
|
|
14
|
+
// We need to make sure this ScrollView:
|
|
15
|
+
// 1) Continues to parent all the test buttons
|
|
16
|
+
// 2) Keeps testID='SCROLLVIEW_TEST_ID'
|
|
17
|
+
it('Validate the ScrollView containing all the navigational buttons exists', () => {
|
|
18
|
+
NativeTestingPageObject.waitForScrollViewDisplayed(PAGE_TIMEOUT);
|
|
19
|
+
expect(NativeTestingPageObject.doesScrollViewParentExist()).toBeTruthy();
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
// In addition to existing, we want to ensure the Children of the ScrollView stay intact. The children are the buttons that
|
|
23
|
+
// navigate to each test page. Validate these children exist with the proper testId format.
|
|
24
|
+
it('Validate the children of ScrollView are the buttons that navigate to each test page with proper automationId', () => {
|
|
25
|
+
NativeTestingPageObject.waitForScrollViewDisplayed(PAGE_TIMEOUT);
|
|
26
|
+
expect(NativeTestingPageObject.validateScrollViewChildren()).toBeTruthy();
|
|
27
|
+
});
|
|
28
|
+
});
|
|
@@ -44,6 +44,16 @@ const getThemedStyles = themedStyleSheet((t: Theme) => {
|
|
|
44
44
|
};
|
|
45
45
|
});
|
|
46
46
|
|
|
47
|
+
const HeaderSeparator = Separator.customize((t) => ({
|
|
48
|
+
color: t.colors.bodyFrameDivider,
|
|
49
|
+
separatorWidth: 2,
|
|
50
|
+
}));
|
|
51
|
+
|
|
52
|
+
const TestListSeparator = Separator.customize((t) => ({
|
|
53
|
+
color: t.colors.menuDivider,
|
|
54
|
+
separatorWidth: 2,
|
|
55
|
+
}));
|
|
56
|
+
|
|
47
57
|
export const FluentTester: React.FunctionComponent<FluentTesterProps> = (props: FluentTesterProps) => {
|
|
48
58
|
// sort tests alphabetically by name
|
|
49
59
|
const sortedTestComponents = props.enabledTests.sort((a, b) => a.name.localeCompare(b.name));
|
|
@@ -66,16 +76,6 @@ export const FluentTester: React.FunctionComponent<FluentTesterProps> = (props:
|
|
|
66
76
|
|
|
67
77
|
const TestComponent = selectedTestIndex == -1 ? EmptyComponent : sortedTestComponents[selectedTestIndex].component;
|
|
68
78
|
|
|
69
|
-
const HeaderSeparator = Separator.customize((t) => ({
|
|
70
|
-
color: t.colors.bodyFrameDivider,
|
|
71
|
-
separatorWidth: 2,
|
|
72
|
-
}));
|
|
73
|
-
|
|
74
|
-
const TestListSeparator = Separator.customize((t) => ({
|
|
75
|
-
color: t.colors.menuDivider,
|
|
76
|
-
separatorWidth: 2,
|
|
77
|
-
}));
|
|
78
|
-
|
|
79
79
|
const themedStyles = getThemedStyles(useTheme());
|
|
80
80
|
|
|
81
81
|
const RootView = Platform.select({
|
|
@@ -7,14 +7,30 @@ import { Test, TestSection, PlatformStatus } from '../Test';
|
|
|
7
7
|
import { ACTIVITY_INDICATOR_TESTPAGE } from './consts';
|
|
8
8
|
import { View, Switch } from 'react-native';
|
|
9
9
|
|
|
10
|
+
const basicActivityIndicator: React.FunctionComponent = () => {
|
|
11
|
+
const [animating, setAnimating] = React.useState(true);
|
|
12
|
+
const [hidesWhenStopped, setHidesWhenStopped] = React.useState(true);
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<Stack style={stackStyle}>
|
|
16
|
+
<View style={commonStyles.root}>
|
|
17
|
+
<View style={commonStyles.settings}>
|
|
18
|
+
<View style={commonStyles.switch}>
|
|
19
|
+
<Text>Animating</Text>
|
|
20
|
+
<Switch value={animating} onValueChange={setAnimating} />
|
|
21
|
+
</View>
|
|
22
|
+
<View style={commonStyles.switch}>
|
|
23
|
+
<Text>HidesWhenStopped</Text>
|
|
24
|
+
<Switch value={hidesWhenStopped} onValueChange={setHidesWhenStopped} />
|
|
25
|
+
</View>
|
|
26
|
+
</View>
|
|
27
|
+
<ActivityIndicator animating={animating} hidesWhenStopped={hidesWhenStopped} />
|
|
28
|
+
</View>
|
|
29
|
+
</Stack>
|
|
30
|
+
);
|
|
31
|
+
};
|
|
32
|
+
|
|
10
33
|
const activityIndicatorTest: React.FunctionComponent = () => {
|
|
11
|
-
/** Customize doesn't do anything
|
|
12
|
-
* Tried having tokens not be props, but didn't work
|
|
13
|
-
* Not sure how to test/check where the tokens are passed through other than just looking at the final render
|
|
14
|
-
*/
|
|
15
|
-
const CustomizedActivityIndicator = ActivityIndicator.customize({
|
|
16
|
-
activityIndicatorColor: 'orange',
|
|
17
|
-
});
|
|
18
34
|
return (
|
|
19
35
|
<Stack style={stackStyle}>
|
|
20
36
|
<Text>Extra Small</Text>
|
|
@@ -32,38 +48,27 @@ const activityIndicatorTest: React.FunctionComponent = () => {
|
|
|
32
48
|
<ActivityIndicator size="xLarge" lineThickness="large" />
|
|
33
49
|
<Text>Color props</Text>
|
|
34
50
|
<ActivityIndicator activityIndicatorColor="orange" accessibilityLabel="orange progressbar" />
|
|
35
|
-
<Text>Customized Activity Indicator (currently not working)</Text>
|
|
36
|
-
<CustomizedActivityIndicator />
|
|
37
51
|
</Stack>
|
|
38
52
|
);
|
|
39
53
|
};
|
|
40
54
|
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
55
|
+
const CustomizedActivityIndicator = ActivityIndicator.customize({
|
|
56
|
+
activityIndicatorColor: 'orange',
|
|
57
|
+
size: 'large',
|
|
58
|
+
});
|
|
44
59
|
|
|
60
|
+
const customizedActivityIndicatorTest: React.FunctionComponent = () => {
|
|
45
61
|
return (
|
|
46
62
|
<Stack style={stackStyle}>
|
|
47
|
-
<
|
|
48
|
-
|
|
49
|
-
<View style={commonStyles.switch}>
|
|
50
|
-
<Text>Animating</Text>
|
|
51
|
-
<Switch value={animating} onValueChange={setAnimating} />
|
|
52
|
-
</View>
|
|
53
|
-
<View style={commonStyles.switch}>
|
|
54
|
-
<Text>HidesWhenStopped</Text>
|
|
55
|
-
<Switch value={hidesWhenStopped} onValueChange={setHidesWhenStopped} />
|
|
56
|
-
</View>
|
|
57
|
-
</View>
|
|
58
|
-
<ActivityIndicator animating={animating} hidesWhenStopped={hidesWhenStopped} />
|
|
59
|
-
</View>
|
|
63
|
+
<Text>Customized Activity Indicator</Text>
|
|
64
|
+
<CustomizedActivityIndicator />
|
|
60
65
|
</Stack>
|
|
61
66
|
);
|
|
62
67
|
};
|
|
63
68
|
|
|
64
69
|
const activityIndicatorSections: TestSection[] = [
|
|
65
70
|
{
|
|
66
|
-
name: '
|
|
71
|
+
name: 'Base ActivityIndicator',
|
|
67
72
|
testID: ACTIVITY_INDICATOR_TESTPAGE,
|
|
68
73
|
component: basicActivityIndicator,
|
|
69
74
|
},
|
|
@@ -72,6 +77,11 @@ const activityIndicatorSections: TestSection[] = [
|
|
|
72
77
|
testID: ACTIVITY_INDICATOR_TESTPAGE,
|
|
73
78
|
component: activityIndicatorTest,
|
|
74
79
|
},
|
|
80
|
+
{
|
|
81
|
+
name: 'Customized ActivityIndicator',
|
|
82
|
+
testID: ACTIVITY_INDICATOR_TESTPAGE,
|
|
83
|
+
component: customizedActivityIndicatorTest,
|
|
84
|
+
},
|
|
75
85
|
];
|
|
76
86
|
|
|
77
87
|
export const ActivityIndicatorTest: React.FunctionComponent = () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { JSAvatar, IconAlignment
|
|
2
|
+
import { JSAvatar, IconAlignment } from '@fluentui-react-native/experimental-avatar';
|
|
3
3
|
import { Switch, View, Text, TextInput, TextStyle } from 'react-native';
|
|
4
4
|
import { Slider } from '../Common/Slider';
|
|
5
5
|
import { steveBallmerPhotoUrl } from './../PersonaCoin/styles';
|
|
@@ -29,36 +29,30 @@ export const CustomizeUsage: React.FunctionComponent = () => {
|
|
|
29
29
|
borderColor: theme.colors.inputBorder,
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
if (physicalSize) {
|
|
58
|
-
tokens.avatarSize = physicalSize;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
const CustomizedAvatar = JSAvatar.customize(tokens);
|
|
32
|
+
const CustomizedAvatar = React.useMemo(() => {
|
|
33
|
+
const tokens = {
|
|
34
|
+
backgroundColor: coinColor,
|
|
35
|
+
color: textColor,
|
|
36
|
+
horizontalIconAlignment: horizontalAlignment,
|
|
37
|
+
verticalIconAlignment: verticalAlignment,
|
|
38
|
+
iconSize: iconSize,
|
|
39
|
+
iconStrokeWidth: iconStrokeWidth,
|
|
40
|
+
iconStrokeColor: iconStrokeColor,
|
|
41
|
+
initialsSize: initialsSize,
|
|
42
|
+
avatarSize: physicalSize,
|
|
43
|
+
};
|
|
44
|
+
return JSAvatar.customize(tokens);
|
|
45
|
+
}, [
|
|
46
|
+
coinColor,
|
|
47
|
+
textColor,
|
|
48
|
+
horizontalAlignment,
|
|
49
|
+
verticalAlignment,
|
|
50
|
+
iconSize,
|
|
51
|
+
iconStrokeWidth,
|
|
52
|
+
iconStrokeColor,
|
|
53
|
+
initialsSize,
|
|
54
|
+
physicalSize,
|
|
55
|
+
]);
|
|
62
56
|
|
|
63
57
|
return (
|
|
64
58
|
<View style={commonStyles.root}>
|
|
@@ -8,6 +8,17 @@ import BadgeSvg from './oof.svg';
|
|
|
8
8
|
|
|
9
9
|
import { SvgIconProps } from '@fluentui-react-native/icon';
|
|
10
10
|
|
|
11
|
+
const BadgeNoBorder = Badge.customize({
|
|
12
|
+
borderColor: 'transparent',
|
|
13
|
+
borderWidth: 0,
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const StyledBadge = Badge.customize({
|
|
17
|
+
backgroundColor: 'yellow',
|
|
18
|
+
borderColor: '#f09',
|
|
19
|
+
borderWidth: 4,
|
|
20
|
+
});
|
|
21
|
+
|
|
11
22
|
export const BasicBadge: React.FunctionComponent = () => {
|
|
12
23
|
const svgProps: SvgIconProps = {
|
|
13
24
|
src: BadgeSvg,
|
|
@@ -20,17 +31,6 @@ export const BasicBadge: React.FunctionComponent = () => {
|
|
|
20
31
|
fontSize: 16,
|
|
21
32
|
};
|
|
22
33
|
|
|
23
|
-
const BadgeNoBorder = Badge.customize({
|
|
24
|
-
borderColor: 'transparent',
|
|
25
|
-
borderWidth: 0,
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
const StyledBadge = Badge.customize({
|
|
29
|
-
backgroundColor: 'yellow',
|
|
30
|
-
borderColor: '#f09',
|
|
31
|
-
borderWidth: 4,
|
|
32
|
-
});
|
|
33
|
-
|
|
34
34
|
const svgIconsEnabled = ['ios', 'macos', 'win32', 'android'].includes(Platform.OS as string);
|
|
35
35
|
const iconProps = { svgSource: svgProps, width: 20, height: 20 };
|
|
36
36
|
|
|
@@ -1,35 +1,51 @@
|
|
|
1
1
|
import { ButtonV1 as Button } from '@fluentui-react-native/button';
|
|
2
2
|
import { Text } from '@fluentui-react-native/experimental-text';
|
|
3
|
-
import { Icon } from '@fluentui-react-native/icon';
|
|
3
|
+
import { Icon, SvgIconProps } from '@fluentui-react-native/icon';
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
import { View } from 'react-native';
|
|
5
|
+
import { Platform, View } from 'react-native';
|
|
6
6
|
import { commonTestStyles, stackStyle } from '../Common/styles';
|
|
7
|
+
import TestSvg from './test.svg';
|
|
8
|
+
import { InteractionEvent, isGestureResponderEvent } from '@fluentui-react-native/interactive-hooks';
|
|
9
|
+
|
|
10
|
+
const CustomText = Text.customize({ fontSize: 'header', color: 'hotpink' });
|
|
11
|
+
const CustomButton = Button.customize({ backgroundColor: 'pink' });
|
|
12
|
+
const CustomIconButton = Button.customize({ iconColor: 'yellow' });
|
|
13
|
+
const ComposedButton = Button.compose({
|
|
14
|
+
slots: {
|
|
15
|
+
root: View,
|
|
16
|
+
icon: Icon,
|
|
17
|
+
content: CustomText,
|
|
18
|
+
},
|
|
19
|
+
slotProps: {
|
|
20
|
+
content: {
|
|
21
|
+
style: { marginTop: -1, marginBottom: 1, marginStart: 0, marginEnd: -2 },
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
const svgProps: SvgIconProps = {
|
|
26
|
+
src: TestSvg,
|
|
27
|
+
viewBox: '0 0 500 500',
|
|
28
|
+
};
|
|
7
29
|
|
|
8
30
|
export const ButtonHOCTest: React.FunctionComponent = () => {
|
|
9
31
|
const buttonRef = React.useRef(null);
|
|
10
|
-
const
|
|
11
|
-
const CustomButton = Button.customize({ backgroundColor: 'pink' });
|
|
12
|
-
const ComposedButton = Button.compose({
|
|
13
|
-
slots: {
|
|
14
|
-
root: View,
|
|
15
|
-
icon: Icon,
|
|
16
|
-
content: CustomText,
|
|
17
|
-
},
|
|
18
|
-
slotProps: {
|
|
19
|
-
content: {
|
|
20
|
-
style: { marginTop: -1, marginBottom: 1, marginStart: 0, marginEnd: -2 },
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
});
|
|
32
|
+
const svgIconsEnabled = ['ios', 'macos', 'win32', 'android'].includes(Platform.OS as string);
|
|
24
33
|
|
|
25
34
|
return (
|
|
26
35
|
<View style={stackStyle}>
|
|
27
36
|
<CustomButton style={commonTestStyles.vmargin} componentRef={buttonRef}>
|
|
28
37
|
Customized Button with ref
|
|
29
38
|
</CustomButton>
|
|
39
|
+
{svgIconsEnabled && <CustomIconButton icon={{ svgSource: svgProps }}>Customized Icon Button</CustomIconButton>}
|
|
30
40
|
<Button
|
|
31
41
|
style={commonTestStyles.vmargin}
|
|
32
|
-
onClick={() => {
|
|
42
|
+
onClick={(e: InteractionEvent) => {
|
|
43
|
+
console.log(e.timeStamp);
|
|
44
|
+
|
|
45
|
+
if (isGestureResponderEvent(e)) {
|
|
46
|
+
console.log('I was clicked!');
|
|
47
|
+
}
|
|
48
|
+
|
|
33
49
|
if (buttonRef.current) {
|
|
34
50
|
buttonRef.current.focus();
|
|
35
51
|
}
|
|
@@ -11,7 +11,6 @@ export const ButtonSizeTest: React.FunctionComponent = () => {
|
|
|
11
11
|
viewBox: '0 0 500 500',
|
|
12
12
|
};
|
|
13
13
|
const svgIconsEnabled = ['ios', 'macos', 'win32', 'android'].includes(Platform.OS as string);
|
|
14
|
-
|
|
15
14
|
return (
|
|
16
15
|
<View style={[stackStyle, commonTestStyles.view]}>
|
|
17
16
|
{svgIconsEnabled && (
|
|
@@ -53,41 +53,41 @@ const otherCheckbox: React.FunctionComponent = () => {
|
|
|
53
53
|
);
|
|
54
54
|
};
|
|
55
55
|
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
checkmarkColor: 'white',
|
|
67
|
-
},
|
|
56
|
+
const CircularCheckbox = Checkbox.customize({ tokens: { borderRadius: 50 } });
|
|
57
|
+
|
|
58
|
+
const CircleColorCheckbox = Checkbox.customize({
|
|
59
|
+
tokens: { borderRadius: 50, checkboxBackgroundColor: 'white' },
|
|
60
|
+
_overrides: {
|
|
61
|
+
checked: {
|
|
62
|
+
tokens: {
|
|
63
|
+
checkboxBackgroundColor: 'green',
|
|
64
|
+
checkboxBorderColor: 'green',
|
|
65
|
+
checkmarkColor: 'white',
|
|
68
66
|
},
|
|
69
|
-
focused: { tokens: { checkboxBackgroundColor: 'menuItemBackgroundHovered' } },
|
|
70
|
-
hovered: { tokens: { checkboxBackgroundColor: 'menuItemBackgroundHovered' } },
|
|
71
|
-
pressed: { tokens: { checkboxBackgroundColor: 'menuItemBackgroundPressed' } },
|
|
72
67
|
},
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
68
|
+
focused: { tokens: { checkboxBackgroundColor: 'menuItemBackgroundHovered' } },
|
|
69
|
+
hovered: { tokens: { checkboxBackgroundColor: 'menuItemBackgroundHovered' } },
|
|
70
|
+
pressed: { tokens: { checkboxBackgroundColor: 'menuItemBackgroundPressed' } },
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
const HoverCheckbox = Checkbox.customize({
|
|
75
|
+
_overrides: {
|
|
76
|
+
checked: {
|
|
77
|
+
tokens: {
|
|
78
|
+
checkboxBackgroundColor: 'black',
|
|
79
|
+
checkmarkColor: 'white',
|
|
82
80
|
},
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
81
|
+
},
|
|
82
|
+
hovered: {
|
|
83
|
+
tokens: {
|
|
84
|
+
checkmarkVisibility: 1,
|
|
87
85
|
},
|
|
88
86
|
},
|
|
89
|
-
}
|
|
87
|
+
},
|
|
88
|
+
});
|
|
90
89
|
|
|
90
|
+
const tokenCheckbox: React.FunctionComponent = () => {
|
|
91
91
|
const [checkboxColor, setCheckboxColor] = React.useState('blue');
|
|
92
92
|
const [checkmarkColor, setCheckmarkColor] = React.useState('white');
|
|
93
93
|
|
|
@@ -6,8 +6,9 @@ import { useTheme } from '@fluentui-react-native/theme-types';
|
|
|
6
6
|
import { View, TextInput, TextStyle } from 'react-native';
|
|
7
7
|
import { commonTestStyles as commonStyles } from '../Common/styles';
|
|
8
8
|
import { E2ECheckboxExperimentalTest } from './E2ECheckboxExperimentalTest';
|
|
9
|
+
import { InteractionEvent } from '@fluentui-react-native/interactive-hooks';
|
|
9
10
|
|
|
10
|
-
function onChangeUncontrolled(isChecked: boolean) {
|
|
11
|
+
function onChangeUncontrolled(_e: InteractionEvent, isChecked: boolean) {
|
|
11
12
|
console.log(isChecked);
|
|
12
13
|
}
|
|
13
14
|
|
|
@@ -16,16 +17,23 @@ const basicCheckbox: React.FunctionComponent = () => {
|
|
|
16
17
|
<View>
|
|
17
18
|
<Checkbox label="Unchecked checkbox (undefined)" onChange={onChangeUncontrolled} />
|
|
18
19
|
<Checkbox label="Unchecked checkbox (uncontrolled)" onChange={onChangeUncontrolled} defaultChecked={false} />
|
|
19
|
-
<Checkbox
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
/>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
20
|
+
<Checkbox label="Checked checkbox (uncontrolled)" onChange={onChangeUncontrolled} defaultChecked accessibilityLabel="Hello there" />
|
|
21
|
+
<Checkbox label="Disabled checkbox" disabled />
|
|
22
|
+
<Checkbox label="Disabled checked checkbox" defaultChecked disabled />
|
|
23
|
+
<Checkbox label="Checkbox will display a tooltip" tooltip="This is a tooltip" />
|
|
24
|
+
<Checkbox label="A circular checkbox" shape="circular" />
|
|
25
|
+
<Checkbox label="A checkbox with label placed before" labelPosition="before" />
|
|
26
|
+
</View>
|
|
27
|
+
);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const sizeCheckbox: React.FunctionComponent = () => {
|
|
31
|
+
return (
|
|
32
|
+
<View>
|
|
33
|
+
<Checkbox tooltip="Medium checkbox" size="medium" />
|
|
34
|
+
<Checkbox tooltip="Large checkbox" size="large" />
|
|
35
|
+
<Checkbox label="Medium checkbox" size="medium" />
|
|
36
|
+
<Checkbox label="Large checkbox" size="large" />
|
|
29
37
|
</View>
|
|
30
38
|
);
|
|
31
39
|
};
|
|
@@ -54,29 +62,29 @@ const otherCheckbox: React.FunctionComponent = () => {
|
|
|
54
62
|
);
|
|
55
63
|
};
|
|
56
64
|
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
});
|
|
65
|
+
const CircleColorCheckbox = Checkbox.customize({
|
|
66
|
+
checkboxBackgroundColor: 'white',
|
|
67
|
+
checked: {
|
|
68
|
+
checkboxBackgroundColor: 'green',
|
|
69
|
+
checkboxBorderColor: 'green',
|
|
70
|
+
checkmarkColor: 'white',
|
|
71
|
+
},
|
|
72
|
+
focused: { checkboxBackgroundColor: 'menuItemBackgroundHovered' },
|
|
73
|
+
hovered: { checkboxBackgroundColor: 'menuItemBackgroundHovered' },
|
|
74
|
+
pressed: { checkboxBackgroundColor: 'menuItemBackgroundPressed' },
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
const HoverCheckbox = Checkbox.customize({
|
|
78
|
+
checked: {
|
|
79
|
+
checkboxBackgroundColor: 'black',
|
|
80
|
+
checkmarkColor: 'white',
|
|
81
|
+
},
|
|
82
|
+
hovered: {
|
|
83
|
+
checkmarkOpacity: 1,
|
|
84
|
+
},
|
|
85
|
+
});
|
|
79
86
|
|
|
87
|
+
const tokenCheckbox: React.FunctionComponent = () => {
|
|
80
88
|
const [checkboxColor, setCheckboxColor] = React.useState('blue');
|
|
81
89
|
const [checkmarkColor, setCheckmarkColor] = React.useState('white');
|
|
82
90
|
|
|
@@ -99,7 +107,12 @@ const tokenCheckbox: React.FunctionComponent = () => {
|
|
|
99
107
|
return (
|
|
100
108
|
<View>
|
|
101
109
|
<HoverCheckbox label="A checkbox with checkmark visible on hover" onChange={onChangeUncontrolled} defaultChecked={false} />
|
|
102
|
-
<CircleColorCheckbox
|
|
110
|
+
<CircleColorCheckbox
|
|
111
|
+
label="A circular token-customized checkbox"
|
|
112
|
+
shape="circular"
|
|
113
|
+
onChange={onChangeUncontrolled}
|
|
114
|
+
defaultChecked={true}
|
|
115
|
+
/>
|
|
103
116
|
<BlueCheckbox
|
|
104
117
|
label="Token-customized checkbox. Customizable below."
|
|
105
118
|
onChange={onChangeUncontrolled}
|
|
@@ -134,6 +147,10 @@ const checkboxSections: TestSection[] = [
|
|
|
134
147
|
testID: EXPERIMENTAL_CHECKBOX_TESTPAGE,
|
|
135
148
|
component: basicCheckbox,
|
|
136
149
|
},
|
|
150
|
+
{
|
|
151
|
+
name: 'Size Checkboxes',
|
|
152
|
+
component: sizeCheckbox,
|
|
153
|
+
},
|
|
137
154
|
{
|
|
138
155
|
name: 'Other Implementations',
|
|
139
156
|
component: otherCheckbox,
|
package/src/FluentTester/TestComponents/CheckboxExperimental/E2ECheckboxExperimentalTest.tsx
CHANGED
|
@@ -7,10 +7,21 @@ import {
|
|
|
7
7
|
EXPERIMENTAL_CHECKBOX_ACCESSIBILITY_LABEL,
|
|
8
8
|
EXPERIMENTAL_CHECKBOX_NO_A11Y_LABEL_COMPONENT,
|
|
9
9
|
EXPERIMENTAL_CHECKBOX_TEST_COMPONENT_LABEL,
|
|
10
|
+
EXPERIMENTAL_CHECKBOX_ON_PRESS,
|
|
10
11
|
} from './consts';
|
|
11
12
|
import { Stack } from '@fluentui-react-native/stack';
|
|
13
|
+
import { Text } from '@fluentui/react-native';
|
|
12
14
|
|
|
13
15
|
export const E2ECheckboxExperimentalTest: React.FunctionComponent = () => {
|
|
16
|
+
const [checkboxPressed, setCheckboxPressed] = React.useState(false);
|
|
17
|
+
|
|
18
|
+
const onClick = React.useCallback(
|
|
19
|
+
(_e, checked) => {
|
|
20
|
+
setCheckboxPressed(checked);
|
|
21
|
+
},
|
|
22
|
+
[setCheckboxPressed],
|
|
23
|
+
);
|
|
24
|
+
|
|
14
25
|
return (
|
|
15
26
|
<View>
|
|
16
27
|
<Stack style={stackStyle}>
|
|
@@ -19,8 +30,10 @@ export const E2ECheckboxExperimentalTest: React.FunctionComponent = () => {
|
|
|
19
30
|
disabled={false}
|
|
20
31
|
label="Testing accessibilityLabel"
|
|
21
32
|
testID={EXPERIMENTAL_CHECKBOX_TEST_COMPONENT}
|
|
33
|
+
onChange={onClick}
|
|
22
34
|
/>
|
|
23
35
|
<Checkbox label={EXPERIMENTAL_CHECKBOX_TEST_COMPONENT_LABEL} testID={EXPERIMENTAL_CHECKBOX_NO_A11Y_LABEL_COMPONENT} />
|
|
36
|
+
{checkboxPressed ? <Text testID={EXPERIMENTAL_CHECKBOX_ON_PRESS}>Checkbox Selected</Text> : null}
|
|
24
37
|
</Stack>
|
|
25
38
|
</View>
|
|
26
39
|
);
|
|
@@ -8,3 +8,5 @@ export const EXPERIMENTAL_CHECKBOX_ACCESSIBILITY_LABEL = 'E2E testing Experiment
|
|
|
8
8
|
/* Test Experimental Checkbox 2 */
|
|
9
9
|
export const EXPERIMENTAL_CHECKBOX_NO_A11Y_LABEL_COMPONENT = 'Experimental Checkbox_No_A11y_label_Component';
|
|
10
10
|
export const EXPERIMENTAL_CHECKBOX_TEST_COMPONENT_LABEL = 'Test Experimental Checkbox2 - No Accessibility Label'; // A component on each specific test page
|
|
11
|
+
|
|
12
|
+
export const EXPERIMENTAL_CHECKBOX_ON_PRESS = 'Experimental_Checkbox_On_Press'; // For testing the press functionality on a Checkbox
|
|
@@ -232,6 +232,9 @@ const nestedContextualMenu: React.FunctionComponent = () => {
|
|
|
232
232
|
);
|
|
233
233
|
};
|
|
234
234
|
|
|
235
|
+
// custom text
|
|
236
|
+
const IndigoHeroBold = FURNText.customize({ tokens: { variant: 'heroStandard', fontWeight: '100', color: '#4b0082' } });
|
|
237
|
+
|
|
235
238
|
const IconContextualMenu: React.FunctionComponent = () => {
|
|
236
239
|
const stdBtnRef = React.useRef(null);
|
|
237
240
|
|
|
@@ -258,9 +261,6 @@ const IconContextualMenu: React.FunctionComponent = () => {
|
|
|
258
261
|
setIsContextualMenuVisible(false);
|
|
259
262
|
}, [setShowContextualMenu]);
|
|
260
263
|
|
|
261
|
-
// custom text
|
|
262
|
-
const IndigoHeroBold = FURNText.customize({ tokens: { variant: 'heroStandard', fontWeight: '100', color: '#4b0082' } });
|
|
263
|
-
|
|
264
264
|
return (
|
|
265
265
|
<View>
|
|
266
266
|
<View style={{ flexDirection: 'row', paddingVertical: 5 }}>
|
|
@@ -7,33 +7,34 @@ import { Test, TestSection, PlatformStatus } from '../Test';
|
|
|
7
7
|
import { EXPANDER_TESTPAGE } from './consts';
|
|
8
8
|
import { View, Switch } from 'react-native';
|
|
9
9
|
|
|
10
|
+
const CustomizedExpander = Expander.customize({
|
|
11
|
+
headerBackground: '#9c9c9c',
|
|
12
|
+
headerForeground: '#ffffff',
|
|
13
|
+
contentBackground: '#c3c3c3',
|
|
14
|
+
chevronBackground: '#ff7f7f',
|
|
15
|
+
chevronForeground: '#ffffff',
|
|
16
|
+
chevronPointerOverBackground: '#b5ffb2',
|
|
17
|
+
chevronPointerOverForeground: '#bfbdbd',
|
|
18
|
+
chevronPressedBackground: '#ffb2f4',
|
|
19
|
+
chevronPressedForeground: '#912a2a',
|
|
20
|
+
headerForegroundPointerOver: '#27f238',
|
|
21
|
+
headerForegroundPressed: '#f227eb',
|
|
22
|
+
headerBorderBrush: '#f22727',
|
|
23
|
+
headerBorderPointerOverBrush: '#27f238',
|
|
24
|
+
headerBorderPressedBrush: '#f227eb',
|
|
25
|
+
contentBorderBrush: '#f227eb',
|
|
26
|
+
headerBorderThickness: 2,
|
|
27
|
+
chevronBorderBrush: '#f22727',
|
|
28
|
+
chevronBorderPointerOverBrush: '#27f238',
|
|
29
|
+
chevronBorderPressedBrush: '#f227eb',
|
|
30
|
+
chevronBorderThickness: 2,
|
|
31
|
+
});
|
|
32
|
+
|
|
10
33
|
const expanderTest: React.FunctionComponent = () => {
|
|
11
34
|
/** This test page has not yet been tested and does not currently build because
|
|
12
35
|
* the react-native-test-app does not yet support WinUI 2.6
|
|
13
36
|
* Filed issue in react-native-test-app: https://github.com/microsoft/react-native-test-app/issues/444
|
|
14
37
|
*/
|
|
15
|
-
const CustomizedExpander = Expander.customize({
|
|
16
|
-
headerBackground: '#9c9c9c',
|
|
17
|
-
headerForeground: '#ffffff',
|
|
18
|
-
contentBackground: '#c3c3c3',
|
|
19
|
-
chevronBackground: '#ff7f7f',
|
|
20
|
-
chevronForeground: '#ffffff',
|
|
21
|
-
chevronPointerOverBackground: '#b5ffb2',
|
|
22
|
-
chevronPointerOverForeground: '#bfbdbd',
|
|
23
|
-
chevronPressedBackground: '#ffb2f4',
|
|
24
|
-
chevronPressedForeground: '#912a2a',
|
|
25
|
-
headerForegroundPointerOver: '#27f238',
|
|
26
|
-
headerForegroundPressed: '#f227eb',
|
|
27
|
-
headerBorderBrush: '#f22727',
|
|
28
|
-
headerBorderPointerOverBrush: '#27f238',
|
|
29
|
-
headerBorderPressedBrush: '#f227eb',
|
|
30
|
-
contentBorderBrush: '#f227eb',
|
|
31
|
-
headerBorderThickness: 2,
|
|
32
|
-
chevronBorderBrush: '#f22727',
|
|
33
|
-
chevronBorderPointerOverBrush: '#27f238',
|
|
34
|
-
chevronBorderPressedBrush: '#f227eb',
|
|
35
|
-
chevronBorderThickness: 2,
|
|
36
|
-
});
|
|
37
38
|
|
|
38
39
|
const [switchValue, setSwitchValue] = React.useState(false);
|
|
39
40
|
const [expanderText, setExpanderText] = React.useState('Initial state');
|