Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .ado/templates/e2e-testing-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ steps:
condition: succeeded()
displayName: 'Create success build variable'

- script: |
yarn e2eprep:android
workingDirectory: apps/E2E
displayName: 'prepare E2E Android tests'
condition: succeeded()
- script: |
yarn e2etest:android
workingDirectory: apps/E2E
Expand Down
6 changes: 6 additions & 0 deletions .ado/templates/e2e-testing-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ steps:
condition: succeeded()
displayName: 'Create success build variable'

- script: |
yarn e2eprep:ios
workingDirectory: apps/E2E
displayName: 'prepare E2E iOS tests'
condition: succeeded()
- script: |
yarn e2etest:ios
workingDirectory: apps/E2E
Expand Down
6 changes: 6 additions & 0 deletions .ado/templates/e2e-testing-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ steps:
condition: succeeded()
displayName: 'Create success build variable'

- script: |
yarn e2eprep:macos
workingDirectory: apps/E2E
displayName: 'prepare E2E macos tests'
condition: succeeded()
- script: |
yarn e2etest:macos
workingDirectory: apps/E2E
Expand Down
6 changes: 6 additions & 0 deletions .ado/templates/e2e-testing-uwp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ steps:
condition: succeeded()
displayName: 'Create success build variable'

- script: |
yarn e2eprep:windows
workingDirectory: apps/E2E
displayName: 'prepare E2E Windows tests'
condition: succeeded()
- script: |
yarn e2etest:windows
workingDirectory: apps\E2E
Expand Down
6 changes: 6 additions & 0 deletions .ado/templates/e2e-testing-win32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ steps:
condition: succeeded()
displayName: 'Create success build variable'

- script: |
yarn e2eprep:win32
workingDirectory: apps/E2E
displayName: 'prepare E2E Win32 tests'
condition: succeeded()
- script: |
yarn e2etest:win32
workingDirectory: apps/E2E
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,7 @@ apps/*/.vscode/.react/
!**/.yarn/versions

# Ccache
.ccache
.ccache

