-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add e2e start exploring flow (#5293)
* add e2e start exploring flow * Remove the data from the test and replace it with the data from the accounts helpers class * Click remove for Tap in onboardingwizard methods. Updating Gherkin language in feature file
- Loading branch information
1 parent
bbf3c38
commit e29a423
Showing
10 changed files
with
393 additions
and
16 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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
@androidApp | ||
Feature: Skip Start Exploring | ||
|
||
Scenario: A user should be able to tap the Skip button and the onboarding tutorial modal should disappear | ||
Given I have imported my wallet | ||
And the onboarding wizard is visible on wallet view | ||
When I tap on "Take a Tour" button | ||
Then the tutorial modal heading should read "Your Accounts" | ||
And there should be an explanation of the accounts functionality. | ||
And I should see the "Skip Tutorial" button | ||
When I tap on "Got it" button | ||
Then the tutorial modal heading should read "Edit Account Name" | ||
And there should be an explanation about adding a nickname to your account. | ||
And I should see the "Skip Tutorial" button | ||
When I tap on "Skip" button | ||
Then the onboarding wizard is no longer visible | ||
And the "Skip" button is no longer visible | ||
|
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,41 @@ | ||
@androidApp | ||
Feature: Start Exploring | ||
|
||
Scenario: A user should be able to go through the start exploring tutorial | ||
Given I have imported my wallet | ||
And the onboarding wizard is visible on wallet view | ||
When I tap on "Take a Tour" button | ||
Then the tutorial modal heading should read "Your Accounts" | ||
And there should be an explanation of the accounts functionality. | ||
And I should see the "Skip Tutorial" button | ||
When I tap on "Got it" button | ||
Then the tutorial modal heading should read "Edit Account Name" | ||
And there should be an explanation about adding a nickname to your account. | ||
And I should see the "Skip Tutorial" button | ||
When I tap and hold on the account Name | ||
Then I should be able to edit the account Name | ||
When I enter "Big Bank" for account name | ||
Then the account nickname should read "Big Bank" | ||
When I tap on "Got it" button | ||
Then the tutorial modal heading should read "Main Navigation" | ||
And there should be an explanation of the what exists within the burger menu. | ||
And I should see the "Skip Tutorial" button | ||
When I tap on "Got it" button | ||
Then the tutorial modal heading should read "Explore the Browser" | ||
And there should be an explanation of the what the purpose of the browser. | ||
And I should see the "Skip Tutorial" button | ||
When I tap on "Back" button | ||
Then the tutorial modal heading should read "Main Navigation" | ||
And there should be an explanation of the what exists within the burger menu. | ||
And I should see the "Skip Tutorial" button | ||
When I tap on "Got it" button | ||
Then the tutorial modal heading should read "Explore the Browser" | ||
And there should be an explanation of the what the purpose of the browser. | ||
And I should see the "Skip Tutorial" button | ||
When I tap on "Got it" button | ||
Then the tutorial modal heading should read "Search" | ||
And there should be an explanation of the what the purpose of the search input box. | ||
And I should see the "Skip Tutorial" button | ||
When I tap on "Got it" button | ||
Then the onboarding wizard is no longer visible | ||
And the "Skip" button is no longer visible |
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
141 changes: 133 additions & 8 deletions
141
wdio/features/screen-objects/Modals/OnboardingWizardModal.js
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,27 +1,152 @@ | ||
import { ONBOARDING_WIZARD_STEP_1_CONTAINER_ID, | ||
ONBOARDING_WIZARD_STEP_1_NO_THANKS_ID } from '../../testIDs/Components/OnboardingWizard.testIds'; | ||
|
||
import Selectors from '../../helpers/Selectors'; | ||
import Gestures from '../../helpers/Gestures'; | ||
import { | ||
ONBOARDING_WIZARD_STEP_1_CONTAINER_ID, | ||
ONBOARDING_WIZARD_STEP_1_NO_THANKS_ID, | ||
ONBOARDING_WIZARD_STEP_1_TAKE_THE_TOUR_ID, | ||
ONBOARDING_WIZARD_YOUR_ACCOUNTS_DESC_1, | ||
ONBOARDING_WIZARD_YOUR_ACCOUNTS_DESC_2, | ||
ONBOARDING_WIZARD_BACK_BUTTON, | ||
ONBOARDING_WIZARD_NEXT_GOT_IT_BUTTON, | ||
ONBOARDING_WIZARD_SKIP_TUTORIAL_BUTTON, | ||
ONBOARDING_WIZARD_EDIT_ACCOUNTS_NAME_DESC_1, | ||
ONBOARDING_WIZARD_EDIT_ACCOUNTS_NAME_DESC_2, | ||
ONBOARDING_WIZARD_MAIN_NAVIGATION_DESC_1, | ||
ONBOARDING_WIZARD_MAIN_NAVIGATION_DESC_2, | ||
ONBOARDING_WIZARD_EXPLORE_BROWSER_DESC, | ||
ONBOARDING_WIZARD_SEARCH_DESC | ||
} from '../../testIDs/Components/OnboardingWizard.testIds'; | ||
|
||
import Selectors from '../../helpers/Selectors'; | ||
import Gestures from '../../helpers/Gestures'; | ||
|
||
class OnboardingWizardModal { | ||
|
||
get onBoardingWizardContainer() { | ||
return Selectors.getElementByPlatform(ONBOARDING_WIZARD_STEP_1_CONTAINER_ID); | ||
} | ||
|
||
get onBoardingWizardBackButton() { | ||
get onBoardingWizardNoThanksButton() { | ||
return Selectors.getElementByPlatform(ONBOARDING_WIZARD_STEP_1_NO_THANKS_ID); | ||
} | ||
|
||
async isVisible(){ | ||
get onBoardingWizardBackButton() { | ||
return Selectors.getXpathElementByText(ONBOARDING_WIZARD_BACK_BUTTON) | ||
} | ||
|
||
get onBoardingWizardTakeTourButton() { | ||
return Selectors.getElementByPlatform(ONBOARDING_WIZARD_STEP_1_TAKE_THE_TOUR_ID); | ||
} | ||
|
||
get onBoardingWizardYourAccountDesc1() { | ||
return Selectors.getXpathElementByText(ONBOARDING_WIZARD_YOUR_ACCOUNTS_DESC_1); | ||
} | ||
|
||
get onBoardingWizardYourAccountDesc2() { | ||
return Selectors.getXpathElementByText(ONBOARDING_WIZARD_YOUR_ACCOUNTS_DESC_2); | ||
} | ||
|
||
get onBoardingWizardSkipTutorialButton() { | ||
return Selectors.getXpathElementByText(ONBOARDING_WIZARD_SKIP_TUTORIAL_BUTTON); | ||
} | ||
|
||
get onBoardingWizardGotItButton() { | ||
return Selectors.getXpathElementByText(ONBOARDING_WIZARD_NEXT_GOT_IT_BUTTON); | ||
} | ||
|
||
get onBoardingWizardEditAccountNameDesc1() { | ||
return Selectors.getXpathElementByText(ONBOARDING_WIZARD_EDIT_ACCOUNTS_NAME_DESC_1); | ||
} | ||
|
||
get onBoardingWizardEditAccountNameDesc2() { | ||
return Selectors.getXpathElementByText(ONBOARDING_WIZARD_EDIT_ACCOUNTS_NAME_DESC_2); | ||
} | ||
|
||
get onBoardingWizardMainNavDesc1() { | ||
return Selectors.getXpathElementByText(ONBOARDING_WIZARD_MAIN_NAVIGATION_DESC_1); | ||
} | ||
|
||
get onBoardingWizardMainNavDesc2() { | ||
return Selectors.getXpathElementByText(ONBOARDING_WIZARD_MAIN_NAVIGATION_DESC_2); | ||
} | ||
|
||
get onBoardingWizardExploreBrowserDesc() { | ||
return Selectors.getXpathElementByText(ONBOARDING_WIZARD_EXPLORE_BROWSER_DESC); | ||
} | ||
|
||
get onBoardingWizardSearchDesc() { | ||
return Selectors.getXpathElementByText(ONBOARDING_WIZARD_SEARCH_DESC); | ||
} | ||
|
||
async isVisible() { | ||
await expect(this.onBoardingWizardContainer).toBeDisplayed(); | ||
} | ||
|
||
async clickBackButton(){ | ||
async tapNoThanksButton() { | ||
await Gestures.tap(this.onBoardingWizardNoThanksButton); | ||
} | ||
|
||
async tapTakeTourButton() { | ||
await Gestures.tap(this.onBoardingWizardTakeTourButton); | ||
} | ||
|
||
async isHeaderDisplayedByXPath(text) { | ||
await expect(await (Selectors.getXpathElementByText(text))).toBeDisplayed(); | ||
} | ||
|
||
async isYourAccountDesc1Displayed() { | ||
await expect(this.onBoardingWizardYourAccountDesc1).toBeDisplayed(); | ||
} | ||
|
||
async isYourAccountDesc2Displayed() { | ||
await expect(this.onBoardingWizardYourAccountDesc2).toBeDisplayed(); | ||
} | ||
|
||
async isSkipTutorialButtonDisplayed() { | ||
await expect(this.onBoardingWizardSkipTutorialButton).toBeDisplayed(); | ||
} | ||
|
||
async isSkipTutorialButtonNotDisplayed() { | ||
await expect(this.onBoardingWizardSkipTutorialButton).not.toBeDisplayed(); | ||
} | ||
|
||
async tapSkipTutorialButton() { | ||
await Gestures.tap(this.onBoardingWizardSkipTutorialButton); | ||
} | ||
|
||
async tapGotItButton() { | ||
await Gestures.tap(this.onBoardingWizardGotItButton); | ||
} | ||
|
||
async isGotItButtonNotDisplayed() { | ||
await expect(this.onBoardingWizardGotItButton).not.toBeDisplayed(); | ||
} | ||
|
||
async tapBackButton() { | ||
await Gestures.tap(this.onBoardingWizardBackButton); | ||
} | ||
|
||
async isEditAccountNameDesc1Displayed() { | ||
await expect(this.onBoardingWizardEditAccountNameDesc1).toBeDisplayed(); | ||
} | ||
|
||
async isEditAccountNameDesc2Displayed() { | ||
await expect(this.onBoardingWizardEditAccountNameDesc2).toBeDisplayed(); | ||
} | ||
|
||
async isMainNavDesc1Displayed() { | ||
await expect(this.onBoardingWizardMainNavDesc1).toBeDisplayed(); | ||
} | ||
|
||
async isMainNavDesc2Displayed() { | ||
await expect(this.onBoardingWizardMainNavDesc2).toBeDisplayed(); | ||
} | ||
|
||
async isExploreBrowserDescDisplayed() { | ||
await expect(this.onBoardingWizardExploreBrowserDesc).toBeDisplayed(); | ||
} | ||
|
||
async isSearchDescDisplayed() { | ||
await expect(this.onBoardingWizardSearchDesc).toBeDisplayed(); | ||
} | ||
} | ||
|
||
export default new OnboardingWizardModal(); |
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,38 @@ | ||
import { | ||
WALLET_ACCOUNT_NAME_LABEL_TEXT, | ||
WALLET_ACCOUNT_NAME_LABEL_INPUT, | ||
WALLET_ACCOUNT_ICON | ||
} from '../../testIDs/Screens/WalletAccount.testIds' | ||
|
||
import Selectors from '../../helpers/Selectors'; | ||
import Gestures from '../../helpers/Gestures'; | ||
|
||
class WalletAccountModal { | ||
get accountNameLabelText() { | ||
return Selectors.getXpathElementByResourceId(WALLET_ACCOUNT_NAME_LABEL_TEXT); | ||
} | ||
|
||
get accountNameLabelInput() { | ||
return Selectors.getXpathElementByResourceId(WALLET_ACCOUNT_NAME_LABEL_INPUT); | ||
} | ||
|
||
async longPressAccountNameLabel() { | ||
await Gestures.longPress(this.accountNameLabelText, 1000); | ||
} | ||
|
||
async isAccountNameLabelEditable() { | ||
await expect(this.accountNameLabelInput).toBeDisplayed(); | ||
} | ||
|
||
async editAccountNameLabel(text) { | ||
await Gestures.typeText(this.accountNameLabelInput, text); | ||
} | ||
|
||
async isAccountNameLabelEqualTo(expected) { | ||
const textFromElement = await this.accountNameLabelInput; | ||
const accountName = await textFromElement.getText(); | ||
await expect(accountName).toContain(expected); | ||
} | ||
} | ||
|
||
export default new WalletAccountModal(); |
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
Oops, something went wrong.