forked from oxen-io/session-appium
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from Miki-Session/onboarding-modals
Onboarding Warning modals
- Loading branch information
Showing
5 changed files
with
93 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { bothPlatformsIt } from '../../types/sessionIt'; | ||
import { | ||
CreateAccountButton, | ||
BackButton, | ||
DisplayNameInput, | ||
SlowModeRadio, | ||
ContinueButton, | ||
WarningModalQuitButton, | ||
} from './locators/onboarding'; | ||
import { SupportedPlatformsType } from './utils/open_app'; | ||
import { openAppOnPlatformSingleDevice, closeApp } from './utils/open_app'; | ||
import { USERNAME } from '../../types/testing'; | ||
|
||
bothPlatformsIt('Warning modal new account', 'medium', warningModalNewAccount); | ||
|
||
async function warningModalNewAccount(platform: SupportedPlatformsType) { | ||
const { device } = await openAppOnPlatformSingleDevice(platform); | ||
await device.clickOnElementAll(new CreateAccountButton(device)); | ||
await device.inputText(USERNAME.ALICE, new DisplayNameInput(device)); | ||
await device.clickOnElementAll(new ContinueButton(device)); | ||
// Checking that we're on the Message Notifications screen | ||
await device.doesElementExist(new SlowModeRadio(device)); | ||
// Pressing Back on the Message Notifications screen | ||
await device.clickOnElementAll(new BackButton(device)); | ||
// Verifying that pressing Back from the Message Notifications screen does not bring up a modal but instead shows the Display Name input field | ||
await device.doesElementExist(new DisplayNameInput(device)); | ||
// Pressing Back on the Display Name screen to trigger the Warning modal | ||
await device.clickOnElementAll(new BackButton(device)); | ||
await device.checkModalStrings('warning', 'onboardingBackAccountCreation'); | ||
await device.clickOnElementAll(new WarningModalQuitButton(device)); | ||
await closeApp(device); | ||
} |
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,29 @@ | ||
import { bothPlatformsIt } from '../../types/sessionIt'; | ||
import { | ||
SeedPhraseInput, | ||
BackButton, | ||
SlowModeRadio, | ||
ContinueButton, | ||
AccountRestoreButton, | ||
WarningModalQuitButton, | ||
} from './locators/onboarding'; | ||
import { SupportedPlatformsType } from './utils/open_app'; | ||
import { openAppOnPlatformSingleDevice, closeApp } from './utils/open_app'; | ||
|
||
bothPlatformsIt('Warning modal restore account', 'medium', warningModalRestoreAccount); | ||
|
||
async function warningModalRestoreAccount(platform: SupportedPlatformsType) { | ||
const { device } = await openAppOnPlatformSingleDevice(platform); | ||
const seedPhrase = | ||
'eldest fazed hybrid buzzer nasty domestic digit pager unusual purged makeup assorted domestic'; | ||
await device.clickOnElementAll(new AccountRestoreButton(device)); | ||
await device.inputText(seedPhrase, new SeedPhraseInput(device)); | ||
await device.clickOnElementAll(new ContinueButton(device)); | ||
// Checking that we're on the Message Notifications screen | ||
await device.doesElementExist(new SlowModeRadio(device).build()); | ||
// Pressing Back on the Message Notifications screen to trigger the Warning modal | ||
await device.clickOnElementAll(new BackButton(device)); | ||
await device.checkModalStrings('warning', 'onboardingBackLoadAccount'); | ||
await device.clickOnElementAll(new WarningModalQuitButton(device)); | ||
await closeApp(device); | ||
} |
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