-
-
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.
Merge branch 'main' into fix/update-default-button-base-label-text-va…
…riant
- Loading branch information
Showing
10 changed files
with
160 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import Matchers from '../../utils/Matchers'; | ||
import Gestures from '../../utils/Gestures'; | ||
import { ErrorBoundarySelectorsText } from '../../selectors/ErrorBoundary/ErrorBoundaryView.selectors'; | ||
|
||
class ErrorBoundaryView { | ||
get title() { | ||
return Matchers.getElementByText(ErrorBoundarySelectorsText.TITLE); | ||
} | ||
|
||
get srpLinkText() { | ||
return Matchers.getElementByText( | ||
ErrorBoundarySelectorsText.SAVE_YOUR_SRP_TEXT, | ||
); | ||
} | ||
|
||
async tapSRPLinkText() { | ||
await Gestures.waitAndTap(this.srpLinkText); | ||
} | ||
} | ||
|
||
export default new ErrorBoundaryView(); |
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,9 @@ | ||
import enContent from '../../../locales/languages/en.json'; | ||
|
||
export const ErrorBoundarySelectorsIDs = { | ||
CONTAINER: 'error-boundary-container-id', | ||
}; | ||
export const ErrorBoundarySelectorsText = { | ||
SAVE_YOUR_SRP_TEXT: enContent.error_screen.save_seedphrase_2, | ||
TITLE: enContent.error_screen.title, | ||
}; |
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,56 @@ | ||
'use strict'; | ||
import Browser from '../../pages/Browser/BrowserView'; | ||
import TabBarComponent from '../../pages/wallet/TabBarComponent'; | ||
import { loginToApp } from '../../viewHelper'; | ||
import TestDApp from '../../pages/Browser/TestDApp'; | ||
import FixtureBuilder from '../../fixtures/fixture-builder'; | ||
import { | ||
withFixtures, | ||
defaultGanacheOptions, | ||
} from '../../fixtures/fixture-helper'; | ||
import { SmokeAccounts } from '../../tags'; | ||
import TestHelpers from '../../helpers'; | ||
import Assertions from '../../utils/Assertions'; | ||
import RevealSecretRecoveryPhrase from '../../pages/Settings/SecurityAndPrivacy/RevealSecretRecoveryPhrase'; | ||
import ErrorBoundaryView from '../../pages/ErrorBoundaryView/ErrorBoundaryView'; | ||
const PASSWORD = '123123123'; | ||
|
||
describe(SmokeAccounts('Error Boundary Screen'), () => { | ||
beforeAll(async () => { | ||
jest.setTimeout(2500000); | ||
await TestHelpers.reverseServerPort(); | ||
}); | ||
|
||
it('should trigger error boundary screen to reveal SRP', async () => { | ||
await withFixtures( | ||
{ | ||
dapp: true, | ||
fixture: new FixtureBuilder() | ||
.withGanacheNetwork() | ||
.withPermissionControllerConnectedToTestDapp() | ||
.build(), | ||
restartDevice: true, | ||
ganacheOptions: defaultGanacheOptions, | ||
}, | ||
async () => { | ||
await loginToApp(); | ||
|
||
await TabBarComponent.tapBrowser(); | ||
await Browser.navigateToTestDApp(); | ||
|
||
await TestDApp.tapInvalidSigButton(); | ||
await Assertions.checkIfVisible(ErrorBoundaryView.title); | ||
await ErrorBoundaryView.tapSRPLinkText(); | ||
|
||
await RevealSecretRecoveryPhrase.enterPasswordToRevealSecretCredential( | ||
PASSWORD, | ||
); | ||
// If the following step fails, ensure you are using a test build with tap and hold to reveal animation disabled | ||
await RevealSecretRecoveryPhrase.tapToReveal(); | ||
await Assertions.checkIfVisible(RevealSecretRecoveryPhrase.container); | ||
|
||
await Assertions.checkIfTextIsDisplayed(defaultGanacheOptions.mnemonic); | ||
}, | ||
); | ||
}); | ||
}); |