Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions tests/automation/onboarding.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import { englishStrippedStr } from '../locale/localizedString';
import { test_Alice_1W_no_network } from './setup/sessionTest';
import {
checkModalStrings,
clickOnTestIdWithText,
typeIntoInput,
waitForTestIdWithText,
} from './utilities/utils';

test_Alice_1W_no_network(
'Warning modal new account',
async ({ aliceWindow1 }) => {
// Create User
await clickOnTestIdWithText(aliceWindow1, 'create-account-button');
// Need to implement a back button on Desktop
await clickOnTestIdWithText(aliceWindow1, 'back-button');
// Expect modal to appear with warning message
await checkModalStrings(
aliceWindow1,
englishStrippedStr('warning').toString(),
englishStrippedStr('onboardingBackAccountCreation').toString(),
);
await clickOnTestIdWithText(
aliceWindow1,
'session-confirm-ok-button',
englishStrippedStr('quit').toString(),
);
// Should reload page and take you back to create account page
await waitForTestIdWithText(aliceWindow1, 'create-account-button');
},
);

test_Alice_1W_no_network(
'Warning modal restore account',
async ({ aliceWindow1 }) => {
const seedPhrase =
'eldest fazed hybrid buzzer nasty domestic digit pager unusual purged makeup assorted domestic';
// Restore user
await clickOnTestIdWithText(aliceWindow1, 'existing-account-button');
// Input recovery phrase
await typeIntoInput(aliceWindow1, 'recovery-phrase-input', seedPhrase);
// Click continue to go to loading page
await clickOnTestIdWithText(aliceWindow1, 'continue-button');
// Need to implement a back button on Desktop
await clickOnTestIdWithText(aliceWindow1, 'back-button');
// Expect modal to appear with warning message
await checkModalStrings(
aliceWindow1,
englishStrippedStr('warning').toString(),
englishStrippedStr('onboardingBackLoadAccount').toString(),
);
// Should reload page and take you back to create account page
await waitForTestIdWithText(aliceWindow1, 'create-account-button');
},
);
1 change: 1 addition & 0 deletions tests/automation/types/testing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,4 +179,5 @@ export type DataTestId =
| 'modal-heading'
| 'call-notification-answered-a-call'
| 'call-notification-started-call'
| 'back-button'
| 'session-recovery-password';