@fluentui-react-native/tester 0.131.1 → 0.133.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 +247 -1
- package/CHANGELOG.md +54 -2
- package/lib/E2E/src/Spinner/consts.d.ts +4 -0
- package/lib/E2E/src/Spinner/consts.d.ts.map +1 -0
- package/lib/E2E/src/Spinner/consts.js +5 -0
- package/lib/E2E/src/Spinner/consts.js.map +1 -0
- package/lib/E2E/src/index.consts.d.ts +1 -0
- package/lib/E2E/src/index.consts.d.ts.map +1 -1
- package/lib/E2E/src/index.consts.js +1 -0
- package/lib/E2E/src/index.consts.js.map +1 -1
- package/lib/fluent-tester/src/TestComponents/Divider/DividerTest.d.ts +7 -0
- package/lib/fluent-tester/src/TestComponents/Divider/DividerTest.d.ts.map +1 -0
- package/lib/fluent-tester/src/TestComponents/Divider/DividerTest.js +85 -0
- package/lib/fluent-tester/src/TestComponents/Divider/DividerTest.js.map +1 -0
- package/lib/fluent-tester/src/TestComponents/Divider/consts.d.ts +3 -0
- package/lib/fluent-tester/src/TestComponents/Divider/consts.d.ts.map +1 -0
- package/lib/fluent-tester/src/TestComponents/Divider/consts.js +3 -0
- package/lib/fluent-tester/src/TestComponents/Divider/consts.js.map +1 -0
- package/lib/fluent-tester/src/TestComponents/Divider/index.d.ts +3 -0
- package/lib/fluent-tester/src/TestComponents/Divider/index.d.ts.map +1 -0
- package/lib/fluent-tester/src/TestComponents/Divider/index.js +3 -0
- package/lib/fluent-tester/src/TestComponents/Divider/index.js.map +1 -0
- package/lib/fluent-tester/src/TestComponents/Spinner/SpinnerE2ETest.d.ts +3 -0
- package/lib/fluent-tester/src/TestComponents/Spinner/SpinnerE2ETest.d.ts.map +1 -0
- package/lib/fluent-tester/src/TestComponents/Spinner/SpinnerE2ETest.js +12 -0
- package/lib/fluent-tester/src/TestComponents/Spinner/SpinnerE2ETest.js.map +1 -0
- package/lib/fluent-tester/src/TestComponents/Spinner/SpinnerTest.d.ts +3 -0
- package/lib/fluent-tester/src/TestComponents/Spinner/SpinnerTest.d.ts.map +1 -0
- package/lib/fluent-tester/src/TestComponents/Spinner/SpinnerTest.js +79 -0
- package/lib/fluent-tester/src/TestComponents/Spinner/SpinnerTest.js.map +1 -0
- package/lib/fluent-tester/src/TestComponents/Spinner/index.d.ts +2 -0
- package/lib/fluent-tester/src/TestComponents/Spinner/index.d.ts.map +1 -0
- package/lib/fluent-tester/src/TestComponents/Spinner/index.js +2 -0
- package/lib/fluent-tester/src/TestComponents/Spinner/index.js.map +1 -0
- package/lib/fluent-tester/src/testPages.d.ts.map +1 -1
- package/lib/fluent-tester/src/testPages.js +14 -0
- package/lib/fluent-tester/src/testPages.js.map +1 -1
- package/lib-commonjs/E2E/src/Spinner/consts.d.ts +4 -0
- package/lib-commonjs/E2E/src/Spinner/consts.d.ts.map +1 -0
- package/lib-commonjs/E2E/src/Spinner/consts.js +8 -0
- package/lib-commonjs/E2E/src/Spinner/consts.js.map +1 -0
- package/lib-commonjs/E2E/src/index.consts.d.ts +1 -0
- package/lib-commonjs/E2E/src/index.consts.d.ts.map +1 -1
- package/lib-commonjs/E2E/src/index.consts.js +1 -0
- package/lib-commonjs/E2E/src/index.consts.js.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/Divider/DividerTest.d.ts +7 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/Divider/DividerTest.d.ts.map +1 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/Divider/DividerTest.js +94 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/Divider/DividerTest.js.map +1 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/Divider/consts.d.ts +3 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/Divider/consts.d.ts.map +1 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/Divider/consts.js +6 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/Divider/consts.js.map +1 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/Divider/index.d.ts +3 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/Divider/index.d.ts.map +1 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/Divider/index.js +6 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/Divider/index.js.map +1 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/Spinner/SpinnerE2ETest.d.ts +3 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/Spinner/SpinnerE2ETest.d.ts.map +1 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/Spinner/SpinnerE2ETest.js +16 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/Spinner/SpinnerE2ETest.js.map +1 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/Spinner/SpinnerTest.d.ts +3 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/Spinner/SpinnerTest.d.ts.map +1 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/Spinner/SpinnerTest.js +83 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/Spinner/SpinnerTest.js.map +1 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/Spinner/index.d.ts +2 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/Spinner/index.d.ts.map +1 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/Spinner/index.js +5 -0
- package/lib-commonjs/fluent-tester/src/TestComponents/Spinner/index.js.map +1 -0
- package/lib-commonjs/fluent-tester/src/testPages.d.ts.map +1 -1
- package/lib-commonjs/fluent-tester/src/testPages.js +14 -0
- package/lib-commonjs/fluent-tester/src/testPages.js.map +1 -1
- package/package.json +35 -33
- package/src/TestComponents/Divider/DividerTest.tsx +116 -0
- package/src/TestComponents/Divider/consts.ts +2 -0
- package/src/TestComponents/Divider/index.ts +2 -0
- package/src/TestComponents/Spinner/SpinnerE2ETest.tsx +18 -0
- package/src/TestComponents/Spinner/SpinnerTest.tsx +103 -0
- package/src/TestComponents/Spinner/index.ts +1 -0
- package/src/testPages.ts +14 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-react-native/tester",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.133.0",
|
|
4
4
|
"description": "A test app to test FluentUI React Native Components during development",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Microsoft <fluentuinativeowners@microsoft.com>",
|
|
@@ -33,49 +33,51 @@
|
|
|
33
33
|
"directory": "apps/fluent-tester"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@fluentui-react-native/android-theme": ">=0.16.
|
|
37
|
-
"@fluentui-react-native/apple-theme": ">=0.18.
|
|
38
|
-
"@fluentui-react-native/avatar": "^1.6.
|
|
39
|
-
"@fluentui-react-native/badge": ">=0.4.
|
|
40
|
-
"@fluentui-react-native/button": ">=0.32.
|
|
41
|
-
"@fluentui-react-native/default-theme": ">=0.17.
|
|
42
|
-
"@fluentui-react-native/
|
|
43
|
-
"@fluentui-react-native/
|
|
44
|
-
"@fluentui-react-native/experimental-
|
|
45
|
-
"@fluentui-react-native/experimental-
|
|
46
|
-
"@fluentui-react-native/experimental-
|
|
47
|
-
"@fluentui-react-native/experimental-
|
|
48
|
-
"@fluentui-react-native/experimental-
|
|
49
|
-
"@fluentui-react-native/experimental-
|
|
36
|
+
"@fluentui-react-native/android-theme": ">=0.16.6 <1.0.0",
|
|
37
|
+
"@fluentui-react-native/apple-theme": ">=0.18.11 <1.0.0",
|
|
38
|
+
"@fluentui-react-native/avatar": "^1.6.5",
|
|
39
|
+
"@fluentui-react-native/badge": ">=0.4.26 <1.0.0",
|
|
40
|
+
"@fluentui-react-native/button": ">=0.32.31 <1.0.0",
|
|
41
|
+
"@fluentui-react-native/default-theme": ">=0.17.1 <1.0.0",
|
|
42
|
+
"@fluentui-react-native/divider": "^0.2.0",
|
|
43
|
+
"@fluentui-react-native/dropdown": ">=0.7.28 <1.0.0",
|
|
44
|
+
"@fluentui-react-native/experimental-activity-indicator": ">=0.7.18 <1.0.0",
|
|
45
|
+
"@fluentui-react-native/experimental-appearance-additions": "^0.3.1",
|
|
46
|
+
"@fluentui-react-native/experimental-avatar": ">=0.17.15 <1.0.0",
|
|
47
|
+
"@fluentui-react-native/experimental-button": "0.16.89",
|
|
48
|
+
"@fluentui-react-native/experimental-checkbox": "0.13.37",
|
|
49
|
+
"@fluentui-react-native/experimental-expander": "0.5.18",
|
|
50
|
+
"@fluentui-react-native/experimental-menu-button": ">=0.6.30 <1.0.0",
|
|
50
51
|
"@fluentui-react-native/experimental-native-date-picker": ">=0.7.5 <1.0.0",
|
|
51
|
-
"@fluentui-react-native/experimental-radio-group": "^0.9.
|
|
52
|
-
"@fluentui-react-native/experimental-shadow": "0.2.
|
|
53
|
-
"@fluentui-react-native/experimental-shimmer": "0.8.
|
|
54
|
-
"@fluentui-react-native/experimental-tabs": "0.8.
|
|
55
|
-
"@fluentui-react-native/experimental-text": ">=0.11.
|
|
56
|
-
"@fluentui-react-native/framework": ">=0.9.
|
|
57
|
-
"@fluentui-react-native/icon": "0.17.
|
|
58
|
-
"@fluentui-react-native/interactive-hooks": ">=0.22.
|
|
59
|
-
"@fluentui-react-native/menu": "^1.4.
|
|
52
|
+
"@fluentui-react-native/experimental-radio-group": "^0.9.18",
|
|
53
|
+
"@fluentui-react-native/experimental-shadow": "0.2.67",
|
|
54
|
+
"@fluentui-react-native/experimental-shimmer": "0.8.19",
|
|
55
|
+
"@fluentui-react-native/experimental-tabs": "0.8.32",
|
|
56
|
+
"@fluentui-react-native/experimental-text": ">=0.11.51 <1.0.0",
|
|
57
|
+
"@fluentui-react-native/framework": ">=0.9.1 <1.0.0",
|
|
58
|
+
"@fluentui-react-native/icon": "0.17.12",
|
|
59
|
+
"@fluentui-react-native/interactive-hooks": ">=0.22.18 <1.0.0",
|
|
60
|
+
"@fluentui-react-native/menu": "^1.4.1",
|
|
60
61
|
"@fluentui-react-native/merge-props": ">=0.5.2 <1.0.0",
|
|
61
|
-
"@fluentui-react-native/notification": "0.21.
|
|
62
|
-
"@fluentui-react-native/separator": "^0.14.
|
|
63
|
-
"@fluentui-react-native/stack": ">=0.7.
|
|
64
|
-
"@fluentui-react-native/switch": "^0.8.
|
|
65
|
-
"@fluentui-react-native/text": ">=0.19.
|
|
62
|
+
"@fluentui-react-native/notification": "0.21.31",
|
|
63
|
+
"@fluentui-react-native/separator": "^0.14.15",
|
|
64
|
+
"@fluentui-react-native/stack": ">=0.7.52 <1.0.0",
|
|
65
|
+
"@fluentui-react-native/switch": "^0.8.25",
|
|
66
|
+
"@fluentui-react-native/text": ">=0.19.20 <1.0.0",
|
|
66
67
|
"@fluentui-react-native/theme": ">=0.8.0 <1.0.0",
|
|
67
68
|
"@fluentui-react-native/theme-tokens": "^0.24.2",
|
|
68
69
|
"@fluentui-react-native/theme-types": ">=0.30.2 <1.0.0",
|
|
69
70
|
"@fluentui-react-native/themed-stylesheet": "^1.4.2",
|
|
70
|
-
"@fluentui-react-native/theming-utils": ">=0.23.
|
|
71
|
-
"@fluentui-react-native/win32-theme": ">=0.25.
|
|
72
|
-
"@fluentui/react-native": ">=0.
|
|
71
|
+
"@fluentui-react-native/theming-utils": ">=0.23.3 <1.0.0",
|
|
72
|
+
"@fluentui-react-native/win32-theme": ">=0.25.1 <1.0.0",
|
|
73
|
+
"@fluentui/react-native": ">=0.36.1 <1.0.0",
|
|
73
74
|
"@fortawesome/fontawesome-svg-core": "^6.2.0",
|
|
74
75
|
"@fortawesome/free-solid-svg-icons": "^6.2.0",
|
|
75
76
|
"@fortawesome/react-native-fontawesome": "^0.3.0",
|
|
76
77
|
"@react-native-community/slider": "^4.2.0",
|
|
77
78
|
"@react-native-menu/menu": "^0.1.2",
|
|
78
79
|
"@react-native-picker/picker": "^2.2.1",
|
|
80
|
+
"@fluentui-react-native/spinner": "^0.2.1",
|
|
79
81
|
"@warren-ms/react-native-icons": "^0.0.13",
|
|
80
82
|
"react": "17.0.2",
|
|
81
83
|
"react-native": "^0.68.0",
|
|
@@ -88,7 +90,7 @@
|
|
|
88
90
|
"@babel/core": "^7.8.0",
|
|
89
91
|
"@babel/runtime": "^7.8.0",
|
|
90
92
|
"@fluentui-react-native/eslint-config-rules": "^0.1.1",
|
|
91
|
-
"@fluentui-react-native/focus-zone": "^0.11.
|
|
93
|
+
"@fluentui-react-native/focus-zone": "^0.11.30",
|
|
92
94
|
"@fluentui-react-native/scripts": "^0.1.1",
|
|
93
95
|
"@rnx-kit/cli": "^0.16.2",
|
|
94
96
|
"@rnx-kit/metro-config": "^1.3.1",
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Platform, StyleSheet, View } from 'react-native';
|
|
3
|
+
import { Divider } from '@fluentui-react-native/divider';
|
|
4
|
+
import { Stack } from '@fluentui-react-native/stack';
|
|
5
|
+
import { TextV1 as Text } from '@fluentui-react-native/text';
|
|
6
|
+
import { DIVIDER_TESTPAGE } from './consts';
|
|
7
|
+
import { Test } from '../Test';
|
|
8
|
+
import type { TestSection, PlatformStatus } from '../Test';
|
|
9
|
+
import { commonTestStyles } from '../Common/styles';
|
|
10
|
+
import TestSvg from '../../../assets/test.svg';
|
|
11
|
+
|
|
12
|
+
const CustomDivider = Divider.customize({ thickness: 3, paddingVertical: 4 });
|
|
13
|
+
const CustomText = Text.customize({ margin: 8 });
|
|
14
|
+
|
|
15
|
+
const RedDivider = Divider.customize({ contentColor: 'red', lineColor: 'red' });
|
|
16
|
+
|
|
17
|
+
const dividerTestStyles = StyleSheet.create({
|
|
18
|
+
verticalDividerContainer: {
|
|
19
|
+
marginVertical: 8,
|
|
20
|
+
flexDirection: 'row',
|
|
21
|
+
justifyContent: 'space-evenly',
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
export const HorizontalDividers: React.FunctionComponent = () => (
|
|
26
|
+
<Stack style={commonTestStyles.stack}>
|
|
27
|
+
<CustomText>Regular divider with no content below.</CustomText>
|
|
28
|
+
<Divider />
|
|
29
|
+
<CustomText>Regular divider with no content above.</CustomText>
|
|
30
|
+
<Divider>Divider with text content.</Divider>
|
|
31
|
+
<Divider insetSize={16}>Colored divider with text + inset.</Divider>
|
|
32
|
+
<CustomDivider alignContent="start">I am a start-aligned divider with a thickness = 3</CustomDivider>
|
|
33
|
+
<CustomDivider alignContent="end">I am a end-aligned divider with a thickness = 3</CustomDivider>
|
|
34
|
+
</Stack>
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
export const VerticalDividers: React.FunctionComponent = () => (
|
|
38
|
+
<Stack style={commonTestStyles.stack}>
|
|
39
|
+
<View style={dividerTestStyles.verticalDividerContainer}>
|
|
40
|
+
<CustomText>Regular divider {'->'}</CustomText>
|
|
41
|
+
<Divider vertical />
|
|
42
|
+
<CustomText>Divider with an inset {'->'}</CustomText>
|
|
43
|
+
<Divider vertical insetSize={16} />
|
|
44
|
+
<CustomDivider vertical>Thick divider with text</CustomDivider>
|
|
45
|
+
<RedDivider vertical alignContent="start">
|
|
46
|
+
Start-aligned divider
|
|
47
|
+
</RedDivider>
|
|
48
|
+
<Divider vertical alignContent="end">
|
|
49
|
+
End-aligned divider
|
|
50
|
+
</Divider>
|
|
51
|
+
</View>
|
|
52
|
+
<Divider />
|
|
53
|
+
<View style={dividerTestStyles.verticalDividerContainer}>
|
|
54
|
+
<CustomText>The divider to the right of me should have a min height of 24px</CustomText>
|
|
55
|
+
<Divider vertical />
|
|
56
|
+
<CustomText>The divider to the left of me should have a min height of 24px</CustomText>
|
|
57
|
+
</View>
|
|
58
|
+
</Stack>
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
export const DividersWithAppearance: React.FunctionComponent = () => (
|
|
62
|
+
<Stack style={commonTestStyles.stack}>
|
|
63
|
+
<CustomDivider appearance="default">Default divider</CustomDivider>
|
|
64
|
+
<CustomDivider appearance="subtle">Subtle divider</CustomDivider>
|
|
65
|
+
<CustomDivider appearance="brand">Branded divider</CustomDivider>
|
|
66
|
+
<CustomDivider appearance="strong">Strong divider</CustomDivider>
|
|
67
|
+
</Stack>
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
export const DividersWithIcons: React.FunctionComponent = () => (
|
|
71
|
+
<Stack style={commonTestStyles.stack}>
|
|
72
|
+
<Divider appearance="brand" icon={{ fontSource: { fontFamily: 'Arial', codepoint: 0x2663, fontSize: 32 } }} />
|
|
73
|
+
<CustomText align="center">
|
|
74
|
+
Above is a branded Divider with a font icon as content. Below me is a branded divider with an svg icon as content - this will not show
|
|
75
|
+
on UWP.
|
|
76
|
+
</CustomText>
|
|
77
|
+
{Platform.OS !== 'windows' && (
|
|
78
|
+
<Divider appearance="brand" icon={{ svgSource: { viewBox: '0 0 500 500', src: TestSvg, width: 32, height: 32 } }} />
|
|
79
|
+
)}
|
|
80
|
+
</Stack>
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
const dividerSections: TestSection[] = [
|
|
84
|
+
{
|
|
85
|
+
name: 'Horizontal Dividers',
|
|
86
|
+
testID: DIVIDER_TESTPAGE,
|
|
87
|
+
component: HorizontalDividers,
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: 'Vertical Dividers',
|
|
91
|
+
component: VerticalDividers,
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
name: 'Divider Appearances',
|
|
95
|
+
component: DividersWithAppearance,
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
name: 'Dividers with Icons',
|
|
99
|
+
component: DividersWithIcons,
|
|
100
|
+
},
|
|
101
|
+
];
|
|
102
|
+
|
|
103
|
+
export const DividerTest: React.FunctionComponent = () => {
|
|
104
|
+
const status: PlatformStatus = {
|
|
105
|
+
win32Status: 'Experimental',
|
|
106
|
+
uwpStatus: 'Backlog',
|
|
107
|
+
iosStatus: 'Backlog',
|
|
108
|
+
macosStatus: 'Backlog',
|
|
109
|
+
androidStatus: 'Backlog',
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
const description =
|
|
113
|
+
'A Divider is a visual separator that can contain content (text or an icon). Dividers can be horizontal or vertical. As of now, the component is being designed for win32 only.';
|
|
114
|
+
|
|
115
|
+
return <Test name="Divider Test" description={description} sections={dividerSections} status={status}></Test>;
|
|
116
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Spinner } from '@fluentui-react-native/spinner';
|
|
3
|
+
import { Stack } from '@fluentui-react-native/stack';
|
|
4
|
+
import { stackStyle } from '../Common/styles';
|
|
5
|
+
import { testProps } from '../Common/TestProps';
|
|
6
|
+
import { SPINNER_TEST_COMPONENT } from '../../../../E2E/src/Spinner/consts';
|
|
7
|
+
|
|
8
|
+
export const E2ETestingSpinner: React.FunctionComponent<Record<string, never>> = () => {
|
|
9
|
+
return (
|
|
10
|
+
<Stack style={stackStyle}>
|
|
11
|
+
<Spinner
|
|
12
|
+
size="large"
|
|
13
|
+
/* For Android E2E testing purposes, testProps must be passed in after accessibilityLabel. */
|
|
14
|
+
{...testProps(SPINNER_TEST_COMPONENT)}
|
|
15
|
+
/>
|
|
16
|
+
</Stack>
|
|
17
|
+
);
|
|
18
|
+
};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Text, TextV1 } from '@fluentui-react-native/text';
|
|
3
|
+
import { Stack } from '@fluentui-react-native/stack';
|
|
4
|
+
import { stackStyle, commonTestStyles as commonStyles, commonTestStyles } from '../Common/styles';
|
|
5
|
+
import type { TestSection, PlatformStatus } from '../Test';
|
|
6
|
+
import { Test } from '../Test';
|
|
7
|
+
import { SPINNER_TESTPAGE } from '../../../../E2E/src/Spinner/consts';
|
|
8
|
+
import { View, Switch } from 'react-native';
|
|
9
|
+
import { Spinner } from '@fluentui-react-native/spinner';
|
|
10
|
+
import { E2ETestingSpinner } from './SpinnerE2ETest';
|
|
11
|
+
|
|
12
|
+
const BasicSpinnerTest: React.FunctionComponent = () => {
|
|
13
|
+
const [animating, setAnimating] = React.useState(true);
|
|
14
|
+
const [hidesWhenStopped, setHidesWhenStopped] = React.useState(true);
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<Stack style={stackStyle}>
|
|
18
|
+
<View style={commonStyles.root}>
|
|
19
|
+
<View style={commonStyles.settings}>
|
|
20
|
+
<View style={commonStyles.switch}>
|
|
21
|
+
<Text>Animating</Text>
|
|
22
|
+
<Switch value={animating} onValueChange={setAnimating} />
|
|
23
|
+
</View>
|
|
24
|
+
<View style={commonStyles.switch}>
|
|
25
|
+
<Text>HidesWhenStopped</Text>
|
|
26
|
+
<Switch value={hidesWhenStopped} onValueChange={setHidesWhenStopped} />
|
|
27
|
+
</View>
|
|
28
|
+
</View>
|
|
29
|
+
<Spinner animating={animating} hidesWhenStopped={hidesWhenStopped} />
|
|
30
|
+
</View>
|
|
31
|
+
</Stack>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const CustomisedSpinner = Spinner.customize({
|
|
36
|
+
trackColor: 'red',
|
|
37
|
+
size: 'medium',
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
const SpinnerSizeTest: React.FunctionComponent = () => {
|
|
41
|
+
const memoizedStyles = React.useMemo(() => ({ ...commonTestStyles.androidContainer, height: 250 }), []);
|
|
42
|
+
return (
|
|
43
|
+
<Stack style={stackStyle}>
|
|
44
|
+
<View style={memoizedStyles}>
|
|
45
|
+
<View>
|
|
46
|
+
<TextV1>xx-small</TextV1>
|
|
47
|
+
<Spinner size="xx-small" />
|
|
48
|
+
</View>
|
|
49
|
+
<View>
|
|
50
|
+
<TextV1>x-small</TextV1>
|
|
51
|
+
<Spinner size="x-small" />
|
|
52
|
+
</View>
|
|
53
|
+
<View>
|
|
54
|
+
<TextV1>medium</TextV1>
|
|
55
|
+
<Spinner size="medium" />
|
|
56
|
+
</View>
|
|
57
|
+
<View>
|
|
58
|
+
<TextV1>large</TextV1>
|
|
59
|
+
<Spinner size="large" />
|
|
60
|
+
</View>
|
|
61
|
+
<View>
|
|
62
|
+
<TextV1>x-large</TextV1>
|
|
63
|
+
<Spinner size="x-large" />
|
|
64
|
+
</View>
|
|
65
|
+
</View>
|
|
66
|
+
</Stack>
|
|
67
|
+
);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const spinnerSections: TestSection[] = [
|
|
71
|
+
{
|
|
72
|
+
name: 'Basic Spinner',
|
|
73
|
+
testID: SPINNER_TESTPAGE,
|
|
74
|
+
component: BasicSpinnerTest,
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
name: 'Spinner Size Test',
|
|
78
|
+
component: SpinnerSizeTest,
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: 'Customized Spinner Test',
|
|
82
|
+
component: () => <CustomisedSpinner />,
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: 'Spinner for E2E Testing',
|
|
86
|
+
component: () => <E2ETestingSpinner />,
|
|
87
|
+
},
|
|
88
|
+
];
|
|
89
|
+
|
|
90
|
+
export const SpinnerTest: React.FunctionComponent = () => {
|
|
91
|
+
const status: PlatformStatus = {
|
|
92
|
+
win32Status: 'Backlog',
|
|
93
|
+
uwpStatus: 'Backlog',
|
|
94
|
+
iosStatus: 'Beta',
|
|
95
|
+
macosStatus: 'Backlog',
|
|
96
|
+
androidStatus: 'Backlog',
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
const description =
|
|
100
|
+
'Spinner is a visual representation that data is being loaded. It is implemented with a View wrapping an Animated SVG. The View is to ensure that AccessibilityRole works. AccessibilityRole currently does not work on SVGs.';
|
|
101
|
+
|
|
102
|
+
return <Test name="Spinner Test" description={description} sections={spinnerSections} status={status}></Test>;
|
|
103
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SpinnerTest';
|
package/src/testPages.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { ColorTokensTest } from './TestComponents/ColorTokens';
|
|
|
10
10
|
import { ContextualMenuTest } from './TestComponents/ContextualMenu';
|
|
11
11
|
import { CornerRadiusTokensTest } from './TestComponents/CornerRadius';
|
|
12
12
|
import { NativeDatePickerTest, HOMEPAGE_NATIVEDATEPICKER_BUTTON } from './TestComponents/NativeDatePicker';
|
|
13
|
+
import { DividerTest, HOMEPAGE_DIVIDER_BUTTON } from './TestComponents/Divider';
|
|
13
14
|
import { DropdownTest, HOMEPAGE_DROPDOWN_BUTTON } from './TestComponents/Dropdown';
|
|
14
15
|
// import { DrawerTest, Constants.HOMEPAGE_DRAWER_BUTTON } from './TestComponents/Drawer';
|
|
15
16
|
// import { ExpanderTest, Constants.HOMEPAGE_EXPANDER_BUTTON } from './TestComponents/Expander';
|
|
@@ -40,6 +41,7 @@ import { TextLegacyTest } from './TestComponents/TextLegacy';
|
|
|
40
41
|
import { TextV1Test } from './TestComponents/TextV1';
|
|
41
42
|
import { ThemeTest } from './TestComponents/Theme';
|
|
42
43
|
import * as Constants from '../../E2E/src/index.consts';
|
|
44
|
+
import { SpinnerTest } from './TestComponents/Spinner';
|
|
43
45
|
|
|
44
46
|
export const tests: TestDescription[] = [
|
|
45
47
|
{
|
|
@@ -114,6 +116,12 @@ export const tests: TestDescription[] = [
|
|
|
114
116
|
testPageButton: HOMEPAGE_NATIVEDATEPICKER_BUTTON,
|
|
115
117
|
platforms: ['ios'],
|
|
116
118
|
},
|
|
119
|
+
{
|
|
120
|
+
name: 'Divider',
|
|
121
|
+
component: DividerTest,
|
|
122
|
+
testPageButton: HOMEPAGE_DIVIDER_BUTTON,
|
|
123
|
+
platforms: ['android', 'ios', 'macos', 'win32', 'windows'],
|
|
124
|
+
},
|
|
117
125
|
{
|
|
118
126
|
name: 'Dropdown',
|
|
119
127
|
component: DropdownTest,
|
|
@@ -241,6 +249,12 @@ export const tests: TestDescription[] = [
|
|
|
241
249
|
testPageButton: Constants.HOMEPAGE_SPACING_BUTTON,
|
|
242
250
|
platforms: ['android', 'ios', 'macos', 'win32', 'windows'],
|
|
243
251
|
},
|
|
252
|
+
{
|
|
253
|
+
name: 'Spinner V1',
|
|
254
|
+
component: SpinnerTest,
|
|
255
|
+
testPageButton: Constants.HOMEPAGE_SPINNER_BUTTON,
|
|
256
|
+
platforms: ['android'],
|
|
257
|
+
},
|
|
244
258
|
{
|
|
245
259
|
name: 'Stroke Width Tokens',
|
|
246
260
|
component: StrokeWidthTest,
|