-
-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat convert cy pw suite settings t1b1 (#15928)
* feat(e2e): Convert suite t1b1-device-settings to playwright * fix(e2e): Resolve two notification problem
- Loading branch information
Showing
3 changed files
with
72 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
packages/suite-desktop-core/e2e/tests/settings/t1b1-device-settings.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import { test, expect } from '../../support/fixtures'; | ||
|
||
test.describe('T1B1 - Device settings', { tag: ['@group=settings'] }, () => { | ||
test.use({ emulatorStartConf: { model: 'T1B1', version: '1-main', wipe: true } }); | ||
test.beforeEach(async ({ onboardingPage, settingsPage, dashboardPage }) => { | ||
await onboardingPage.completeOnboarding(); | ||
// Initiating pin change is not stable when discovery is not yet finished | ||
await dashboardPage.discoveryShouldFinish(); | ||
await settingsPage.navigateTo(); | ||
await settingsPage.deviceTabButton.click(); | ||
}); | ||
|
||
test('enable pin', async ({ window: page, trezorUserEnvLink, settingsPage }) => { | ||
await page.getByTestId('@settings/device/pin-switch').click(); | ||
await expect(page.getByTestId('@prompts/confirm-on-device')).toBeVisible(); | ||
await trezorUserEnvLink.pressYes(); | ||
|
||
const pinEntryNumber = '1'; | ||
await settingsPage.enterPinOnBlindMatrix(pinEntryNumber); | ||
await expect(page.getByTestId('@pin/input/1')).toBeVisible(); | ||
await settingsPage.enterPinOnBlindMatrix(pinEntryNumber); | ||
await expect(page.getByTestId('@toast/pin-changed')).toBeVisible(); | ||
}); | ||
|
||
test('pin mismatch', async ({ window: page, trezorUserEnvLink }) => { | ||
await page.getByTestId('@settings/device/pin-switch').click(); | ||
await expect(page.getByTestId('@prompts/confirm-on-device')).toBeVisible(); | ||
await trezorUserEnvLink.pressYes(); | ||
|
||
await test.step('First input with one number', async () => { | ||
await page.getByTestId('@pin/input/1').click(); | ||
await page.getByTestId('@pin/submit-button').click(); | ||
}); | ||
await test.step('Second input with two numbers', async () => { | ||
await page.getByTestId('@pin/input/1').click(); | ||
await page.getByTestId('@pin/input/1').click(); | ||
await page.getByTestId('@pin/submit-button').click(); | ||
}); | ||
await expect(page.getByTestId('@pin-mismatch')).toBeVisible(); | ||
await page.getByTestId('@pin-mismatch/try-again-button').click(); | ||
await expect(page.getByTestId('@prompts/confirm-on-device')).toBeVisible(); | ||
await trezorUserEnvLink.pressYes(); | ||
}); | ||
|
||
test('Change homescreen', async ({ settingsPage }) => { | ||
await settingsPage.changeDeviceBackground('nyancat'); | ||
}); | ||
|
||
// TODO: pin caching immediately after it is set | ||
// TODO: keyboard handling | ||
// TODO: set auto-lock (needs pin) | ||
}); |
95 changes: 0 additions & 95 deletions
95
packages/suite-web/e2e/tests/settings/t1b1-device-settings.test.ts
This file was deleted.
Oops, something went wrong.