-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add e2e coverage for invalid browser url & changing password (#4129)
* delete wallet + invalid browser url * increase timeout for browser test * Update e2e/specs/delete-wallet.spec.js Co-authored-by: Gustavo Antunes <gantunes@uc.cl> * Update e2e/pages/Drawer/Browser.js Co-authored-by: Gustavo Antunes <gantunes@uc.cl> * Update e2e/pages/Drawer/Browser.js Co-authored-by: Gustavo Antunes <gantunes@uc.cl> * renaming test id's * lint doing lint tings * fix import * add path to test id's Co-authored-by: Gustavo Antunes <gantunes@uc.cl>
- Loading branch information
Showing
15 changed files
with
252 additions
and
41 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
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
53 changes: 53 additions & 0 deletions
53
e2e/pages/Drawer/Settings/SecurityAndPrivacy/ChangePasswordView.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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import TestHelpers from '../../../../helpers'; | ||
import { | ||
CONFIRM_CHANGE_PASSWORD_INPUT_BOX_ID, | ||
CONFIRM_PASSWORD_INPUT_BOX_ID, | ||
CREATE_PASSWORD_INPUT_BOX_ID, | ||
SUBMIT_BUTTON_ID, | ||
IOS_I_UNDERSTAND_BUTTON_ID, | ||
ANDROID_I_UNDERSTAND_BUTTON_ID, | ||
} from '../../../../../app/constants/test-ids'; | ||
|
||
import { strings } from '../../../../../locales/i18n'; | ||
|
||
const CHANGE_PASSWORD_TEXT = strings('manual_backup_step_1.confirm_password'); | ||
|
||
export default class ChangePasswordView { | ||
static async typeInConfirmPasswordInputBox(PASSWORD) { | ||
await TestHelpers.typeTextAndHideKeyboard(CONFIRM_CHANGE_PASSWORD_INPUT_BOX_ID, PASSWORD); | ||
} | ||
|
||
static async tapConfirmButton() { | ||
await TestHelpers.tapByText('CONFIRM'); | ||
} | ||
|
||
static async enterPassword(PASSWORD) { | ||
await TestHelpers.typeTextAndHideKeyboard(CREATE_PASSWORD_INPUT_BOX_ID, PASSWORD); | ||
} | ||
|
||
static async reEnterPassword(PASSWORD) { | ||
await TestHelpers.typeTextAndHideKeyboard(CONFIRM_PASSWORD_INPUT_BOX_ID, PASSWORD); | ||
} | ||
|
||
static async tapIUnderstandCheckBox() { | ||
if (device.getPlatform() === 'ios') { | ||
await TestHelpers.tap(IOS_I_UNDERSTAND_BUTTON_ID); | ||
} else { | ||
// Tap by the I understand text | ||
await TestHelpers.delay(1000); | ||
await TestHelpers.tap(ANDROID_I_UNDERSTAND_BUTTON_ID); | ||
} | ||
} | ||
|
||
static async tapResetPasswordButton() { | ||
await TestHelpers.waitAndTap(SUBMIT_BUTTON_ID); | ||
} | ||
|
||
static async isVisible() { | ||
await TestHelpers.checkIfElementWithTextIsVisible(CHANGE_PASSWORD_TEXT); | ||
} | ||
|
||
static async isNotVisible() { | ||
await TestHelpers.checkIfElementWithTextIsNotVisible(CHANGE_PASSWORD_TEXT); | ||
} | ||
} |
Oops, something went wrong.