@fluentui-react-native/tester 0.116.4 → 0.116.5
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 +16 -1
- package/CHANGELOG.md +10 -2
- package/lib/fluent-tester/src/FluentTester.d.ts +4 -1
- package/lib/fluent-tester/src/FluentTester.d.ts.map +1 -1
- package/lib/fluent-tester/src/FluentTester.js +37 -59
- package/lib/fluent-tester/src/FluentTester.js.map +1 -1
- package/lib/fluent-tester/src/TestComponents/Common/styles.d.ts +10 -4
- package/lib/fluent-tester/src/TestComponents/Common/styles.d.ts.map +1 -1
- package/lib/fluent-tester/src/TestComponents/Common/styles.js +10 -6
- package/lib/fluent-tester/src/TestComponents/Common/styles.js.map +1 -1
- package/lib-commonjs/fluent-tester/src/FluentTester.d.ts +4 -1
- package/lib-commonjs/fluent-tester/src/FluentTester.d.ts.map +1 -1
- package/lib-commonjs/fluent-tester/src/FluentTester.js +35 -57
- package/lib-commonjs/fluent-tester/src/FluentTester.js.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/Common/styles.d.ts +10 -4
- package/lib-commonjs/fluent-tester/src/TestComponents/Common/styles.d.ts.map +1 -1
- package/lib-commonjs/fluent-tester/src/TestComponents/Common/styles.js +10 -6
- package/lib-commonjs/fluent-tester/src/TestComponents/Common/styles.js.map +1 -1
- package/package.json +1 -1
- package/src/FluentTester.tsx +71 -102
- package/src/TestComponents/Common/styles.ts +10 -16
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,22 @@
|
|
|
2
2
|
"name": "@fluentui-react-native/tester",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Tue, 13 Dec 2022 00:34:59 GMT",
|
|
6
|
+
"tag": "@fluentui-react-native/tester_v0.116.5",
|
|
7
|
+
"version": "0.116.5",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "sanajmi@microsoft.com",
|
|
12
|
+
"package": "@fluentui-react-native/tester",
|
|
13
|
+
"commit": "6d27d8e7f0b341e290238ef65c5f419be67cd9c6",
|
|
14
|
+
"comment": "Less inline Function Components in Fluent Tester"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Mon, 12 Dec 2022 10:12:02 GMT",
|
|
6
21
|
"tag": "@fluentui-react-native/tester_v0.116.4",
|
|
7
22
|
"version": "0.116.4",
|
|
8
23
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
# Change Log - @fluentui-react-native/tester
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Tue, 13 Dec 2022 00:34:59 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 0.116.5
|
|
8
|
+
|
|
9
|
+
Tue, 13 Dec 2022 00:34:59 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- Less inline Function Components in Fluent Tester (sanajmi@microsoft.com)
|
|
14
|
+
|
|
7
15
|
## 0.116.4
|
|
8
16
|
|
|
9
|
-
Mon, 12 Dec 2022 10:
|
|
17
|
+
Mon, 12 Dec 2022 10:12:02 GMT
|
|
10
18
|
|
|
11
19
|
### Patches
|
|
12
20
|
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
import MessageQueue from 'react-native/Libraries/BatchedBridge/MessageQueue';
|
|
4
|
+
MessageQueue.spy(true);
|
|
5
|
+
*/
|
|
2
6
|
export interface FluentTesterProps {
|
|
3
|
-
initialTest?: string;
|
|
4
7
|
enableSinglePaneView?: boolean;
|
|
5
8
|
}
|
|
6
9
|
export declare const FluentTester: React.FunctionComponent<FluentTesterProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FluentTester.d.ts","sourceRoot":"","sources":["../../../src/FluentTester.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"FluentTester.d.ts","sourceRoot":"","sources":["../../../src/FluentTester.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B;;;GAGG;AAEH,MAAM,WAAW,iBAAiB;IAChC,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAgFD,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAiHnE,CAAC"}
|
|
@@ -3,21 +3,13 @@ import { Separator, Text } from '@fluentui/react-native';
|
|
|
3
3
|
import { ButtonV1 as Button } from '@fluentui-react-native/button';
|
|
4
4
|
import { themedStyleSheet } from '@fluentui-react-native/themed-stylesheet';
|
|
5
5
|
import * as React from 'react';
|
|
6
|
-
import { ScrollView, View, Text as RNText, Platform, SafeAreaView, BackHandler } from 'react-native';
|
|
6
|
+
import { ScrollView, View, Text as RNText, Platform, SafeAreaView, BackHandler, I18nManager } from 'react-native';
|
|
7
7
|
import { BASE_TESTPAGE, TESTPAGE_BUTTONS_SCROLLVIEWER } from './TestComponents/Common/consts';
|
|
8
|
-
import {
|
|
8
|
+
import { fluentTesterStyles, mobileStyles } from './TestComponents/Common/styles';
|
|
9
9
|
import { useTheme } from '@fluentui-react-native/theme-types';
|
|
10
10
|
import { ThemePickers } from './theme/ThemePickers';
|
|
11
11
|
import { tests } from './testPages';
|
|
12
12
|
import { ROOT_VIEW } from '../../E2E/src/common/consts';
|
|
13
|
-
// uncomment the below lines to enable message spy
|
|
14
|
-
/**
|
|
15
|
-
import MessageQueue from 'react-native/Libraries/BatchedBridge/MessageQueue';
|
|
16
|
-
MessageQueue.spy(true);
|
|
17
|
-
*/
|
|
18
|
-
var EmptyComponent = function () {
|
|
19
|
-
return React.createElement(RNText, { style: fluentTesterStyles.noTest }, "Select a component from the left.");
|
|
20
|
-
};
|
|
21
13
|
var getThemedStyles = themedStyleSheet(function (t) {
|
|
22
14
|
return {
|
|
23
15
|
root: {
|
|
@@ -35,6 +27,9 @@ var getThemedStyles = themedStyleSheet(function (t) {
|
|
|
35
27
|
},
|
|
36
28
|
};
|
|
37
29
|
});
|
|
30
|
+
var EmptyComponent = function () {
|
|
31
|
+
return React.createElement(RNText, { style: fluentTesterStyles.noTest }, "Select a component from the test list.");
|
|
32
|
+
};
|
|
38
33
|
var HeaderSeparator = Separator.customize(function (t) { return ({
|
|
39
34
|
color: t.colors.bodyFrameDivider,
|
|
40
35
|
separatorWidth: 2,
|
|
@@ -43,25 +38,35 @@ var TestListSeparator = Separator.customize(function (t) { return ({
|
|
|
43
38
|
color: t.colors.menuDivider,
|
|
44
39
|
separatorWidth: 2,
|
|
45
40
|
}); });
|
|
41
|
+
var Header = React.memo(function (props) {
|
|
42
|
+
var _a;
|
|
43
|
+
var enableSinglePaneView = props.enableSinglePaneView, enableBackButtonIOS = props.enableBackButtonIOS, onBackButtonPressedIOS = props.onBackButtonPressedIOS;
|
|
44
|
+
var theme = useTheme();
|
|
45
|
+
var headerStyle = enableSinglePaneView ? fluentTesterStyles.headerWithBackButton : fluentTesterStyles.header;
|
|
46
|
+
var backButtonTitle = I18nManager.isRTL ? 'Back ›' : '‹ Back';
|
|
47
|
+
return (React.createElement(View, { style: headerStyle },
|
|
48
|
+
React.createElement(Text, { style: fluentTesterStyles.testHeader, variant: "heroLargeSemibold", color: (_a = theme.host.palette) === null || _a === void 0 ? void 0 : _a.TextEmphasis, testID: BASE_TESTPAGE }, "\u269B FluentUI Tests"),
|
|
49
|
+
React.createElement(View, { style: fluentTesterStyles.header },
|
|
50
|
+
Platform.OS === 'ios' && !Platform.isPad && (React.createElement(Button, { appearance: "subtle", style: fluentTesterStyles.backButton, onClick: onBackButtonPressedIOS, disabled: !enableBackButtonIOS }, backButtonTitle)),
|
|
51
|
+
React.createElement(ThemePickers, null))));
|
|
52
|
+
});
|
|
53
|
+
// filters and sorts tests alphabetically
|
|
54
|
+
var filteredTestComponents = tests.filter(function (test) { return test.platforms.includes(Platform.OS); });
|
|
55
|
+
var sortedTestComponents = filteredTestComponents.sort(function (a, b) { return a.name.localeCompare(b.name); });
|
|
46
56
|
export var FluentTester = function (props) {
|
|
47
|
-
|
|
48
|
-
var
|
|
49
|
-
var sortedTestComponents = filteredTestComponents.sort(function (a, b) { return a.name.localeCompare(b.name); });
|
|
50
|
-
var initialTest = props.initialTest, enableSinglePaneView = props.enableSinglePaneView;
|
|
51
|
-
var initialSelectedTestIndex = sortedTestComponents.findIndex(function (description) {
|
|
52
|
-
return description.name === initialTest;
|
|
53
|
-
});
|
|
54
|
-
var _a = React.useState(initialSelectedTestIndex), selectedTestIndex = _a[0], setSelectedTestIndex = _a[1];
|
|
57
|
+
var enableSinglePaneView = props.enableSinglePaneView;
|
|
58
|
+
var _a = React.useState(-1), selectedTestIndex = _a[0], setSelectedTestIndex = _a[1];
|
|
55
59
|
var _b = React.useState(true), onTestListView = _b[0], setOnTestListView = _b[1];
|
|
56
|
-
var
|
|
60
|
+
var theme = useTheme();
|
|
61
|
+
var themedStyles = getThemedStyles(theme);
|
|
62
|
+
var onBackPress = React.useCallback(function () {
|
|
57
63
|
setOnTestListView(true);
|
|
58
64
|
if (Platform.OS === 'android') {
|
|
59
65
|
BackHandler.removeEventListener('hardwareBackPress', onBackPress);
|
|
60
66
|
}
|
|
61
67
|
return true;
|
|
62
|
-
};
|
|
68
|
+
}, []);
|
|
63
69
|
var TestComponent = selectedTestIndex == -1 ? EmptyComponent : sortedTestComponents[selectedTestIndex].component;
|
|
64
|
-
var themedStyles = getThemedStyles(useTheme());
|
|
65
70
|
// This is used to initially bring focus to the app on win32
|
|
66
71
|
var focusOnMountRef = React.useRef();
|
|
67
72
|
React.useEffect(function () {
|
|
@@ -73,33 +78,16 @@ export var FluentTester = function (props) {
|
|
|
73
78
|
ios: SafeAreaView,
|
|
74
79
|
default: View,
|
|
75
80
|
});
|
|
76
|
-
var Header = function () {
|
|
77
|
-
var _a;
|
|
78
|
-
var theme = useTheme();
|
|
79
|
-
return (React.createElement(View, { style: fluentTesterStyles.header },
|
|
80
|
-
React.createElement(Text, { testID: BASE_TESTPAGE, style: fluentTesterStyles.testHeader, variant: "heroLargeSemibold", color: (_a = theme.host.palette) === null || _a === void 0 ? void 0 : _a.TextEmphasis }, "\u269B FluentUI Tests"),
|
|
81
|
-
React.createElement(ThemePickers, null)));
|
|
82
|
-
};
|
|
83
|
-
// iOS needs a software back button, which is shown on a newline along with the ThemePickers
|
|
84
|
-
var MobileHeader = function () {
|
|
85
|
-
var _a;
|
|
86
|
-
var theme = useTheme();
|
|
87
|
-
return (React.createElement(View, { style: mobileStyles.header },
|
|
88
|
-
React.createElement(Text, { style: fluentTesterStyles.testHeader, variant: "heroLargeSemibold", color: (_a = theme.host.palette) === null || _a === void 0 ? void 0 : _a.TextEmphasis, testID: BASE_TESTPAGE }, "\u269B FluentUI Tests"),
|
|
89
|
-
React.createElement(View, { style: fluentTesterStyles.header },
|
|
90
|
-
React.createElement(Button, { appearance: "subtle", style: { alignSelf: 'flex-start', display: Platform.OS === 'ios' ? 'flex' : 'none' }, onClick: onBackPress, disabled: onTestListView }, "\u2039 Back"),
|
|
91
|
-
React.createElement(ThemePickers, null))));
|
|
92
|
-
};
|
|
93
81
|
var isTestListVisible = !enableSinglePaneView || (enableSinglePaneView && onTestListView);
|
|
94
82
|
var isTestSectionVisible = !enableSinglePaneView || (enableSinglePaneView && !onTestListView);
|
|
95
|
-
var TestList = function () {
|
|
83
|
+
var TestList = React.memo(function () {
|
|
96
84
|
return (React.createElement(View, { style: fluentTesterStyles.testList },
|
|
97
85
|
React.createElement(ScrollView, { contentContainerStyle: fluentTesterStyles.testListContainerStyle, testID: TESTPAGE_BUTTONS_SCROLLVIEWER }, sortedTestComponents.map(function (description, index) {
|
|
98
86
|
return (React.createElement(Button, __assign({ appearance: "subtle", key: index, disabled: index == selectedTestIndex, onClick: function () { return setSelectedTestIndex(index); }, style: fluentTesterStyles.testListItem, testID: description.testPage }, (index === 0 && { componentRef: focusOnMountRef })), description.name));
|
|
99
87
|
})),
|
|
100
88
|
React.createElement(TestListSeparator, { vertical: true, style: fluentTesterStyles.testListSeparator })));
|
|
101
|
-
};
|
|
102
|
-
var MobileTestList = function () {
|
|
89
|
+
});
|
|
90
|
+
var MobileTestList = React.memo(function () {
|
|
103
91
|
return (React.createElement(View, { style: __assign(__assign({}, mobileStyles.testList), { display: isTestListVisible ? 'flex' : 'none' }) },
|
|
104
92
|
React.createElement(ScrollView, { contentContainerStyle: fluentTesterStyles.testListContainerStyle }, sortedTestComponents.map(function (description, index) {
|
|
105
93
|
return (React.createElement(View, { key: index },
|
|
@@ -114,28 +102,18 @@ export var FluentTester = function (props) {
|
|
|
114
102
|
accessibilityLabel: description.testPage }, description.name),
|
|
115
103
|
React.createElement(Separator, { style: themedStyles.testSeparator })));
|
|
116
104
|
}))));
|
|
117
|
-
};
|
|
105
|
+
});
|
|
118
106
|
var TestComponentView = function () {
|
|
119
|
-
return (React.createElement(ScrollView, {
|
|
107
|
+
return (React.createElement(ScrollView, { contentContainerStyle: fluentTesterStyles.testSection },
|
|
120
108
|
React.createElement(TestComponent, null)));
|
|
121
109
|
};
|
|
122
|
-
var MobileTestComponentView = function () {
|
|
123
|
-
return (React.createElement(View, { style: __assign(__assign({}, mobileStyles.testSection), { display: isTestSectionVisible ? 'flex' : 'none' }) },
|
|
124
|
-
React.createElement(ScrollView, null,
|
|
125
|
-
React.createElement(TestComponent, null))));
|
|
126
|
-
};
|
|
127
|
-
var TesterContent = function () {
|
|
128
|
-
return (React.createElement(View, { style: commonTestStyles.flex },
|
|
129
|
-
enableSinglePaneView ? React.createElement(MobileHeader, null) : React.createElement(Header, null),
|
|
130
|
-
React.createElement(HeaderSeparator, null),
|
|
131
|
-
React.createElement(View, { style: fluentTesterStyles.testRoot },
|
|
132
|
-
enableSinglePaneView ? React.createElement(MobileTestList, null) : React.createElement(TestList, null),
|
|
133
|
-
enableSinglePaneView ? React.createElement(MobileTestComponentView, null) : React.createElement(TestComponentView, null))));
|
|
134
|
-
};
|
|
135
110
|
return (
|
|
136
111
|
// TODO: Figure out why making this view accessible breaks element querying on iOS.
|
|
137
|
-
React.createElement(
|
|
138
|
-
React.createElement(
|
|
139
|
-
|
|
112
|
+
React.createElement(RootView, { style: themedStyles.root, accessible: Platform.OS !== 'ios', testID: ROOT_VIEW },
|
|
113
|
+
React.createElement(Header, { enableSinglePaneView: enableSinglePaneView, enableBackButtonIOS: !onTestListView, onBackButtonPressedIOS: onBackPress }),
|
|
114
|
+
React.createElement(HeaderSeparator, null),
|
|
115
|
+
React.createElement(View, { style: fluentTesterStyles.testRoot },
|
|
116
|
+
enableSinglePaneView ? React.createElement(MobileTestList, null) : React.createElement(TestList, null),
|
|
117
|
+
isTestSectionVisible && React.createElement(TestComponentView, null))));
|
|
140
118
|
};
|
|
141
119
|
//# sourceMappingURL=FluentTester.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FluentTester.js","sourceRoot":"","sources":["../../../src/FluentTester.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,QAAQ,IAAI,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,IAAI,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"FluentTester.js","sourceRoot":"","sources":["../../../src/FluentTester.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,IAAI,EAA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,WAAW;YAC/D,oBAAC,aAAa,OAAG,CACN,CACd,CAAC;IACJ,CAAC,CAAC;IAEF,OAAO;IACL,mFAAmF;IACnF,oBAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,CAAC,IAAI,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,KAAK,KAAK,EAAE,MAAM,EAAE,SAAS;QACtF,oBAAC,MAAM,IAAC,oBAAoB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,CAAC,cAAc,EAAE,sBAAsB,EAAE,WAAW,GAAI;QACjI,oBAAC,eAAe,OAAG;QACnB,oBAAC,IAAI,IAAC,KAAK,EAAE,kBAAkB,CAAC,QAAQ;YACrC,oBAAoB,CAAC,CAAC,CAAC,oBAAC,cAAc,OAAG,CAAC,CAAC,CAAC,oBAAC,QAAQ,OAAG;YACxD,oBAAoB,IAAI,oBAAC,iBAAiB,OAAG,CACzC,CACE,CACZ,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -80,6 +80,14 @@ export declare const fluentTesterStyles: {
|
|
|
80
80
|
flexDirection: "row";
|
|
81
81
|
justifyContent: "space-between";
|
|
82
82
|
};
|
|
83
|
+
headerWithBackButton: {
|
|
84
|
+
flexDirection: "column";
|
|
85
|
+
justifyContent: "space-between";
|
|
86
|
+
};
|
|
87
|
+
backButton: {
|
|
88
|
+
alignSelf: "flex-start";
|
|
89
|
+
display: "flex";
|
|
90
|
+
};
|
|
83
91
|
testHeader: {
|
|
84
92
|
marginBottom: number;
|
|
85
93
|
marginTop: number;
|
|
@@ -114,7 +122,8 @@ export declare const fluentTesterStyles: {
|
|
|
114
122
|
marginHorizontal: number;
|
|
115
123
|
};
|
|
116
124
|
testSection: {
|
|
117
|
-
|
|
125
|
+
width: string;
|
|
126
|
+
padding: number;
|
|
118
127
|
};
|
|
119
128
|
noTest: {
|
|
120
129
|
alignSelf: "center";
|
|
@@ -145,9 +154,6 @@ export declare const mobileStyles: {
|
|
|
145
154
|
fontSize: number;
|
|
146
155
|
paddingVertical: number;
|
|
147
156
|
};
|
|
148
|
-
testSection: {
|
|
149
|
-
width: string;
|
|
150
|
-
};
|
|
151
157
|
};
|
|
152
158
|
export declare const testContentRootViewStyle: (import("react-native").ViewStyle | {
|
|
153
159
|
minHeight: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/TestComponents/Common/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+D3B,CAAC;AAEH,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/TestComponents/Common/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+D3B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8D7B,CAAC;AAEH,eAAO,MAAM,UAAU,EAAE,WAAW,CAAC,OAAO,CAM3C,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,OAAO,CAIpD,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;CAsBvB,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;IAAsC,CAAC"}
|
|
@@ -78,6 +78,14 @@ export var fluentTesterStyles = StyleSheet.create({
|
|
|
78
78
|
flexDirection: 'row',
|
|
79
79
|
justifyContent: 'space-between',
|
|
80
80
|
},
|
|
81
|
+
headerWithBackButton: {
|
|
82
|
+
flexDirection: 'column',
|
|
83
|
+
justifyContent: 'space-between',
|
|
84
|
+
},
|
|
85
|
+
backButton: {
|
|
86
|
+
alignSelf: 'flex-start',
|
|
87
|
+
display: 'flex',
|
|
88
|
+
},
|
|
81
89
|
testHeader: {
|
|
82
90
|
marginBottom: 8,
|
|
83
91
|
marginTop: 4,
|
|
@@ -95,8 +103,6 @@ export var fluentTesterStyles = StyleSheet.create({
|
|
|
95
103
|
scrollViewStyle: {
|
|
96
104
|
flexDirection: 'column',
|
|
97
105
|
alignItems: 'stretch',
|
|
98
|
-
// height: 200,
|
|
99
|
-
// width: 200,
|
|
100
106
|
},
|
|
101
107
|
scrollViewContainer: {
|
|
102
108
|
height: 250,
|
|
@@ -112,7 +118,8 @@ export var fluentTesterStyles = StyleSheet.create({
|
|
|
112
118
|
},
|
|
113
119
|
testListSeparator: { marginHorizontal: 8 },
|
|
114
120
|
testSection: {
|
|
115
|
-
|
|
121
|
+
width: '100%',
|
|
122
|
+
padding: 8,
|
|
116
123
|
},
|
|
117
124
|
noTest: {
|
|
118
125
|
alignSelf: 'center',
|
|
@@ -153,9 +160,6 @@ export var mobileStyles = StyleSheet.create({
|
|
|
153
160
|
fontSize: 18,
|
|
154
161
|
paddingVertical: 8,
|
|
155
162
|
},
|
|
156
|
-
testSection: {
|
|
157
|
-
width: '100%',
|
|
158
|
-
},
|
|
159
163
|
});
|
|
160
164
|
export var testContentRootViewStyle = [stackStyle, commonTestStyles.view];
|
|
161
165
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../src/TestComponents/Common/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,MAAM,CAAC,IAAM,gBAAgB,GAAG,UAAU,CAAC,MAAM,CAAC;IAChD,IAAI,EAAE;QACJ,SAAS,EAAE,EAAE;QACb,WAAW,EAAE,EAAE;QACf,aA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Q,EAAE,CAAC;QACX,aAAa,EAAE,KAAK;QACpB,SAAS,EAAE,GAAG;QACd,QAAQ,EAAE,GAAG;QACb,cAAc,EAAE,YAAY;QAC5B,UAAU,EAAE,SAAS;QACrB,OAAO,EAAE,CAAC;KACX;
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../src/TestComponents/Common/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,MAAM,CAAC,IAAM,gBAAgB,GAAG,UAAU,CAAC,MAAM,CAAC;IAChD,IAAI,EAAE;QACJ,SAAS,EAAE,EAAE;QACb,WAAW,EAAE,EAAE;QACf,aAAa,EAAE,QAAQ;QACvB,UAAU,EAAE,YAAY;KACzB;IACD,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;IACjB,MAAM,EAAE;QACN,cAAc,EAAE,CAAC;QACjB,QAAQ,EAAE,EAAE;KACb;IACD,OAAO,EAAE;QACP,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,MAAM;QAClB,KAAK,EAAE,SAAS;QAChB,SAAS,EAAE,EAAE;KACd;IACD,cAAc,EAAE;QACd,MAAM,EAAE,GAAG;QACX,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,cAAc;KAC/B;IACD,QAAQ,EAAE;QACR,QAAQ,EAAE,CAAC;KACZ;IACD,cAAc,EAAE;QACd,aAAa,EAAE,QAAQ;QACvB,IAAI,EAAE,CAAC;KACR;IACD,gBAAgB,EAAE;QAChB,IAAI,EAAE,CAAC;QACP,aAAa,EAAE,KAAK;KACrB;IACD,OAAO,EAAE;QACP,cAAc,EAAE,CAAC;KAClB;IACD,KAAK,EAAE;QACL,WAAW,EAAE,CAAC;QACd,WAAW,EAAE,SAAS;QACtB,OAAO,EAAE,EAAE;QACX,MAAM,EAAE,CAAC;KACV;IACD,MAAM,EAAE;QACN,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,QAAQ;KACrB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@@ -1,6 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
import MessageQueue from 'react-native/Libraries/BatchedBridge/MessageQueue';
|
|
4
|
+
MessageQueue.spy(true);
|
|
5
|
+
*/
|
|
2
6
|
export interface FluentTesterProps {
|
|
3
|
-
initialTest?: string;
|
|
4
7
|
enableSinglePaneView?: boolean;
|
|
5
8
|
}
|
|
6
9
|
export declare const FluentTester: React.FunctionComponent<FluentTesterProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FluentTester.d.ts","sourceRoot":"","sources":["../../../src/FluentTester.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"FluentTester.d.ts","sourceRoot":"","sources":["../../../src/FluentTester.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B;;;GAGG;AAEH,MAAM,WAAW,iBAAiB;IAChC,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAgFD,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAiHnE,CAAC"}
|
|
@@ -13,14 +13,6 @@ var theme_types_1 = require("@fluentui-react-native/theme-types");
|
|
|
13
13
|
var ThemePickers_1 = require("./theme/ThemePickers");
|
|
14
14
|
var testPages_1 = require("./testPages");
|
|
15
15
|
var consts_2 = require("../../E2E/src/common/consts");
|
|
16
|
-
// uncomment the below lines to enable message spy
|
|
17
|
-
/**
|
|
18
|
-
import MessageQueue from 'react-native/Libraries/BatchedBridge/MessageQueue';
|
|
19
|
-
MessageQueue.spy(true);
|
|
20
|
-
*/
|
|
21
|
-
var EmptyComponent = function () {
|
|
22
|
-
return React.createElement(react_native_2.Text, { style: styles_1.fluentTesterStyles.noTest }, "Select a component from the left.");
|
|
23
|
-
};
|
|
24
16
|
var getThemedStyles = (0, themed_stylesheet_1.themedStyleSheet)(function (t) {
|
|
25
17
|
return {
|
|
26
18
|
root: {
|
|
@@ -38,6 +30,9 @@ var getThemedStyles = (0, themed_stylesheet_1.themedStyleSheet)(function (t) {
|
|
|
38
30
|
},
|
|
39
31
|
};
|
|
40
32
|
});
|
|
33
|
+
var EmptyComponent = function () {
|
|
34
|
+
return React.createElement(react_native_2.Text, { style: styles_1.fluentTesterStyles.noTest }, "Select a component from the test list.");
|
|
35
|
+
};
|
|
41
36
|
var HeaderSeparator = react_native_1.Separator.customize(function (t) { return ({
|
|
42
37
|
color: t.colors.bodyFrameDivider,
|
|
43
38
|
separatorWidth: 2,
|
|
@@ -46,25 +41,35 @@ var TestListSeparator = react_native_1.Separator.customize(function (t) { return
|
|
|
46
41
|
color: t.colors.menuDivider,
|
|
47
42
|
separatorWidth: 2,
|
|
48
43
|
}); });
|
|
44
|
+
var Header = React.memo(function (props) {
|
|
45
|
+
var _a;
|
|
46
|
+
var enableSinglePaneView = props.enableSinglePaneView, enableBackButtonIOS = props.enableBackButtonIOS, onBackButtonPressedIOS = props.onBackButtonPressedIOS;
|
|
47
|
+
var theme = (0, theme_types_1.useTheme)();
|
|
48
|
+
var headerStyle = enableSinglePaneView ? styles_1.fluentTesterStyles.headerWithBackButton : styles_1.fluentTesterStyles.header;
|
|
49
|
+
var backButtonTitle = react_native_2.I18nManager.isRTL ? 'Back ›' : '‹ Back';
|
|
50
|
+
return (React.createElement(react_native_2.View, { style: headerStyle },
|
|
51
|
+
React.createElement(react_native_1.Text, { style: styles_1.fluentTesterStyles.testHeader, variant: "heroLargeSemibold", color: (_a = theme.host.palette) === null || _a === void 0 ? void 0 : _a.TextEmphasis, testID: consts_1.BASE_TESTPAGE }, "\u269B FluentUI Tests"),
|
|
52
|
+
React.createElement(react_native_2.View, { style: styles_1.fluentTesterStyles.header },
|
|
53
|
+
react_native_2.Platform.OS === 'ios' && !react_native_2.Platform.isPad && (React.createElement(button_1.ButtonV1, { appearance: "subtle", style: styles_1.fluentTesterStyles.backButton, onClick: onBackButtonPressedIOS, disabled: !enableBackButtonIOS }, backButtonTitle)),
|
|
54
|
+
React.createElement(ThemePickers_1.ThemePickers, null))));
|
|
55
|
+
});
|
|
56
|
+
// filters and sorts tests alphabetically
|
|
57
|
+
var filteredTestComponents = testPages_1.tests.filter(function (test) { return test.platforms.includes(react_native_2.Platform.OS); });
|
|
58
|
+
var sortedTestComponents = filteredTestComponents.sort(function (a, b) { return a.name.localeCompare(b.name); });
|
|
49
59
|
var FluentTester = function (props) {
|
|
50
|
-
|
|
51
|
-
var
|
|
52
|
-
var sortedTestComponents = filteredTestComponents.sort(function (a, b) { return a.name.localeCompare(b.name); });
|
|
53
|
-
var initialTest = props.initialTest, enableSinglePaneView = props.enableSinglePaneView;
|
|
54
|
-
var initialSelectedTestIndex = sortedTestComponents.findIndex(function (description) {
|
|
55
|
-
return description.name === initialTest;
|
|
56
|
-
});
|
|
57
|
-
var _a = React.useState(initialSelectedTestIndex), selectedTestIndex = _a[0], setSelectedTestIndex = _a[1];
|
|
60
|
+
var enableSinglePaneView = props.enableSinglePaneView;
|
|
61
|
+
var _a = React.useState(-1), selectedTestIndex = _a[0], setSelectedTestIndex = _a[1];
|
|
58
62
|
var _b = React.useState(true), onTestListView = _b[0], setOnTestListView = _b[1];
|
|
59
|
-
var
|
|
63
|
+
var theme = (0, theme_types_1.useTheme)();
|
|
64
|
+
var themedStyles = getThemedStyles(theme);
|
|
65
|
+
var onBackPress = React.useCallback(function () {
|
|
60
66
|
setOnTestListView(true);
|
|
61
67
|
if (react_native_2.Platform.OS === 'android') {
|
|
62
68
|
react_native_2.BackHandler.removeEventListener('hardwareBackPress', onBackPress);
|
|
63
69
|
}
|
|
64
70
|
return true;
|
|
65
|
-
};
|
|
71
|
+
}, []);
|
|
66
72
|
var TestComponent = selectedTestIndex == -1 ? EmptyComponent : sortedTestComponents[selectedTestIndex].component;
|
|
67
|
-
var themedStyles = getThemedStyles((0, theme_types_1.useTheme)());
|
|
68
73
|
// This is used to initially bring focus to the app on win32
|
|
69
74
|
var focusOnMountRef = React.useRef();
|
|
70
75
|
React.useEffect(function () {
|
|
@@ -76,33 +81,16 @@ var FluentTester = function (props) {
|
|
|
76
81
|
ios: react_native_2.SafeAreaView,
|
|
77
82
|
default: react_native_2.View,
|
|
78
83
|
});
|
|
79
|
-
var Header = function () {
|
|
80
|
-
var _a;
|
|
81
|
-
var theme = (0, theme_types_1.useTheme)();
|
|
82
|
-
return (React.createElement(react_native_2.View, { style: styles_1.fluentTesterStyles.header },
|
|
83
|
-
React.createElement(react_native_1.Text, { testID: consts_1.BASE_TESTPAGE, style: styles_1.fluentTesterStyles.testHeader, variant: "heroLargeSemibold", color: (_a = theme.host.palette) === null || _a === void 0 ? void 0 : _a.TextEmphasis }, "\u269B FluentUI Tests"),
|
|
84
|
-
React.createElement(ThemePickers_1.ThemePickers, null)));
|
|
85
|
-
};
|
|
86
|
-
// iOS needs a software back button, which is shown on a newline along with the ThemePickers
|
|
87
|
-
var MobileHeader = function () {
|
|
88
|
-
var _a;
|
|
89
|
-
var theme = (0, theme_types_1.useTheme)();
|
|
90
|
-
return (React.createElement(react_native_2.View, { style: styles_1.mobileStyles.header },
|
|
91
|
-
React.createElement(react_native_1.Text, { style: styles_1.fluentTesterStyles.testHeader, variant: "heroLargeSemibold", color: (_a = theme.host.palette) === null || _a === void 0 ? void 0 : _a.TextEmphasis, testID: consts_1.BASE_TESTPAGE }, "\u269B FluentUI Tests"),
|
|
92
|
-
React.createElement(react_native_2.View, { style: styles_1.fluentTesterStyles.header },
|
|
93
|
-
React.createElement(button_1.ButtonV1, { appearance: "subtle", style: { alignSelf: 'flex-start', display: react_native_2.Platform.OS === 'ios' ? 'flex' : 'none' }, onClick: onBackPress, disabled: onTestListView }, "\u2039 Back"),
|
|
94
|
-
React.createElement(ThemePickers_1.ThemePickers, null))));
|
|
95
|
-
};
|
|
96
84
|
var isTestListVisible = !enableSinglePaneView || (enableSinglePaneView && onTestListView);
|
|
97
85
|
var isTestSectionVisible = !enableSinglePaneView || (enableSinglePaneView && !onTestListView);
|
|
98
|
-
var TestList = function () {
|
|
86
|
+
var TestList = React.memo(function () {
|
|
99
87
|
return (React.createElement(react_native_2.View, { style: styles_1.fluentTesterStyles.testList },
|
|
100
88
|
React.createElement(react_native_2.ScrollView, { contentContainerStyle: styles_1.fluentTesterStyles.testListContainerStyle, testID: consts_1.TESTPAGE_BUTTONS_SCROLLVIEWER }, sortedTestComponents.map(function (description, index) {
|
|
101
89
|
return (React.createElement(button_1.ButtonV1, (0, tslib_1.__assign)({ appearance: "subtle", key: index, disabled: index == selectedTestIndex, onClick: function () { return setSelectedTestIndex(index); }, style: styles_1.fluentTesterStyles.testListItem, testID: description.testPage }, (index === 0 && { componentRef: focusOnMountRef })), description.name));
|
|
102
90
|
})),
|
|
103
91
|
React.createElement(TestListSeparator, { vertical: true, style: styles_1.fluentTesterStyles.testListSeparator })));
|
|
104
|
-
};
|
|
105
|
-
var MobileTestList = function () {
|
|
92
|
+
});
|
|
93
|
+
var MobileTestList = React.memo(function () {
|
|
106
94
|
return (React.createElement(react_native_2.View, { style: (0, tslib_1.__assign)((0, tslib_1.__assign)({}, styles_1.mobileStyles.testList), { display: isTestListVisible ? 'flex' : 'none' }) },
|
|
107
95
|
React.createElement(react_native_2.ScrollView, { contentContainerStyle: styles_1.fluentTesterStyles.testListContainerStyle }, sortedTestComponents.map(function (description, index) {
|
|
108
96
|
return (React.createElement(react_native_2.View, { key: index },
|
|
@@ -117,29 +105,19 @@ var FluentTester = function (props) {
|
|
|
117
105
|
accessibilityLabel: description.testPage }, description.name),
|
|
118
106
|
React.createElement(react_native_1.Separator, { style: themedStyles.testSeparator })));
|
|
119
107
|
}))));
|
|
120
|
-
};
|
|
108
|
+
});
|
|
121
109
|
var TestComponentView = function () {
|
|
122
|
-
return (React.createElement(react_native_2.ScrollView, {
|
|
110
|
+
return (React.createElement(react_native_2.ScrollView, { contentContainerStyle: styles_1.fluentTesterStyles.testSection },
|
|
123
111
|
React.createElement(TestComponent, null)));
|
|
124
112
|
};
|
|
125
|
-
var MobileTestComponentView = function () {
|
|
126
|
-
return (React.createElement(react_native_2.View, { style: (0, tslib_1.__assign)((0, tslib_1.__assign)({}, styles_1.mobileStyles.testSection), { display: isTestSectionVisible ? 'flex' : 'none' }) },
|
|
127
|
-
React.createElement(react_native_2.ScrollView, null,
|
|
128
|
-
React.createElement(TestComponent, null))));
|
|
129
|
-
};
|
|
130
|
-
var TesterContent = function () {
|
|
131
|
-
return (React.createElement(react_native_2.View, { style: styles_1.commonTestStyles.flex },
|
|
132
|
-
enableSinglePaneView ? React.createElement(MobileHeader, null) : React.createElement(Header, null),
|
|
133
|
-
React.createElement(HeaderSeparator, null),
|
|
134
|
-
React.createElement(react_native_2.View, { style: styles_1.fluentTesterStyles.testRoot },
|
|
135
|
-
enableSinglePaneView ? React.createElement(MobileTestList, null) : React.createElement(TestList, null),
|
|
136
|
-
enableSinglePaneView ? React.createElement(MobileTestComponentView, null) : React.createElement(TestComponentView, null))));
|
|
137
|
-
};
|
|
138
113
|
return (
|
|
139
114
|
// TODO: Figure out why making this view accessible breaks element querying on iOS.
|
|
140
|
-
React.createElement(
|
|
141
|
-
React.createElement(
|
|
142
|
-
|
|
115
|
+
React.createElement(RootView, { style: themedStyles.root, accessible: react_native_2.Platform.OS !== 'ios', testID: consts_2.ROOT_VIEW },
|
|
116
|
+
React.createElement(Header, { enableSinglePaneView: enableSinglePaneView, enableBackButtonIOS: !onTestListView, onBackButtonPressedIOS: onBackPress }),
|
|
117
|
+
React.createElement(HeaderSeparator, null),
|
|
118
|
+
React.createElement(react_native_2.View, { style: styles_1.fluentTesterStyles.testRoot },
|
|
119
|
+
enableSinglePaneView ? React.createElement(MobileTestList, null) : React.createElement(TestList, null),
|
|
120
|
+
isTestSectionVisible && React.createElement(TestComponentView, null))));
|
|
143
121
|
};
|
|
144
122
|
exports.FluentTester = FluentTester;
|
|
145
123
|
//# sourceMappingURL=FluentTester.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FluentTester.js","sourceRoot":"","sources":["../../../src/FluentTester.tsx"],"names":[],"mappings":";;;;AACA,uDAAyD;AACzD,wDAAmE;AACnE,8EAA4E;AAC5E,wDAA+B;AAC/B,
|
|
1
|
+
{"version":3,"file":"FluentTester.js","sourceRoot":"","sources":["../../../src/FluentTester.tsx"],"names":[],"mappings":";;;;AACA,uDAAyD;AACzD,wDAAmE;AACnE,8EAA4E;AAC5E,wDAA+B;AAC/B,6CAAkH;AAClH,yDAA8F;AAC9F,yDAAkF;AAClF,kEAA8D;AAC9D,qDAAoD;AACpD,yCAAoC;AACpC,sDAAwD;AAkBxD,IAAM,eAAe,GAAG,IAAA,oCAAgB,EAAC,UAAC,CAAQ;IAChD,OAAO;QACL,IAAI,EAAE;YACJ,eAAe,EAAE,CAAC,CAAC,MAAM,CAAC,UAAU;YACpC,IAAI,EAAE,CAAC;YACP,QAAQ,EAAE,CAAC;YACX,aAAa,EAAE,QAAQ;YACvB,cAAc,EAAE,YAAY;YAC5B,UAAU,EAAE,SAAS;YACrB,OAAO,EAAE,CAAC;SACX;QACD,aAAa,EAAE;YACb,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,WAAW;YACjC,WAAW,EAAE,GAAG;SACjB;KACF,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,IAAM,cAAc,GAA4B;IAC9C,OAAO,oBAAC,mBAAM,IAAC,KAAK,EAAE,2BAAkB,CAAC,MAAM,6CAAiD,CAAC;AACnG,CAAC,CAAC;AAEF,IAAM,eAAe,GAAG,wBAAS,CAAC,SAAS,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC;IAClD,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,gBAAgB;IAChC,cAAc,EAAE,CAAC;CAClB,CAAC,EAHiD,CAGjD,CAAC,CAAC;AAEJ,IAAM,iBAAiB,GAAG,wBAAS,CAAC,SAAS,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC;IACpD,KAAK,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K,EAAE,MAAM,EAAE,kBAAS;QACtF,oBAAC,MAAM,IAAC,oBAAoB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,CAAC,cAAc,EAAE,sBAAsB,EAAE,WAAW,GAAI;QACjI,oBAAC,eAAe,OAAG;QACnB,oBAAC,mBAAI,IAAC,KAAK,EAAE,2BAAkB,CAAC,QAAQ;YACrC,oBAAoB,CAAC,CAAC,CAAC,oBAAC,cAAc,OAAG,CAAC,CAAC,CAAC,oBAAC,QAAQ,OAAG;YACxD,oBAAoB,IAAI,oBAAC,iBAAiB,OAAG,CACzC,CACE,CACZ,CAAC;AACJ,CAAC,CAAC;AAjHW,QAAA,YAAY,gBAiHvB"}
|
|
@@ -80,6 +80,14 @@ export declare const fluentTesterStyles: {
|
|
|
80
80
|
flexDirection: "row";
|
|
81
81
|
justifyContent: "space-between";
|
|
82
82
|
};
|
|
83
|
+
headerWithBackButton: {
|
|
84
|
+
flexDirection: "column";
|
|
85
|
+
justifyContent: "space-between";
|
|
86
|
+
};
|
|
87
|
+
backButton: {
|
|
88
|
+
alignSelf: "flex-start";
|
|
89
|
+
display: "flex";
|
|
90
|
+
};
|
|
83
91
|
testHeader: {
|
|
84
92
|
marginBottom: number;
|
|
85
93
|
marginTop: number;
|
|
@@ -114,7 +122,8 @@ export declare const fluentTesterStyles: {
|
|
|
114
122
|
marginHorizontal: number;
|
|
115
123
|
};
|
|
116
124
|
testSection: {
|
|
117
|
-
|
|
125
|
+
width: string;
|
|
126
|
+
padding: number;
|
|
118
127
|
};
|
|
119
128
|
noTest: {
|
|
120
129
|
alignSelf: "center";
|
|
@@ -145,9 +154,6 @@ export declare const mobileStyles: {
|
|
|
145
154
|
fontSize: number;
|
|
146
155
|
paddingVertical: number;
|
|
147
156
|
};
|
|
148
|
-
testSection: {
|
|
149
|
-
width: string;
|
|
150
|
-
};
|
|
151
157
|
};
|
|
152
158
|
export declare const testContentRootViewStyle: (import("react-native").ViewStyle | {
|
|
153
159
|
minHeight: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/TestComponents/Common/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+D3B,CAAC;AAEH,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/TestComponents/Common/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+D3B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8D7B,CAAC;AAEH,eAAO,MAAM,UAAU,EAAE,WAAW,CAAC,OAAO,CAM3C,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,OAAO,CAIpD,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;CAsBvB,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;IAAsC,CAAC"}
|
|
@@ -81,6 +81,14 @@ exports.fluentTesterStyles = react_native_1.StyleSheet.create({
|
|
|
81
81
|
flexDirection: 'row',
|
|
82
82
|
justifyContent: 'space-between',
|
|
83
83
|
},
|
|
84
|
+
headerWithBackButton: {
|
|
85
|
+
flexDirection: 'column',
|
|
86
|
+
justifyContent: 'space-between',
|
|
87
|
+
},
|
|
88
|
+
backButton: {
|
|
89
|
+
alignSelf: 'flex-start',
|
|
90
|
+
display: 'flex',
|
|
91
|
+
},
|
|
84
92
|
testHeader: {
|
|
85
93
|
marginBottom: 8,
|
|
86
94
|
marginTop: 4,
|
|
@@ -98,8 +106,6 @@ exports.fluentTesterStyles = react_native_1.StyleSheet.create({
|
|
|
98
106
|
scrollViewStyle: {
|
|
99
107
|
flexDirection: 'column',
|
|
100
108
|
alignItems: 'stretch',
|
|
101
|
-
// height: 200,
|
|
102
|
-
// width: 200,
|
|
103
109
|
},
|
|
104
110
|
scrollViewContainer: {
|
|
105
111
|
height: 250,
|
|
@@ -115,7 +121,8 @@ exports.fluentTesterStyles = react_native_1.StyleSheet.create({
|
|
|
115
121
|
},
|
|
116
122
|
testListSeparator: { marginHorizontal: 8 },
|
|
117
123
|
testSection: {
|
|
118
|
-
|
|
124
|
+
width: '100%',
|
|
125
|
+
padding: 8,
|
|
119
126
|
},
|
|
120
127
|
noTest: {
|
|
121
128
|
alignSelf: 'center',
|
|
@@ -156,9 +163,6 @@ exports.mobileStyles = react_native_1.StyleSheet.create({
|
|
|
156
163
|
fontSize: 18,
|
|
157
164
|
paddingVertical: 8,
|
|
158
165
|
},
|
|
159
|
-
testSection: {
|
|
160
|
-
width: '100%',
|
|
161
|
-
},
|
|
162
166
|
});
|
|
163
167
|
exports.testContentRootViewStyle = [exports.stackStyle, exports.commonTestStyles.view];
|
|
164
168
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../src/TestComponents/Common/styles.ts"],"names":[],"mappings":";;;AAAA,6CAA0C;AAG7B,QAAA,gBAAgB,GAAG,yBAAU,CAAC,MAAM,CAAC;IAChD,IAAI,EAAE;QACJ,SAAS,EAAE,EAAE;QACb,WAAW,EAAE,EAAE;QACf,aAAa,EAAE,QAAQ;QACvB,UAAU,EAAE,YAAY;KACzB;IACD,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;IACjB,MAAM,EAAE;QACN,cAAc,EAAE,CAAC;QACjB,QAAQ,EAAE,EAAE;KACb;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
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../src/TestComponents/Common/styles.ts"],"names":[],"mappings":";;;AAAA,6CAA0C;AAG7B,QAAA,gBAAgB,GAAG,yBAAU,CAAC,MAAM,CAAC;IAChD,IAAI,EAAE;QACJ,SAAS,EAAE,EAAE;QACb,WAAW,EAAE,EAAE;QACf,aAAa,EAAE,QAAQ;QACvB,UAAU,EAAE,YAAY;KACzB;IACD,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;IACjB,MAAM,EAAE;QACN,cAAc,EAAE,CAAC;QACjB,QAAQ,EAAE,EAAE;KACb;IACD,OAAO,EAAE;QACP,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,MAAM;QAClB,KAAK,EAAE,SAAS;QAChB,SAAS,EAAE,EAAE;KACd;IACD,cAAc,EAAE;QACd,MAAM,EAAE,GAAG;QACX,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,cAAc;KAC/B;IACD,QAAQ,EAAE;QACR,QAAQ,EAAE,CAAC;KACZ;IACD,cAAc,EAAE;QACd,aAAa,EAAE,QAAQ;QACvB,IAAI,EAAE,CAAC;KACR;IACD,gBAAgB,EAAE;QAChB,IAAI,EAAE,CAAC;QACP,aAAa,EAAE,KAAK;KACrB;IACD,OAAO,EAAE;QACP,cAAc,EAAE,CAAC;KAClB;IACD,KAAK,EAAE;QACL,WAAW,EAAE,CAAC;QACd,WAAW,EAAE,SAAS;QACtB,OAAO,EAAE,EAAE;QACX,MAAM,EAAE,CAAC;KACV;IACD,MAAM,EAAE;QACN,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,QAAQ;KACrB;IACD,OAAO,EAAE;QACP,WAAW,EAAE,CAAC;QACd,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE,EAAE;QACZ,KAAK,EAAE,GAAG;QACV,YAAY,EAAE,CAAC;QACf,eAAe,EAAE,CAAC;KACnB;IACD,IAAI,EAAE;QACJ,SAAS,EAAE,GAAG;QACd,cAAc,EA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K,EAAE,MAAM;QACb,OAAO,EAAE,CAAC;KACX;IACD,MAAM,EAAE;QACN,SAAS,EAAE,QAAQ;QACnB,QAAQ,EAAE,EAAE;KACb;CACF,CAAC,CAAC;AAEU,QAAA,UAAU,GAAyB;IAC9C,WAAW,EAAE,CAAC;IACd,WAAW,EAAE,SAAS;IACtB,eAAe,EAAE,CAAC;IAClB,iBAAiB,EAAE,EAAE;IACrB,MAAM,EAAE,CAAC;CACV,CAAC;AAEW,QAAA,mBAAmB,GAAyB;IACvD,MAAM,EAAE,GAAG;IACX,aAAa,EAAE,KAAK;IACpB,cAAc,EAAE,cAAc;CAC/B,CAAC;AAEW,QAAA,YAAY,GAAG,yBAAU,CAAC,MAAM,CAAC;IAC5C,MAAM,EAAE;QACN,aAAa,EAAE,QAAQ;QACvB,cAAc,EAAE,eAAe;KAChC;IACD,YAAY,EAAE;QACZ,aAAa,EAAE,KAAK;QACpB,gBAAgB,EAAE,EAAE;QACpB,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,CAAC;QAChB,IAAI,EAAE,CAAC;QACP,cAAc,EAAE,cAAc;KAC/B;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,MAAM;KACd;IACD,YAAY,EAAE;QACZ,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,MAAM;QACd,QAAQ,EAAE,EAAE;QACZ,eAAe,EAAE,CAAC;KACnB;CACF,CAAC,CAAC;AAEU,QAAA,wBAAwB,GAAG,CAAC,kBAAU,EAAE,wBAAgB,CAAC,IAAI,CAAC,CAAC"}
|
package/package.json
CHANGED
package/src/FluentTester.tsx
CHANGED
|
@@ -3,9 +3,9 @@ import { Separator, Text } from '@fluentui/react-native';
|
|
|
3
3
|
import { ButtonV1 as Button } from '@fluentui-react-native/button';
|
|
4
4
|
import { themedStyleSheet } from '@fluentui-react-native/themed-stylesheet';
|
|
5
5
|
import * as React from 'react';
|
|
6
|
-
import { ScrollView, View, Text as RNText, Platform, SafeAreaView, BackHandler } from 'react-native';
|
|
6
|
+
import { ScrollView, View, Text as RNText, Platform, SafeAreaView, BackHandler, I18nManager } from 'react-native';
|
|
7
7
|
import { BASE_TESTPAGE, TESTPAGE_BUTTONS_SCROLLVIEWER } from './TestComponents/Common/consts';
|
|
8
|
-
import {
|
|
8
|
+
import { fluentTesterStyles, mobileStyles } from './TestComponents/Common/styles';
|
|
9
9
|
import { useTheme } from '@fluentui-react-native/theme-types';
|
|
10
10
|
import { ThemePickers } from './theme/ThemePickers';
|
|
11
11
|
import { tests } from './testPages';
|
|
@@ -17,14 +17,16 @@ import MessageQueue from 'react-native/Libraries/BatchedBridge/MessageQueue';
|
|
|
17
17
|
MessageQueue.spy(true);
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
-
const EmptyComponent: React.FunctionComponent = () => {
|
|
21
|
-
return <RNText style={fluentTesterStyles.noTest}>Select a component from the left.</RNText>;
|
|
22
|
-
};
|
|
23
20
|
export interface FluentTesterProps {
|
|
24
|
-
initialTest?: string;
|
|
25
21
|
enableSinglePaneView?: boolean;
|
|
26
22
|
}
|
|
27
23
|
|
|
24
|
+
interface HeaderProps {
|
|
25
|
+
enableSinglePaneView?: boolean;
|
|
26
|
+
enableBackButtonIOS?: boolean;
|
|
27
|
+
onBackButtonPressedIOS?: () => void;
|
|
28
|
+
}
|
|
29
|
+
|
|
28
30
|
const getThemedStyles = themedStyleSheet((t: Theme) => {
|
|
29
31
|
return {
|
|
30
32
|
root: {
|
|
@@ -43,6 +45,10 @@ const getThemedStyles = themedStyleSheet((t: Theme) => {
|
|
|
43
45
|
};
|
|
44
46
|
});
|
|
45
47
|
|
|
48
|
+
const EmptyComponent: React.FunctionComponent = () => {
|
|
49
|
+
return <RNText style={fluentTesterStyles.noTest}>Select a component from the test list.</RNText>;
|
|
50
|
+
};
|
|
51
|
+
|
|
46
52
|
const HeaderSeparator = Separator.customize((t) => ({
|
|
47
53
|
color: t.colors.bodyFrameDivider,
|
|
48
54
|
separatorWidth: 2,
|
|
@@ -53,31 +59,64 @@ const TestListSeparator = Separator.customize((t) => ({
|
|
|
53
59
|
separatorWidth: 2,
|
|
54
60
|
}));
|
|
55
61
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
const
|
|
59
|
-
const sortedTestComponents = filteredTestComponents.sort((a, b) => a.name.localeCompare(b.name));
|
|
62
|
+
const Header: React.FunctionComponent<HeaderProps> = React.memo((props) => {
|
|
63
|
+
const { enableSinglePaneView, enableBackButtonIOS, onBackButtonPressedIOS } = props;
|
|
64
|
+
const theme = useTheme();
|
|
60
65
|
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
});
|
|
66
|
+
const headerStyle = enableSinglePaneView ? fluentTesterStyles.headerWithBackButton : fluentTesterStyles.header;
|
|
67
|
+
|
|
68
|
+
const backButtonTitle = I18nManager.isRTL ? 'Back ›' : '‹ Back';
|
|
65
69
|
|
|
66
|
-
|
|
70
|
+
return (
|
|
71
|
+
<View style={headerStyle}>
|
|
72
|
+
<Text
|
|
73
|
+
style={fluentTesterStyles.testHeader}
|
|
74
|
+
variant="heroLargeSemibold"
|
|
75
|
+
color={theme.host.palette?.TextEmphasis}
|
|
76
|
+
testID={BASE_TESTPAGE}
|
|
77
|
+
>
|
|
78
|
+
⚛ FluentUI Tests
|
|
79
|
+
</Text>
|
|
80
|
+
<View style={fluentTesterStyles.header}>
|
|
81
|
+
{/* On iPhone, We need a back button. Android has an OS back button, while desktop platforms have a two-pane view */}
|
|
82
|
+
{Platform.OS === 'ios' && !Platform.isPad && (
|
|
83
|
+
<Button
|
|
84
|
+
appearance="subtle"
|
|
85
|
+
style={fluentTesterStyles.backButton}
|
|
86
|
+
onClick={onBackButtonPressedIOS}
|
|
87
|
+
disabled={!enableBackButtonIOS}
|
|
88
|
+
>
|
|
89
|
+
{backButtonTitle}
|
|
90
|
+
</Button>
|
|
91
|
+
)}
|
|
92
|
+
<ThemePickers />
|
|
93
|
+
</View>
|
|
94
|
+
</View>
|
|
95
|
+
);
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
// filters and sorts tests alphabetically
|
|
99
|
+
const filteredTestComponents = tests.filter((test) => test.platforms.includes(Platform.OS as string));
|
|
100
|
+
const sortedTestComponents = filteredTestComponents.sort((a, b) => a.name.localeCompare(b.name));
|
|
101
|
+
|
|
102
|
+
export const FluentTester: React.FunctionComponent<FluentTesterProps> = (props: FluentTesterProps) => {
|
|
103
|
+
const { enableSinglePaneView } = props;
|
|
104
|
+
|
|
105
|
+
const [selectedTestIndex, setSelectedTestIndex] = React.useState(-1);
|
|
67
106
|
const [onTestListView, setOnTestListView] = React.useState(true);
|
|
107
|
+
const theme = useTheme();
|
|
108
|
+
const themedStyles = getThemedStyles(theme);
|
|
68
109
|
|
|
69
|
-
const onBackPress = () => {
|
|
110
|
+
const onBackPress = React.useCallback(() => {
|
|
70
111
|
setOnTestListView(true);
|
|
71
112
|
if (Platform.OS === 'android') {
|
|
72
113
|
BackHandler.removeEventListener('hardwareBackPress', onBackPress);
|
|
73
114
|
}
|
|
74
115
|
return true;
|
|
75
|
-
};
|
|
116
|
+
}, []);
|
|
76
117
|
|
|
77
118
|
const TestComponent = selectedTestIndex == -1 ? EmptyComponent : sortedTestComponents[selectedTestIndex].component;
|
|
78
119
|
|
|
79
|
-
const themedStyles = getThemedStyles(useTheme());
|
|
80
|
-
|
|
81
120
|
// This is used to initially bring focus to the app on win32
|
|
82
121
|
const focusOnMountRef = React.useRef<View>();
|
|
83
122
|
|
|
@@ -92,58 +131,10 @@ export const FluentTester: React.FunctionComponent<FluentTesterProps> = (props:
|
|
|
92
131
|
default: View,
|
|
93
132
|
});
|
|
94
133
|
|
|
95
|
-
const Header: React.FunctionComponent = () => {
|
|
96
|
-
const theme = useTheme();
|
|
97
|
-
|
|
98
|
-
return (
|
|
99
|
-
<View style={fluentTesterStyles.header}>
|
|
100
|
-
<Text
|
|
101
|
-
testID={BASE_TESTPAGE}
|
|
102
|
-
style={fluentTesterStyles.testHeader}
|
|
103
|
-
variant="heroLargeSemibold"
|
|
104
|
-
color={theme.host.palette?.TextEmphasis}
|
|
105
|
-
>
|
|
106
|
-
⚛ FluentUI Tests
|
|
107
|
-
</Text>
|
|
108
|
-
<ThemePickers />
|
|
109
|
-
</View>
|
|
110
|
-
);
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
// iOS needs a software back button, which is shown on a newline along with the ThemePickers
|
|
114
|
-
const MobileHeader: React.FunctionComponent = () => {
|
|
115
|
-
const theme = useTheme();
|
|
116
|
-
|
|
117
|
-
return (
|
|
118
|
-
<View style={mobileStyles.header}>
|
|
119
|
-
<Text
|
|
120
|
-
style={fluentTesterStyles.testHeader}
|
|
121
|
-
variant="heroLargeSemibold"
|
|
122
|
-
color={theme.host.palette?.TextEmphasis}
|
|
123
|
-
testID={BASE_TESTPAGE}
|
|
124
|
-
>
|
|
125
|
-
⚛ FluentUI Tests
|
|
126
|
-
</Text>
|
|
127
|
-
<View style={fluentTesterStyles.header}>
|
|
128
|
-
{/* on iOS, display a back Button */}
|
|
129
|
-
<Button
|
|
130
|
-
appearance="subtle"
|
|
131
|
-
style={{ alignSelf: 'flex-start', display: Platform.OS === 'ios' ? 'flex' : 'none' }}
|
|
132
|
-
onClick={onBackPress}
|
|
133
|
-
disabled={onTestListView}
|
|
134
|
-
>
|
|
135
|
-
‹ Back
|
|
136
|
-
</Button>
|
|
137
|
-
<ThemePickers />
|
|
138
|
-
</View>
|
|
139
|
-
</View>
|
|
140
|
-
);
|
|
141
|
-
};
|
|
142
|
-
|
|
143
134
|
const isTestListVisible = !enableSinglePaneView || (enableSinglePaneView && onTestListView);
|
|
144
135
|
const isTestSectionVisible = !enableSinglePaneView || (enableSinglePaneView && !onTestListView);
|
|
145
136
|
|
|
146
|
-
const TestList: React.FunctionComponent = () => {
|
|
137
|
+
const TestList: React.FunctionComponent = React.memo(() => {
|
|
147
138
|
return (
|
|
148
139
|
<View style={fluentTesterStyles.testList}>
|
|
149
140
|
<ScrollView contentContainerStyle={fluentTesterStyles.testListContainerStyle} testID={TESTPAGE_BUTTONS_SCROLLVIEWER}>
|
|
@@ -168,9 +159,9 @@ export const FluentTester: React.FunctionComponent<FluentTesterProps> = (props:
|
|
|
168
159
|
<TestListSeparator vertical style={fluentTesterStyles.testListSeparator} />
|
|
169
160
|
</View>
|
|
170
161
|
);
|
|
171
|
-
};
|
|
162
|
+
});
|
|
172
163
|
|
|
173
|
-
const MobileTestList: React.FunctionComponent = () => {
|
|
164
|
+
const MobileTestList: React.FunctionComponent = React.memo(() => {
|
|
174
165
|
return (
|
|
175
166
|
<View style={{ ...mobileStyles.testList, display: isTestListVisible ? 'flex' : 'none' }}>
|
|
176
167
|
<ScrollView contentContainerStyle={fluentTesterStyles.testListContainerStyle}>
|
|
@@ -200,47 +191,25 @@ export const FluentTester: React.FunctionComponent<FluentTesterProps> = (props:
|
|
|
200
191
|
</ScrollView>
|
|
201
192
|
</View>
|
|
202
193
|
);
|
|
203
|
-
};
|
|
194
|
+
});
|
|
204
195
|
|
|
205
196
|
const TestComponentView: React.FunctionComponent = () => {
|
|
206
197
|
return (
|
|
207
|
-
<ScrollView
|
|
198
|
+
<ScrollView contentContainerStyle={fluentTesterStyles.testSection}>
|
|
208
199
|
<TestComponent />
|
|
209
200
|
</ScrollView>
|
|
210
201
|
);
|
|
211
202
|
};
|
|
212
203
|
|
|
213
|
-
const MobileTestComponentView: React.FunctionComponent = () => {
|
|
214
|
-
return (
|
|
215
|
-
<View style={{ ...mobileStyles.testSection, display: isTestSectionVisible ? 'flex' : 'none' }}>
|
|
216
|
-
<ScrollView>
|
|
217
|
-
<TestComponent />
|
|
218
|
-
</ScrollView>
|
|
219
|
-
</View>
|
|
220
|
-
);
|
|
221
|
-
};
|
|
222
|
-
|
|
223
|
-
const TesterContent: React.FunctionComponent = () => {
|
|
224
|
-
return (
|
|
225
|
-
<View style={commonTestStyles.flex}>
|
|
226
|
-
{enableSinglePaneView ? <MobileHeader /> : <Header />}
|
|
227
|
-
|
|
228
|
-
<HeaderSeparator />
|
|
229
|
-
|
|
230
|
-
<View style={fluentTesterStyles.testRoot}>
|
|
231
|
-
{enableSinglePaneView ? <MobileTestList /> : <TestList />}
|
|
232
|
-
{enableSinglePaneView ? <MobileTestComponentView /> : <TestComponentView />}
|
|
233
|
-
</View>
|
|
234
|
-
</View>
|
|
235
|
-
);
|
|
236
|
-
};
|
|
237
|
-
|
|
238
204
|
return (
|
|
239
205
|
// TODO: Figure out why making this view accessible breaks element querying on iOS.
|
|
240
|
-
<
|
|
241
|
-
<
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
206
|
+
<RootView style={themedStyles.root} accessible={Platform.OS !== 'ios'} testID={ROOT_VIEW}>
|
|
207
|
+
<Header enableSinglePaneView={enableSinglePaneView} enableBackButtonIOS={!onTestListView} onBackButtonPressedIOS={onBackPress} />
|
|
208
|
+
<HeaderSeparator />
|
|
209
|
+
<View style={fluentTesterStyles.testRoot}>
|
|
210
|
+
{enableSinglePaneView ? <MobileTestList /> : <TestList />}
|
|
211
|
+
{isTestSectionVisible && <TestComponentView />}
|
|
212
|
+
</View>
|
|
213
|
+
</RootView>
|
|
245
214
|
);
|
|
246
215
|
};
|
|
@@ -77,36 +77,36 @@ export const fluentTesterStyles = StyleSheet.create({
|
|
|
77
77
|
alignItems: 'stretch',
|
|
78
78
|
padding: 4,
|
|
79
79
|
},
|
|
80
|
-
|
|
81
80
|
header: {
|
|
82
81
|
flexDirection: 'row',
|
|
83
82
|
justifyContent: 'space-between',
|
|
84
83
|
},
|
|
85
|
-
|
|
84
|
+
headerWithBackButton: {
|
|
85
|
+
flexDirection: 'column',
|
|
86
|
+
justifyContent: 'space-between',
|
|
87
|
+
},
|
|
88
|
+
backButton: {
|
|
89
|
+
alignSelf: 'flex-start',
|
|
90
|
+
display: 'flex',
|
|
91
|
+
},
|
|
86
92
|
testHeader: {
|
|
87
93
|
marginBottom: 8,
|
|
88
94
|
marginTop: 4,
|
|
89
95
|
},
|
|
90
|
-
|
|
91
96
|
testList: {
|
|
92
97
|
minWidth: 160,
|
|
93
98
|
flexShrink: 0,
|
|
94
99
|
flexGrow: 0,
|
|
95
100
|
flexDirection: 'row',
|
|
96
101
|
},
|
|
97
|
-
|
|
98
102
|
testListContainerStyle: {
|
|
99
103
|
flexDirection: 'column',
|
|
100
104
|
alignItems: 'stretch',
|
|
101
105
|
},
|
|
102
|
-
|
|
103
106
|
scrollViewStyle: {
|
|
104
107
|
flexDirection: 'column',
|
|
105
108
|
alignItems: 'stretch',
|
|
106
|
-
// height: 200,
|
|
107
|
-
// width: 200,
|
|
108
109
|
},
|
|
109
|
-
|
|
110
110
|
scrollViewContainer: {
|
|
111
111
|
height: 250,
|
|
112
112
|
width: 150,
|
|
@@ -114,19 +114,16 @@ export const fluentTesterStyles = StyleSheet.create({
|
|
|
114
114
|
flexGrow: 0,
|
|
115
115
|
flexDirection: 'column',
|
|
116
116
|
},
|
|
117
|
-
|
|
118
117
|
testListItem: {
|
|
119
118
|
width: '100%',
|
|
120
119
|
borderRadius: 0,
|
|
121
120
|
justifyContent: 'flex-start',
|
|
122
121
|
},
|
|
123
|
-
|
|
124
122
|
testListSeparator: { marginHorizontal: 8 },
|
|
125
|
-
|
|
126
123
|
testSection: {
|
|
127
|
-
|
|
124
|
+
width: '100%',
|
|
125
|
+
padding: 8,
|
|
128
126
|
},
|
|
129
|
-
|
|
130
127
|
noTest: {
|
|
131
128
|
alignSelf: 'center',
|
|
132
129
|
fontSize: 18,
|
|
@@ -169,9 +166,6 @@ export const mobileStyles = StyleSheet.create({
|
|
|
169
166
|
fontSize: 18,
|
|
170
167
|
paddingVertical: 8,
|
|
171
168
|
},
|
|
172
|
-
testSection: {
|
|
173
|
-
width: '100%',
|
|
174
|
-
},
|
|
175
169
|
});
|
|
176
170
|
|
|
177
171
|
export const testContentRootViewStyle = [stackStyle, commonTestStyles.view];
|