Skip to content

Commit 1571589

Browse files
authored
RN 0.81: Upgrade FURN to react-native 0.81 (#4000)
* upgrade to RN 81, React 19, and fix builds * fix additional package consistency issues * fix tests for react 19 * prettier fixes and pod install updates * fix naming mismatch on macos callout native component * add missing snapshot updates * Change files * rework some e2e tests to use the proper calls for wdio * update test props mapping * add 0.74 and 0.81 filters back adn fix automation * update snapshots and configs after restoration of filters
1 parent 9313dca commit 1571589

File tree

317 files changed

+4617
-4910
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

317 files changed

+4617
-4910
lines changed

apps/E2E/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@
4949
"@fluentui-react-native/focus-zone": "workspace:*",
5050
"@fluentui-react-native/kit-config": "workspace:*",
5151
"@fluentui-react-native/scripts": "workspace:*",
52-
"@office-iss/react-native-win32": "^0.74.0",
53-
"@react-native/metro-babel-transformer": "^0.74.0",
52+
"@office-iss/react-native-win32": "^0.81.0",
53+
"@react-native/metro-babel-transformer": "^0.81.0",
5454
"@rnx-kit/metro-config": "catalog:",
5555
"@types/jasmine": "catalog:",
5656
"@types/node": "catalog:",
57-
"@types/react": "~18.2.0",
57+
"@types/react": "~19.1.0",
5858
"@wdio/appium-service": "catalog:",
5959
"@wdio/cli": "catalog:",
6060
"@wdio/globals": "catalog:",
@@ -72,10 +72,10 @@
7272
"cross-env": "catalog:",
7373
"expect-webdriverio": "catalog:",
7474
"metro-config": "^0.80.3",
75-
"react": "18.2.0",
76-
"react-native": "^0.74.0",
77-
"react-native-macos": "^0.74.0",
78-
"react-native-windows": "^0.74.0",
75+
"react": "19.1.0",
76+
"react-native": "^0.81.0",
77+
"react-native-macos": "^0.81.0",
78+
"react-native-windows": "^0.81.0",
7979
"rimraf": "catalog:",
8080
"ts-node": "^10.7.0",
8181
"webdriverio": "catalog:"

apps/E2E/src/ButtonLegacy/pages/ButtonLegacyPageObject.ts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,16 @@ class ButtonLegacyPageObject extends BasePage {
1212
/******************************************************************/
1313

1414
async didOnClickCallbackFire(errorMsg: string): Promise<boolean | void> {
15-
const callbackText = await this._callbackText;
16-
return await this.waitForCondition(async () => await callbackText.isDisplayed(), errorMsg);
15+
return this._callbackText.waitForDisplayed({ timeoutMsg: errorMsg });
1716
}
1817

1918
async resetTest(): Promise<void> {
20-
const callbackText = await this._callbackText;
21-
if (await callbackText.isDisplayed()) {
22-
await (await this._primaryComponent).click();
23-
await this.waitForCondition(
24-
async () => !(await callbackText.isDisplayed()),
25-
'Could not reset test: Clicked button to toggle onClick callback text, but the text failed to hide.',
26-
);
19+
if (await this._callbackText.isDisplayed()) {
20+
await this._primaryComponent.click();
21+
await this._callbackText.waitForDisplayed({
22+
reverse: true,
23+
timeoutMsg: 'Could not reset test: Clicked button to toggle onClick callback text, but the text failed to hide.',
24+
});
2725
}
2826
}
2927

apps/E2E/src/ButtonV1/pages/ButtonV1PageObject.ts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,16 @@ class ButtonV1PageObject extends BasePage {
1111
/**************** UI Element Interaction Methods ******************/
1212
/******************************************************************/
1313
async waitForOnClickCallbackToFire(errorMsg: string): Promise<boolean | void> {
14-
const callbackText = await this._callbackText;
15-
return await this.waitForCondition(async () => await callbackText.isDisplayed(), errorMsg);
14+
return this._callbackText.waitForDisplayed({ timeoutMsg: errorMsg });
1615
}
1716

1817
async resetTest(): Promise<void> {
19-
const callbackText = await this._callbackText;
20-
if (await callbackText.isDisplayed()) {
21-
await (await this._primaryComponent).click();
22-
await this.waitForCondition(
23-
async () => !(await callbackText.isDisplayed()),
24-
'Could not reset test: Clicked button to toggle onClick callback text, but the text failed to hide.',
25-
);
18+
if (await this._callbackText.isDisplayed()) {
19+
await this._primaryComponent.click();
20+
await this._callbackText.waitForDisplayed({
21+
reverse: true,
22+
timeoutMsg: 'Could not reset test: Clicked button to toggle onClick callback text, but the text failed to hide.',
23+
});
2624
}
2725
}
2826

apps/E2E/src/Callout/pages/CalloutPageObject.win.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ class CalloutPageObject extends BasePage {
1212
// This both opens and waits for it to go in view
1313
async openCalloutAndWaitForLoad(): Promise<void> {
1414
if (!(await this.isCalloutOpen())) {
15-
await browser.waitUntil(async () => await this._buttonToOpenCallout.isEnabled(), {
16-
timeout: 15000,
17-
timeoutMsg: 'Button to open the Callout is not enabled.',
18-
});
15+
await this._buttonToOpenCallout.waitForEnabled({ timeoutMsg: 'Button to open the Callout is not enabled.' });
1916

2017
await this._buttonToOpenCallout.click();
2118
await this._primaryComponent.waitForDisplayed({
@@ -26,7 +23,7 @@ class CalloutPageObject extends BasePage {
2623

2724
async closeCallout(): Promise<void> {
2825
// all we have to do is click outside the callout
29-
await (await this._testPage).click();
26+
this._testPage.click();
3027
}
3128

3229
/*****************************************/

apps/E2E/src/CheckboxLegacy/pages/CheckboxLegacyPageObject.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class CheckboxLegacyPageObject extends BasePage {
1313
/**************** UI Element Interaction Methods ******************/
1414
/******************************************************************/
1515
async isCheckboxChecked(): Promise<boolean> {
16-
const checkbox = await this._primaryComponent;
16+
const checkbox = this._primaryComponent;
1717
if (this.platform === 'windows') {
1818
// for native windows, .isSelected() always returns false. this is a workaround
1919
return (await checkbox.getAttribute(Attribute.ToggleState)) === AttributeValue.on;
@@ -43,8 +43,7 @@ class CheckboxLegacyPageObject extends BasePage {
4343
* the onChange() callback gets fired, we show / hide the a Text label as the callback gets fired. This way, we know that
4444
* the onChange() callback has fired by checking that the label element is currently displayed. */
4545
async didOnChangeCallbackFire(errorMsg: string): Promise<boolean | void> {
46-
const callbackText = await this._callbackText;
47-
return await this.waitForCondition(async () => await callbackText.isDisplayed(), errorMsg);
46+
return this._callbackText.waitForDisplayed({ timeoutMsg: errorMsg });
4847
}
4948

5049
/*****************************************/

apps/E2E/src/Input/pages/InputPageObject.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@ class InputPageObject extends BasePage {
2222

2323
/* Waits for the text content to get updated to new string. */
2424
async waitForStringUpdate(newState: string, errorMessage: string): Promise<void> {
25-
await this.waitForCondition(
26-
async () => (await (await this._callbackText).getAttribute(AndroidAttribute.Text)) == newState,
27-
errorMessage,
28-
);
25+
await this.waitForCondition(async () => (await this._callbackText.getAttribute(AndroidAttribute.Text)) == newState, errorMessage);
2926
}
3027

3128
/*****************************************/

apps/E2E/src/LinkV1/pages/LinkV1PageObject.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ class LinkV1PageObject extends BasePage {
66
/**************** UI Element Interaction Methods ******************/
77
/******************************************************************/
88
async didOnPressCallbackFire(errMsg: string): Promise<boolean | void> {
9-
const callbackText = await By(LINKV1_NO_A11Y_LABEL_COMPONENT);
10-
return await this.waitForCondition(async () => await callbackText.isDisplayed(), errMsg);
9+
const callbackText = By(LINKV1_NO_A11Y_LABEL_COMPONENT);
10+
return callbackText.waitForDisplayed({ timeoutMsg: errMsg });
1111
}
1212

1313
/*****************************************/

apps/E2E/src/Overflow/pages/OverflowPageObject.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ class OverflowPageObject extends BasePage {
4242
}
4343

4444
async itemIsVisible(selector: OverflowItem, errorMsg?: string) {
45-
const item = await this.getOverflowItem(selector);
46-
return this.waitForCondition(async () => await item.isDisplayed(), errorMsg);
45+
const item = this.getOverflowItem(selector);
46+
return item.waitForDisplayed({ timeoutMsg: errorMsg });
4747
}
4848

4949
async menuIsDisplayed(errorMsg?: string) {
50-
return this.waitForCondition(async () => (await this._overflowMenu).isDisplayed(), errorMsg);
50+
return this._overflowMenu.waitForDisplayed({ timeoutMsg: errorMsg });
5151
}
5252

5353
async setOverflowWidth(width: OverflowWidth) {

apps/E2E/src/Switch/pages/SwitchPageObject.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ class SwitchPageObject extends BasePage {
2525
}
2626

2727
async waitForOnChangeCallbackToFire(errorMsg: string): Promise<boolean | void> {
28-
const callbackText = await this._callbackText;
29-
return await this.waitForCondition(async () => await callbackText.isDisplayed(), errorMsg);
28+
return this._callbackText.waitForDisplayed({ timeoutMsg: errorMsg });
3029
}
3130

3231
/*****************************************/

apps/E2E/src/TabList/pages/TabListPageObject.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class TabListPageObject extends BasePage {
3636

3737
// Waits for the TabList's `onTabSelect` callback to fire (changing a text component value). Throws an error if the callback doesn't fire by the end of the timeout.
3838
async waitForCallbackToFire(tabKeyPressed: string, errorMsg: string, timeout?: number): Promise<void> {
39-
const callbackText = await By(TABLIST_CALLBACK_TEXT);
39+
const callbackText = By(TABLIST_CALLBACK_TEXT);
4040
await this.waitForCondition(async () => (await callbackText.getText()) === tabKeyPressed, errorMsg, timeout);
4141
}
4242

0 commit comments

Comments
 (0)