-
-
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(e2e): Converts cy to pw test suite t2t1-settings (#15922)
* feat(e2e): Converts cy to pw test suite t2t1-settings * fix(e2e): Resolving type error
- Loading branch information
Showing
5 changed files
with
130 additions
and
184 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
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
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
66 changes: 66 additions & 0 deletions
66
packages/suite-desktop-core/e2e/tests/settings/t2t1-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,66 @@ | ||
import { test, expect } from '../../support/fixtures'; | ||
|
||
test.describe('T2T1 - Device settings', { tag: ['@group=settings'] }, () => { | ||
test.use({ emulatorStartConf: { wipe: true, model: 'T2T1' } }); | ||
test.beforeEach(async ({ onboardingPage, settingsPage }) => { | ||
await onboardingPage.completeOnboarding(); | ||
await settingsPage.navigateTo(); | ||
await settingsPage.deviceTabButton.click(); | ||
}); | ||
|
||
test('change all possible device settings', async ({ | ||
window: page, | ||
settingsPage, | ||
trezorUserEnvLink, | ||
}) => { | ||
await test.step('Verify firmware modal', async () => { | ||
await page.getByTestId('@settings/device/update-button').click(); | ||
await page.getByTestId('@modal/close-button').click(); | ||
}); | ||
|
||
await test.step("Change and verify device's name", async () => { | ||
const newDeviceName = 'TREVOR!'; | ||
await settingsPage.changeDeviceName(newDeviceName); | ||
await expect(page.getByTestId('@menu/device/label')).toHaveText(newDeviceName); | ||
}); | ||
|
||
await test.step('Change display rotation', async () => { | ||
await page.getByTestId('select-bar/East').click(); | ||
await expect(page.getByTestId('@prompts/confirm-on-device')).toBeVisible(); | ||
await trezorUserEnvLink.pressYes(); | ||
await page.getByTestId('@prompts/confirm-on-device').waitFor({ state: 'detached' }); | ||
}); | ||
}); | ||
|
||
test('Device Wipe', async ({ window: page, trezorUserEnvLink }) => { | ||
await page.getByTestId('@settings/device/open-wipe-modal-button').click(); | ||
await page.getByTestId('@wipe/checkbox-1').click(); | ||
await page.getByTestId('@wipe/checkbox-2').click(); | ||
await page.getByTestId('@wipe/wipe-button').click(); | ||
await trezorUserEnvLink.pressYes(); | ||
//TODO: Any verification? | ||
}); | ||
|
||
test('Backup in settings', async ({ window: page }) => { | ||
await expect(page.getByTestId('@settings/device/check-seed-button')).toBeVisible(); | ||
await page.getByTestId('@settings/device/failed-backup-row').waitFor({ state: 'detached' }); | ||
await page.getByTestId('@settings/device/check-seed-button').click(); | ||
await expect(page.getByTestId('@modal')).toBeVisible(); | ||
//TODO: Verification? Should we actually do the backup? | ||
}); | ||
|
||
test('Can change homescreen background in firmware >= 2.5.4', async ({ settingsPage }) => { | ||
await settingsPage.changeDeviceBackground('original_t2t1'); | ||
}); | ||
|
||
test.describe('T2T1 - older firmware < 2.5.4', { tag: ['@group=settings'] }, () => { | ||
test.use({ emulatorStartConf: { wipe: true, model: 'T2T1', version: '2.5.3' } }); | ||
test('Cannot change homescreen in firmware < 2.5.4', async ({ window: page }) => { | ||
await expect(page.getByTestId('@settings/device/homescreen-gallery')).toBeDisabled(); | ||
await expect(page.getByTestId('@settings/device/homescreen-upload')).toBeDisabled(); | ||
}); | ||
}); | ||
|
||
// TODO: upload custom image | ||
// TODO: set auto-lock (needs pin) | ||
}); |
140 changes: 0 additions & 140 deletions
140
packages/suite-web/e2e/tests/settings/t2t1-device-settings.test.ts
This file was deleted.
Oops, something went wrong.