# Appium
**/.appium
97 changes: 97 additions & 0 deletions .yarn/patches/expect-webdriverio-npm-5.6.1-69666d39e9.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
diff --git a/lib/index.js b/lib/index.js
index cff5a1256df83e746d874c5ca722d5b3b8c8ac3c..178a004a0b4231a6be964b8c33d153a2525ac168 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -20,18 +20,26 @@ expectLib.extend = (m) => {
};
expectLib.extend(filteredMatchers);
const expectWithSoft = expectLib;
-Object.defineProperty(expectWithSoft, 'soft', {
- value: (actual) => createSoftExpect(actual)
-});
-Object.defineProperty(expectWithSoft, 'getSoftFailures', {
- value: (testId) => SoftAssertService.getInstance().getFailures(testId)
-});
-Object.defineProperty(expectWithSoft, 'assertSoftFailures', {
- value: (testId) => SoftAssertService.getInstance().assertNoFailures(testId)
-});
-Object.defineProperty(expectWithSoft, 'clearSoftFailures', {
- value: (testId) => SoftAssertService.getInstance().clearFailures(testId)
-});
+if (!Object.prototype.hasOwnProperty.call(expectWithSoft, 'soft')) {
+ Object.defineProperty(expectWithSoft, 'soft', {
+ value: (actual) => createSoftExpect(actual)
+ });
+}
+if (!Object.prototype.hasOwnProperty.call(expectWithSoft, 'getSoftFailures')) {
+ Object.defineProperty(expectWithSoft, 'getSoftFailures', {
+ value: (testId) => SoftAssertService.getInstance().getFailures(testId)
+ });
+}
+if (!Object.prototype.hasOwnProperty.call(expectWithSoft, 'assertSoftFailures')) {
+ Object.defineProperty(expectWithSoft, 'assertSoftFailures', {
+ value: (testId) => SoftAssertService.getInstance().assertNoFailures(testId)
+ });
+}
+if (!Object.prototype.hasOwnProperty.call(expectWithSoft, 'clearSoftFailures')) {
+ Object.defineProperty(expectWithSoft, 'clearSoftFailures', {
+ value: (testId) => SoftAssertService.getInstance().clearFailures(testId)
+ });
+}
export const expect = expectWithSoft;
export const getConfig = () => DEFAULT_OPTIONS;
export const setDefaultOptions = (options = {}) => {
diff --git a/lib/index.js.bak b/lib/index.js.bak
new file mode 100644
index 0000000000000000000000000000000000000000..cff5a1256df83e746d874c5ca722d5b3b8c8ac3c
--- /dev/null
+++ b/lib/index.js.bak
@@ -0,0 +1,48 @@
+import { expect as expectLib } from 'expect';
+import * as wdioMatchers from './matchers.js';
+import { DEFAULT_OPTIONS } from './constants.js';
+import createSoftExpect from './softExpect.js';
+import { SoftAssertService } from './softAssert.js';
+export const matchers = new Map();
+const filteredMatchers = {};
+const extend = expectLib.extend;
+Object.keys(wdioMatchers).forEach(matcher => {
+ if (typeof wdioMatchers[matcher] === 'function') {
+ filteredMatchers[matcher] = wdioMatchers[matcher];
+ }
+});
+expectLib.extend = (m) => {
+ if (!m || typeof m !== 'object') {
+ return;
+ }
+ Object.entries(m).forEach(([name, matcher]) => matchers.set(name, matcher));
+ return extend(m);
+};
+expectLib.extend(filteredMatchers);
+const expectWithSoft = expectLib;
+Object.defineProperty(expectWithSoft, 'soft', {
+ value: (actual) => createSoftExpect(actual)
+});
+Object.defineProperty(expectWithSoft, 'getSoftFailures', {
+ value: (testId) => SoftAssertService.getInstance().getFailures(testId)
+});
+Object.defineProperty(expectWithSoft, 'assertSoftFailures', {
+ value: (testId) => SoftAssertService.getInstance().assertNoFailures(testId)
+});
+Object.defineProperty(expectWithSoft, 'clearSoftFailures', {
+ value: (testId) => SoftAssertService.getInstance().clearFailures(testId)
+});
+export const expect = expectWithSoft;
+export const getConfig = () => DEFAULT_OPTIONS;
+export const setDefaultOptions = (options = {}) => {
+ Object.entries(options).forEach(([key, value]) => {
+ if (key in DEFAULT_OPTIONS) {
+ DEFAULT_OPTIONS[key] = value;
+ }
+ });
+};
+export const setOptions = setDefaultOptions;
+export { SnapshotService } from './snapshot.js';
+export { SoftAssertService } from './softAssert.js';
+export { SoftAssertionService } from './softAssertService.js';
+export * as utils from './utils.js';
75 changes: 67 additions & 8 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,82 @@
dynamicPackageExtensions: ./scripts/dynamic.extensions.mjs
catalog:
'@types/jasmine': '5.1.13'
'@wdio/appium-service': '^9.23.0'
'@wdio/cli': '^9.23.0'
'@wdio/globals': '^9.23.0'
'@wdio/jasmine-framework': '^9.23.0'
'@wdio/json-reporter': '^9.20.0'
'@wdio/local-runner': '^9.23.0'
'@wdio/logger': '^9.18.0'
'@wdio/runner': '^9.23.0'
'@wdio/spec-reporter': '^9.20.0'
'appium': '^3.1.2'
'appium-mac2-driver': '^3.2.13'
'appium-uiautomator2-driver': '^6.7.8'
'appium-windows-driver': '^5.1.5'
'appium-xcuitest-driver': '^10.14.5'
'expect-webdriverio': '^5.6.1'
'rimraf': '^6.1.2'
'webdriverio': '^9.23.0'

enableGlobalCache: false
dynamicPackageExtensions: ./scripts/dynamic.extensions.mjs

enableScripts: false

nodeLinker: node-modules
globalFolder: .yarn/store

nodeLinker: pnpm

packageExtensions:
"@svgr/core@*":
'appium@*':
dependencies:
'@colors/colors': '*'
'appium-mac2-driver': '*'
'appium-uiautomator2-driver': '*'
'appium-windows-driver': '*'
'appium-xcuitest-driver': '*'
'appium-mac2-driver@*':
dependencies:
'appium': '*'
'appium-uiautomator2-driver@*':
dependencies:
'appium': '*'
'appium-windows-driver@*':
dependencies:
'appium': '*'
'appium-xcuitest-driver@*':
dependencies:
'appium': '*'
'iconv-lite@*':
dependencies:
'iconv-lite': '*'
'@wdio/appium-service@*':
dependencies:
'appium': '*'
'appium-webdriveragent@*':
dependencies:
appium-xcode: '*'
'expect-webdriverio@*':
dependencies:
'@wdio/globals': '*'
'@wdio/logger': '*'
'webdriverio': '*'
'@wdio/runner@*':
dependencies:
'expect-webdriverio': '*'
'@wdio/jasmine-framework@*':
dependencies:
'expect-webdriverio': '*'
'@svgr/core@*':
dependencies:
"@svgr/plugin-jsx": "*"
"@svgr/plugin-svgo": "*"
'@svgr/plugin-jsx': '*'
'@svgr/plugin-svgo': '*'
react-native-svg@*:
dependencies:
buffer: "*"
buffer: '*'

plugins:
- checksum: 672e525b81762c6162366bd3ffec5e86ab8fac2655ef0267047e86a0f32e79a4bde0f170bc30479663f40aa3f006d91f8dc3289f679dd4dc5ae5a5d12ba3ad0b
path: .yarn/plugins/@rnx-kit/yarn-plugin-dynamic-extensions.cjs
spec: "https://raw.githubusercontent.com/microsoft/rnx-kit/main/incubator/yarn-plugin-dynamic-extensions/index.js"
spec: 'https://raw.githubusercontent.com/microsoft/rnx-kit/main/incubator/yarn-plugin-dynamic-extensions/index.js'

yarnPath: .yarn/releases/yarn-4.11.0.cjs
64 changes: 37 additions & 27 deletions apps/E2E/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,29 @@
"version": "1.43.11",
"description": "Package containing E2E testing specs",
"license": "MIT",
"main": "lib-commonjs/index.js",
"module": "lib/index.js",
"react-native": "src/index.ts",
"main": "lib/index.js",
"module": "lib/index.mjs",
"typings": "lib/index.d.ts",
"exports": {
".": {
"import": "./lib/index.js",
"require": "./lib-commonjs/index.js",
"types": "./lib/index.d.ts"
"types": "./lib/index.d.ts",
"import": "./lib/index.mjs",
"require": "./lib/index.js"
}
},
"scripts": {
"build": "fluentui-scripts build",
"build": "fluentui-scripts hybrid-build",
"lint": "fluentui-scripts eslint",
"e2etest:android": "wdio run wdio.conf.android.js",
"e2etest:ios": "wdio run wdio.conf.ios.js",
"e2etest:macos": "wdio run wdio.conf.macos.js",
"e2etest:win32": "wdio run wdio.conf.win32.js",
"e2etest:windows": "rimraf errorShots reports && wdio run wdio.conf.windows.js"
"e2eprep:android": "cross-env APPIUM_HOME=.appium yarn exec appium driver install uiautomator2",
"e2eprep:ios": "cross-env APPIUM_HOME=.appium yarn exec appium driver install xcuitest",
"e2eprep:macos": "cross-env APPIUM_HOME=.appium yarn exec appium driver install mac2",
"e2eprep:win32": "cross-env APPIUM_HOME=.appium yarn exec appium driver install windows",
"e2eprep:windows": "cross-env APPIUM_HOME=.appium yarn exec appium driver install windows",
"e2etest:android": "cross-env APPIUM_HOME=.appium wdio run wdio.conf.android.js",
"e2etest:ios": "cross-env APPIUM_HOME=.appium wdio run wdio.conf.ios.js",
"e2etest:macos": "cross-env APPIUM_HOME=.appium wdio run wdio.conf.macos.js",
"e2etest:win32": "cross-env APPIUM_HOME=.appium wdio run wdio.conf.win32.js",
"e2etest:windows": "rimraf errorShots reports && cross-env APPIUM_HOME=.appium wdio run wdio.conf.windows.js"
},
"repository": {
"type": "git",
Expand All @@ -33,6 +37,8 @@
"dist/*"
],
"dependencies": {
"@office-iss/react-native-win32": "^0.74.0",
"@office-iss/rex-win32": "0.73.11-devmain.16.0.17615.15030",
"react": "18.2.0",
"react-native": "^0.74.0",
"react-native-macos": "^0.74.0",
Expand All @@ -48,26 +54,30 @@
"@react-native/metro-babel-transformer": "^0.74.0",
"@react-native/metro-config": "^0.74.0",
"@rnx-kit/metro-config": "^2.0.0",
"@types/jasmine": "5.1.4",
"@types/jasmine": "catalog:",
"@types/node": "^22.2.0",
"@types/react": "^18.2.0",
"@wdio/appium-service": "^9.12.6",
"@wdio/cli": "^9.12.6",
"@wdio/globals": "^9.12.6",
"@wdio/jasmine-framework": "^9.12.6",
"@wdio/json-reporter": "^9.12.6",
"@wdio/local-runner": "^9.12.6",
"@wdio/spec-reporter": "^9.12.6",
"appium": "^2.11.2",
"appium-mac2-driver": "^1.12.0",
"appium-uiautomator2-driver": "^3.0.5",
"appium-windows-driver": "^2.12.18",
"appium-xcuitest-driver": "^7.9.1",
"@wdio/appium-service": "catalog:",
"@wdio/cli": "catalog:",
"@wdio/globals": "catalog:",
"@wdio/jasmine-framework": "catalog:",
"@wdio/json-reporter": "catalog:",
"@wdio/local-runner": "catalog:",
"@wdio/logger": "catalog:",
"@wdio/runner": "catalog:",
"@wdio/spec-reporter": "catalog:",
"appium": "catalog:",
"appium-mac2-driver": "catalog:",
"appium-uiautomator2-driver": "catalog:",
"appium-windows-driver": "catalog:",
"appium-xcuitest-driver": "catalog:",
"cross-env": "^7.0.3",
"expect-webdriverio": "catalog:",
"metro-config": "^0.80.3",
"rimraf": "^5.0.1",
"ts-node": "^10.7.0",
"typescript": "4.9.4",
"webdriverio": "^9.12.6"
"typescript": "^5.8.0",
"webdriverio": "catalog:"
},
"installConfig": {
"hoistingLimits": "dependencies"
Expand Down
17 changes: 7 additions & 10 deletions apps/E2E/src/Callout/pages/CalloutPageObject.win.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,21 @@ class CalloutPageObject extends BasePage {
/**************** UI Element Interaction Methods ******************/
/******************************************************************/
async isCalloutOpen(): Promise<boolean> {
return await (await this._primaryComponent).isDisplayed();
return this._primaryComponent.isDisplayed();
}

// This both opens and waits for it to go in view
async openCalloutAndWaitForLoad(): Promise<void> {
if (!(await this.isCalloutOpen())) {
const calloutButton = await this._buttonToOpenCallout;
await browser.waitUntil(async () => await calloutButton.isEnabled(),
{
await browser.waitUntil(async () => await this._buttonToOpenCallout.isEnabled(), {
timeout: 15000,
timeoutMsg: 'Button to open the Callout is not enabled.'
timeoutMsg: 'Button to open the Callout is not enabled.',
});

await calloutButton.click();
await this.waitForCondition(
async () => await this.isCalloutOpen(),
'Clicked the button to open the Callout, but the Callout did not open correctly.',
);
await this._buttonToOpenCallout.click();
await this._primaryComponent.waitForDisplayed({
timeoutMsg: 'Clicked the button to open the Callout, but the Callout did not open correctly',
});
}
}

Expand Down
Loading
Loading