-
Notifications
You must be signed in to change notification settings - Fork 5
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 #594 from Satellite-im/luis/import-account
test(add): add test for import account screen
- Loading branch information
Showing
12 changed files
with
154 additions
and
37 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,6 +96,7 @@ export const config: WebdriverIO.Config = { | |
}, | ||
], | ||
], | ||
specFileRetries: 1, | ||
// | ||
// ===== | ||
// Hooks | ||
|
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 |
---|---|---|
|
@@ -96,6 +96,7 @@ export const config: WebdriverIO.Config = { | |
}, | ||
], | ||
], | ||
specFileRetries: 1, | ||
// | ||
// ===== | ||
// Hooks | ||
|
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
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
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,47 @@ | ||
require("module-alias/register"); | ||
import { getUserRecoverySeed, resetApp } from "@helpers/commands"; | ||
import CreateOrImportScreen from "@screenobjects/account-creation/CreateOrImportScreen"; | ||
import CreatePinScreen from "@screenobjects/account-creation/CreatePinScreen"; | ||
import EnterRecoverySeedScreen from "@screenobjects/account-creation/EnterRecoverySeedScreen"; | ||
import WelcomeScreen from "@screenobjects/welcome-screen/WelcomeScreen"; | ||
const createOrImport = new CreateOrImportScreen(); | ||
const createPin = new CreatePinScreen(); | ||
const enterRecoverySeed = new EnterRecoverySeedScreen(); | ||
const welcomeScreen = new WelcomeScreen(); | ||
|
||
export default async function importAccountTests() { | ||
it("Enter Pin Screen - Clear cache, reset app and enter a valid pin", async () => { | ||
// Clear cache and reset app | ||
await resetApp(); | ||
|
||
// Validate Enter Pin Screen is displayed and enter a valid pin | ||
await createPin.waitForIsShown(true); | ||
await createPin.enterPin("1234"); | ||
await createPin.waitUntilCreateAccountButtonIsEnabled(); | ||
await createPin.clickOnCreateAccount(); | ||
}); | ||
|
||
it("Enter Recovery Seed - Validate Screen Contents", async () => { | ||
// Validate Create or Import Account is displayed | ||
await createOrImport.waitForIsShown(true); | ||
|
||
// Click on Import Account | ||
await createOrImport.clickOnImportAccount(); | ||
|
||
// Validate contents of Enter Recovery Seed Screen | ||
await enterRecoverySeed.waitForIsShown(true); | ||
const helperText = await enterRecoverySeed.recoverySeedHelperText; | ||
const screenTitle = await enterRecoverySeed.recoverySeedTitleText; | ||
await expect(helperText).toHaveTextContaining( | ||
"Type your recovery seed here. You may either enter one word at a time or all at once separated by spaces.", | ||
); | ||
await expect(screenTitle).toHaveTextContaining("RECOVERY SEED"); | ||
}); | ||
|
||
it("Save Recovery Seed Screen - Enter valid recovery seed and continue", async () => { | ||
const recoverySeed = await getUserRecoverySeed("Test123"); | ||
await enterRecoverySeed.typeOnRecoverySeedInput(recoverySeed); | ||
await enterRecoverySeed.clickOnRecoverAccountButton(); | ||
await welcomeScreen.waitForIsShown(true); | ||
}); | ||
} |
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 |
---|---|---|
@@ -1,30 +1,38 @@ | ||
require("module-alias/register"); | ||
import createAccount from "@specs/01-create-account.spec"; | ||
import chats from "@specs/02-chats.spec"; | ||
import files from "@specs/03-files.spec"; | ||
import createAccountTests from "@specs/01-create-account.spec"; | ||
import chatsTests from "@specs/02-chats.spec"; | ||
import filesTests from "@specs/03-files.spec"; | ||
import settingsProfileTests from "@specs/05-settings-profile.spec"; | ||
import settingsGeneral from "@specs/06-settings-general.spec"; | ||
import settingsMessages from "@specs/15-settings-messages.spec"; | ||
import settingsAudio from "@specs/07-settings-audio.spec"; | ||
import settingsExtensions from "@specs/08-settings-extensions.spec"; | ||
import settingsNotifications from "@specs/09-settings-notifications.spec"; | ||
import settingsAccessibility from "@specs/10-settings-accessibility.spec"; | ||
import settingsAbout from "@specs/11-settings-about.spec"; | ||
import settingsLicenses from "@specs/12-settings-licenses.spec"; | ||
import settingsDeveloper from "@specs/13-settings-developer.spec"; | ||
import settingsGeneralTests from "@specs/06-settings-general.spec"; | ||
import settingsMessagesTests from "@specs/15-settings-messages.spec"; | ||
import settingsAudioTests from "@specs/07-settings-audio.spec"; | ||
import settingsExtensionsTests from "@specs/08-settings-extensions.spec"; | ||
import settingsNotificationsTests from "@specs/09-settings-notifications.spec"; | ||
import settingsAccessibilityTests from "@specs/10-settings-accessibility.spec"; | ||
import settingsAboutTests from "@specs/11-settings-about.spec"; | ||
import settingsLicensesTests from "@specs/12-settings-licenses.spec"; | ||
import settingsDeveloperTests from "@specs/13-settings-developer.spec"; | ||
import importAccountTests from "@specs/16-import-account.spec"; | ||
|
||
describe("Windows Tests", function () { | ||
describe("Create Pin and Account Tests", createAccount.bind(this)); | ||
describe("Chats Main Screen Tests", chats.bind(this)); | ||
describe("Files Screen Tests", files.bind(this)); | ||
describe("MacOS Tests", function () { | ||
describe("Create Pin and Account Tests", createAccountTests.bind(this)); | ||
describe("Chats Main Screen Tests", chatsTests.bind(this)); | ||
describe("Files Screen Tests", filesTests.bind(this)); | ||
describe("Settings Profile Tests", settingsProfileTests.bind(this)); | ||
describe("Settings General Tests", settingsGeneral.bind(this)); | ||
describe("Settings Messages Tests", settingsMessages.bind(this)); | ||
describe("Settings Audio Tests", settingsAudio.bind(this)); | ||
describe("Settings Extensions Tests", settingsExtensions.bind(this)); | ||
describe("Settings Accessibility Tests", settingsAccessibility.bind(this)); | ||
describe("Settings Notifications Tests", settingsNotifications.bind(this)); | ||
describe("Settings About Tests", settingsAbout.bind(this)); | ||
describe("Settings Licenses Tests", settingsLicenses.bind(this)); | ||
describe("Settings Developer Tests", settingsDeveloper.bind(this)); | ||
describe("Settings General Tests", settingsGeneralTests.bind(this)); | ||
describe("Settings Message Tests", settingsMessagesTests.bind(this)); | ||
describe("Settings Audio Tests", settingsAudioTests.bind(this)); | ||
describe("Settings Extensions Tests", settingsExtensionsTests.bind(this)); | ||
describe( | ||
"Settings Accessibility Tests", | ||
settingsAccessibilityTests.bind(this), | ||
); | ||
describe( | ||
"Settings Notifications Tests", | ||
settingsNotificationsTests.bind(this), | ||
); | ||
describe("Settings About Tests", settingsAboutTests.bind(this)); | ||
describe("Settings Licenses Tests", settingsLicensesTests.bind(this)); | ||
describe("Settings Developer Tests", settingsDeveloperTests.bind(this)); | ||
describe("Import Account Tests", importAccountTests.bind(this)); | ||
}); |