-
Notifications
You must be signed in to change notification settings - Fork 96
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 #3032 from Emurgo/denis/fix-e2e-transfer-funds
Denis/fix e2e transfer funds
- Loading branch information
Showing
10 changed files
with
119 additions
and
113 deletions.
There are no files selected for viewing
23 changes: 12 additions & 11 deletions
23
packages/yoroi-extension/features/installation-procedure.feature
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,22 +1,23 @@ | ||
Feature: Installation procedure | ||
|
||
@it-98 | ||
Scenario: User Selects Language at first launch (IT-98) | ||
Given I have opened the extension | ||
And I am on the language selection screen | ||
And I open language selection dropdown | ||
And I select Japanese language | ||
When I submit the language selection form | ||
Then I should not see the language selection screen anymore | ||
And I should have Japanese language set | ||
|
||
@it-51 | ||
Scenario: Terms of Use are not accepted if user didn’t confirm it and close/reload the browser page (IT-51) | ||
Given I have opened the extension | ||
And I am on the language selection screen | ||
And I have selected English language | ||
Given I am on the "Terms of use" screen | ||
When I refresh the page | ||
And I click on "I agree with the terms of use" checkbox | ||
When I submit the "Terms of use" form | ||
Then I should not see the "Terms of use" screen anymore | ||
And I should have "Terms of use" accepted | ||
And I should have "Terms of use" accepted | ||
|
||
@it-98 | ||
Scenario: User Selects Language at first launch (IT-98) | ||
Given I have opened the extension | ||
And I am on the language selection screen | ||
And I open language selection dropdown | ||
And I select Japanese language | ||
When I submit the language selection form | ||
Then I should not see the language selection screen anymore | ||
And I should have Japanese language set |
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
49 changes: 20 additions & 29 deletions
49
packages/yoroi-extension/features/support/helpers/language-selection-helpers.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,36 +1,27 @@ | ||
// @flow | ||
|
||
import i18n from './i18n-helpers'; | ||
import { By } from 'selenium-webdriver'; | ||
import { languageSelectionForm } from '../../pages/basicSetupPage'; | ||
import { | ||
languageSelectionForm, | ||
confirmSelectedLanguageButton | ||
} from '../../pages/basicSetupPage'; | ||
|
||
const LANGUAGE_SELECTION_FORM = '.LanguageSelectionForm_component'; | ||
|
||
const languageSelection = { | ||
waitForVisible: async ( | ||
client: any, | ||
{ isHidden }: {| isHidden: boolean, |} = {} | ||
): Promise<void> => { | ||
if (isHidden) { | ||
return client.waitForElementNotPresent(languageSelectionForm); | ||
} | ||
return client.waitForElement(languageSelectionForm); | ||
}, | ||
ensureLanguageIsSelected: async ( | ||
client: any, | ||
{ language }: {| language: string, |} = {} | ||
): Promise<void> => { | ||
await languageSelection.waitForVisible(client.driver); | ||
await i18n.setActiveLanguage(client.driver, { language }); | ||
await clickContinue(client); | ||
await languageSelection.waitForVisible(client.driver, { isHidden: true }); | ||
export const waitForVisibleLanguageSelection = async ( | ||
customWorld: any, | ||
{ isHidden }: {| isHidden: boolean, |} = {} | ||
): Promise<void> => { | ||
if (isHidden) { | ||
return customWorld.waitForElementNotPresent(languageSelectionForm); | ||
} | ||
return customWorld.waitForElement(languageSelectionForm); | ||
}; | ||
|
||
export const clickContinue = async (world: Object) => { | ||
const parentComponent = await world.driver.findElement(By.css(LANGUAGE_SELECTION_FORM)); | ||
const continueButton = await parentComponent.findElement(By.xpath('//button')); | ||
await continueButton.click(); | ||
} | ||
|
||
export default languageSelection; | ||
export const ensureLanguageIsSelected = async ( | ||
customWorld: any, | ||
{ language }: {| language: string, |} | ||
): Promise<void> => { | ||
await waitForVisibleLanguageSelection(customWorld); | ||
await i18n.setActiveLanguage(customWorld.driver, { language }); | ||
await customWorld.click(confirmSelectedLanguageButton); | ||
await waitForVisibleLanguageSelection(customWorld, { isHidden: 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
Oops, something went wrong.