Skip to content

Commit

Permalink
fix: solve the problematic test by accepting revision check fail, and…
Browse files Browse the repository at this point in the history
… disabling it in the settigs
  • Loading branch information
peter-sanderson committed Aug 7, 2024
1 parent b497eba commit 57f0fc0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,18 @@ describe('Onboarding - recover wallet T2T1', () => {
// note: this is an example of test that can not be parametrized to be both integration (isolated) test and e2e test.
// the problem is that it always needs to run the newest possible emulator. If this was pinned to use emulator which is currently
// in production, and we locally bumped emulator version, we would get into a screen saying "update your firmware" and the test would fail.
cy.task('startEmu', { wipe: true, version: '2-latest' });
cy.task('startEmu', { wipe: true, version: '2-master' });

// Disable revision check. On emulator '2-master' it wont pass as it is unreleased version
cy.getTestElement('@device-compromised').should('be.visible');
cy.getTestElement('@suite/menu/settings').click();
cy.getTestElement('@settings/menu/device').click();
cy.getTestElement('@settings/device/open-firmware-revision-check-modal-button').click();
cy.getTestElement('@device-authenticity/firmware-revision-checkbox').click();
cy.getTestElement('@device-authenticity/opt-out/button').click();
cy.getTestElement('@settings/menu/close').click();

// Continue with test
cy.getTestElement('@analytics/continue-button').click();
cy.getTestElement('@analytics/continue-button').click();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const DeviceCompromised = () => {

return (
<WelcomeLayout>
<Card>
<Card data-test="@device-compromised">
<SecurityCheckFail />
</Card>
</WelcomeLayout>
Expand Down

0 comments on commit 57f0fc0

Please sign in to comment.