@fluentui-react-native/tester 0.80.0 → 0.81.2
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 +124 -1
- package/CHANGELOG.md +39 -2
- package/ios/Podfile +1 -1
- package/ios/Podfile.lock +1 -113
- package/lib/E2E/common/BasePage.macos.d.ts.map +1 -1
- package/lib/E2E/common/BasePage.macos.js +4 -8
- package/lib/E2E/common/BasePage.macos.js.map +1 -1
- package/lib/TestComponents/Icon/IconTest.d.ts.map +1 -1
- package/lib/TestComponents/Icon/IconTest.js +3 -2
- package/lib/TestComponents/Icon/IconTest.js.map +1 -1
- package/lib-commonjs/E2E/common/BasePage.macos.d.ts.map +1 -1
- package/lib-commonjs/E2E/common/BasePage.macos.js +4 -8
- package/lib-commonjs/E2E/common/BasePage.macos.js.map +1 -1
- package/lib-commonjs/TestComponents/Icon/IconTest.d.ts.map +1 -1
- package/lib-commonjs/TestComponents/Icon/IconTest.js +2 -1
- package/lib-commonjs/TestComponents/Icon/IconTest.js.map +1 -1
- package/macos/Podfile +1 -0
- package/macos/Podfile.lock +217 -217
- package/package.json +15 -15
- package/src/E2E/README.md +9 -7
- package/src/E2E/common/BasePage.macos.ts +4 -8
- package/src/TestComponents/Icon/IconTest.tsx +4 -1
- package/wdio.conf.macos.js +19 -4
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
const DUMMY_CHAR = '';
|
|
2
2
|
export const COMPONENT_SCROLL_COORDINATES = { x: -0, y: -100 }; // These are the offsets. Y is negative because we want the touch to move up (and thus it scrolls down)
|
|
3
3
|
|
|
4
|
-
/* Mac-Specific Selector. We use this to get elements on the test page
|
|
4
|
+
/* Mac-Specific Selector. We use this to get elements on the test page.
|
|
5
|
+
* Specifically, this is the xpath selector. See https://v6.webdriver.io/docs/selectors.html#xpath */
|
|
5
6
|
export function By(identifier: string): WebdriverIO.Element {
|
|
6
7
|
return $('//*[@identifier="' + identifier + '"]');
|
|
7
8
|
}
|
|
@@ -55,10 +56,7 @@ export class BasePage {
|
|
|
55
56
|
/* Scrolls until the desired test page's button is displayed. We use the scroll viewer UI element as the point to start scrolling.
|
|
56
57
|
* We use a negative number as the Y-coordinate because that enables us to scroll downwards */
|
|
57
58
|
scrollToComponentButton(): void {
|
|
58
|
-
|
|
59
|
-
const scrollViewElement = $('~SCROLLVIEW_TEST_ID');
|
|
60
|
-
driver.touchScroll(COMPONENT_SCROLL_COORDINATES.x, COMPONENT_SCROLL_COORDINATES.y, scrollViewElement.elementId);
|
|
61
|
-
}
|
|
59
|
+
/* TODO: Implement (not needed yet) */
|
|
62
60
|
}
|
|
63
61
|
|
|
64
62
|
/* Waits for the test page to load. If the test page doesn't load before the timeout, it causes the test to fail. */
|
|
@@ -106,9 +104,7 @@ export class BasePage {
|
|
|
106
104
|
|
|
107
105
|
/* Scrolls to the primary UI test element until it is displayed. It uses the ScrollView that encapsulates each test page. */
|
|
108
106
|
scrollToTestElement(): void {
|
|
109
|
-
|
|
110
|
-
driver.touchScroll(COMPONENT_SCROLL_COORDINATES.x, COMPONENT_SCROLL_COORDINATES.y, $('~ScrollViewAreaForComponents').elementId);
|
|
111
|
-
}
|
|
107
|
+
/* TODO: Implement (not needed yet) */
|
|
112
108
|
}
|
|
113
109
|
|
|
114
110
|
/* A method that allows the caller to pass in a condition. A wrapper for waitUntil(). Once testing becomes more extensive,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { Platform, View } from 'react-native';
|
|
3
|
+
import { Platform, PlatformColor, View } from 'react-native';
|
|
4
4
|
import { Text } from '@fluentui/react-native';
|
|
5
5
|
import { Icon, RasterImageIconProps, SvgIconProps, FontIconProps } from '@fluentui-react-native/icon';
|
|
6
6
|
import { Test, TestSection, PlatformStatus } from '../Test';
|
|
@@ -78,6 +78,9 @@ const Icons: React.FunctionComponent = () => {
|
|
|
78
78
|
shouldShowDataUri ? <Icon svgSource={svgD20DataUriProps} width={100} height={100} color="#7a7" /> : null
|
|
79
79
|
}
|
|
80
80
|
<Icon svgSource={svgUriProps} width={100} height={100} color="red" />
|
|
81
|
+
{Platform.OS === ('win32' as any) && (
|
|
82
|
+
<Icon svgSource={svgProps} width={100} height={100} color={PlatformColor('WindowText')} accessibilityLabel="Wheelchair" />
|
|
83
|
+
)}
|
|
81
84
|
</View>
|
|
82
85
|
) : null}
|
|
83
86
|
{showRasterIcons ? (
|
package/wdio.conf.macos.js
CHANGED
|
@@ -16,8 +16,8 @@ exports.config = {
|
|
|
16
16
|
{
|
|
17
17
|
maxInstances: 1, // Maximum number of total parallel running workers.
|
|
18
18
|
platformName: 'mac',
|
|
19
|
-
automationName: 'Mac2',
|
|
20
|
-
bundleId: 'com.microsoft.ReactTestApp',
|
|
19
|
+
'appium:automationName': 'Mac2',
|
|
20
|
+
'appium:bundleId': 'com.microsoft.ReactTestApp',
|
|
21
21
|
},
|
|
22
22
|
],
|
|
23
23
|
|
|
@@ -113,8 +113,23 @@ exports.config = {
|
|
|
113
113
|
* Hook that gets executed before the suite starts
|
|
114
114
|
* @param {Object} suite suite details
|
|
115
115
|
*/
|
|
116
|
-
|
|
117
|
-
|
|
116
|
+
beforeSuite: function () {
|
|
117
|
+
// Unlike other platforms, the appium Mac2 driver doesn't have a command to maximize the app.
|
|
118
|
+
// Because of this, we look up the maximize window button directly through it's XCUI identifier and click it.
|
|
119
|
+
let fluentTesterWindow = null;
|
|
120
|
+
browser.waitUntil(() => {
|
|
121
|
+
fluentTesterWindow = $('//*[@title="Fluent Tester" and @elementType=4]');
|
|
122
|
+
return fluentTesterWindow != null;
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
timeout: 10000,
|
|
126
|
+
timeoutMsg: 'Could not find the FluentTester window. Cannot maximize app.',
|
|
127
|
+
interval: 500
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
const maxButton = fluentTesterWindow.$('//*[@identifier="_XCUI:FullScreenWindow" and @elementType=9]');
|
|
131
|
+
maxButton.click();
|
|
132
|
+
},
|
|
118
133
|
/**
|
|
119
134
|
* Function to be executed before a test (in Mocha/Jasmine) starts.
|
|
120
135
|
*/
|