Skip to content

Commit d17645a

Browse files
test(snaps): Revert broken E2E change (#30086)
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until this PR meets the canonical Definition of Ready For Review in `docs/readme/ready-for-review.md`. In short: the template must be materially complete (not just section titles present), all status checks must be currently passing, and the only expected follow-up commits must be reviewer-driven. --> ## **Description** ccd38a0 disabled device synchronization for this entire test on iOS. This seems to break after navigating to the test dapp. Reverting the change made the test pass locally. ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: null <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk: test-only changes that revert an iOS-specific Detox synchronization workaround and re-enable a previously skipped smoke spec. > > **Overview** > Re-enables the `Get Entropy Snap Tests` smoke spec by removing `describe.skip`. > > Reverts the iOS-only Detox synchronization disabling wrapper around the test steps, running the flows (`loginToApp`/navigation/signing/invalid source) normally again. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit d825279. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent dcb0089 commit d17645a

1 file changed

Lines changed: 33 additions & 65 deletions

File tree

tests/smoke/snaps/test-snap-get-entropy.spec.ts

Lines changed: 33 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,7 @@ import Assertions from '../../framework/Assertions';
88

99
jest.setTimeout(150_000);
1010

11-
/**
12-
* The account-activity mock WebSocket (started with default fixtures) keeps the
13-
* iOS UI busy in Detox's view; disable sync for the test body so gestures and
14-
* webview scripts are not blocked waiting for idle. Same idea as
15-
* test-snap-network-access.spec.ts (WebSocket section).
16-
*/
17-
async function withIosDetoxSyncDisabledForAccountActivityWs<T>(
18-
fn: () => Promise<T>,
19-
): Promise<T> {
20-
if (device.getPlatform() === 'ios') {
21-
await device.disableSynchronization();
22-
}
23-
try {
24-
return await fn();
25-
} finally {
26-
if (device.getPlatform() === 'ios') {
27-
await device.enableSynchronization();
28-
}
29-
}
30-
}
31-
32-
describe.skip(SmokeSnaps('Get Entropy Snap Tests'), () => {
11+
describe(SmokeSnaps('Get Entropy Snap Tests'), () => {
3312
it('connects to the Get Entropy Snap', async () => {
3413
await withFixtures(
3514
{
@@ -38,13 +17,11 @@ describe.skip(SmokeSnaps('Get Entropy Snap Tests'), () => {
3817
skipReactNativeReload: true,
3918
},
4019
async () => {
41-
await withIosDetoxSyncDisabledForAccountActivityWs(async () => {
42-
await loginToApp();
43-
await navigateToBrowserView();
44-
await TestSnaps.navigateToTestSnap();
20+
await loginToApp();
21+
await navigateToBrowserView();
22+
await TestSnaps.navigateToTestSnap();
4523

46-
await TestSnaps.installSnap('connectGetEntropyButton');
47-
});
24+
await TestSnaps.installSnap('connectGetEntropyButton');
4825
},
4926
);
5027
});
@@ -56,18 +33,16 @@ describe.skip(SmokeSnaps('Get Entropy Snap Tests'), () => {
5633
skipReactNativeReload: true,
5734
},
5835
async () => {
59-
await withIosDetoxSyncDisabledForAccountActivityWs(async () => {
60-
await TestSnaps.fillMessage('entropyMessageInput', '1234');
61-
await TestSnaps.tapButton('signEntropyMessageButton');
62-
await Assertions.expectTextDisplayed('Signature request', {
63-
description: 'Snap signature request should be visible',
64-
});
65-
await TestSnaps.approveSignRequest();
66-
await TestSnaps.checkResultSpan(
67-
'entropySignResultSpan',
68-
'"0x9341785782b512c86235612365f1076b16731ed9473beb4d0804c30b7fcc3a055aa7103b02dc64014d923220712dfbef023ddcf6327b313ea2dfd4d83dc5a53e1c5e7f4e10bce49830eded302294054df8a7a46e5b6cb3e50eec564ecba17941"',
69-
);
36+
await TestSnaps.fillMessage('entropyMessageInput', '1234');
37+
await TestSnaps.tapButton('signEntropyMessageButton');
38+
await Assertions.expectTextDisplayed('Signature request', {
39+
description: 'Snap signature request should be visible',
7040
});
41+
await TestSnaps.approveSignRequest();
42+
await TestSnaps.checkResultSpan(
43+
'entropySignResultSpan',
44+
'"0x9341785782b512c86235612365f1076b16731ed9473beb4d0804c30b7fcc3a055aa7103b02dc64014d923220712dfbef023ddcf6327b313ea2dfd4d83dc5a53e1c5e7f4e10bce49830eded302294054df8a7a46e5b6cb3e50eec564ecba17941"',
45+
);
7146
},
7247
);
7348
});
@@ -90,22 +65,17 @@ describe.skip(SmokeSnaps('Get Entropy Snap Tests'), () => {
9065
skipReactNativeReload: true,
9166
},
9267
async () => {
93-
await withIosDetoxSyncDisabledForAccountActivityWs(async () => {
94-
await TestSnaps.selectInDropdown(
95-
'getEntropyDropDown',
96-
entropySource,
97-
);
98-
await TestSnaps.fillMessage('entropyMessageInput', '5678');
99-
await TestSnaps.tapButton('signEntropyMessageButton');
100-
await Assertions.expectTextDisplayed('Signature request', {
101-
description: 'Snap signature request should be visible',
102-
});
103-
await TestSnaps.approveSignRequest();
104-
await TestSnaps.checkResultSpan(
105-
'entropySignResultSpan',
106-
`"${result}"`,
107-
);
68+
await TestSnaps.selectInDropdown('getEntropyDropDown', entropySource);
69+
await TestSnaps.fillMessage('entropyMessageInput', '5678');
70+
await TestSnaps.tapButton('signEntropyMessageButton');
71+
await Assertions.expectTextDisplayed('Signature request', {
72+
description: 'Snap signature request should be visible',
10873
});
74+
await TestSnaps.approveSignRequest();
75+
await TestSnaps.checkResultSpan(
76+
'entropySignResultSpan',
77+
`"${result}"`,
78+
);
10979
},
11080
);
11181
},
@@ -118,17 +88,15 @@ describe.skip(SmokeSnaps('Get Entropy Snap Tests'), () => {
11888
skipReactNativeReload: true,
11989
},
12090
async () => {
121-
await withIosDetoxSyncDisabledForAccountActivityWs(async () => {
122-
await TestSnaps.selectInDropdown('getEntropyDropDown', 'Invalid');
123-
await TestSnaps.fillMessage('entropyMessageInput', 'foo bar');
124-
await TestSnaps.tapButton('signEntropyMessageButton');
125-
await TestSnaps.approveSignRequest();
126-
await Assertions.expectTextDisplayed(
127-
'Entropy source with ID "invalid" not found.',
128-
{ timeout: 30000 },
129-
);
130-
await TestSnaps.dismissAlert();
131-
});
91+
await TestSnaps.selectInDropdown('getEntropyDropDown', 'Invalid');
92+
await TestSnaps.fillMessage('entropyMessageInput', 'foo bar');
93+
await TestSnaps.tapButton('signEntropyMessageButton');
94+
await TestSnaps.approveSignRequest();
95+
await Assertions.expectTextDisplayed(
96+
'Entropy source with ID "invalid" not found.',
97+
{ timeout: 30000 },
98+
);
99+
await TestSnaps.dismissAlert();
132100
},
133101
);
134102
});

0 commit comments

Comments
 (0)