-
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 branch 'main' into fix/LW-10242-drawer-to-stay-closed-on-enter
- Loading branch information
Showing
32 changed files
with
512 additions
and
528 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
42 changes: 42 additions & 0 deletions
42
packages/e2e-tests/src/assert/onboarding/ConnectYourDevicePageAssert.ts
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,42 @@ | ||
import ConnectYourDevicePage from '../../elements/onboarding/ConnectYourDevicePage'; | ||
import { t } from '../../utils/translationService'; | ||
import { expect } from 'chai'; | ||
import OnboardingCommonAssert from './onboardingCommonAssert'; | ||
|
||
class ConnectYourDevicePageAssert extends OnboardingCommonAssert { | ||
async assertSeeConnectYourDevicePage() { | ||
await this.assertSeeStepTitle(await t('core.walletSetupConnectHardwareWalletStepRevamp.title')); | ||
// TODO: replace subtitle assertions when USE_TREZOR_HW=true | ||
// await this.assertSeeStepSubtitle(await t('core.walletSetupConnectHardwareWalletStepRevamp.subTitle')); | ||
await this.assertSeeStepSubtitle(await t('core.walletSetupConnectHardwareWalletStepRevamp.subTitleLedgerOnly')); | ||
|
||
await ConnectYourDevicePage.loader.waitForDisplayed(); | ||
|
||
await this.assertSeeBackButton(); | ||
await this.assertSeeTryAgainButton(false); | ||
|
||
await this.assertSeeLegalLinks(); | ||
await this.assertSeeHelpAndSupportButton(); | ||
} | ||
|
||
async assertSeeError(expectedErrorMessage: string) { | ||
await ConnectYourDevicePage.errorImage.waitForDisplayed(); | ||
await ConnectYourDevicePage.banner.container.waitForDisplayed(); | ||
expect(await ConnectYourDevicePage.banner.description.getText()).to.equal(expectedErrorMessage); | ||
} | ||
|
||
async assertSeeTryAgainButton(shouldBeVisible: boolean) { | ||
await ConnectYourDevicePage.tryAgainButton.waitForDisplayed({ reverse: !shouldBeVisible }); | ||
if (shouldBeVisible) { | ||
expect(await ConnectYourDevicePage.tryAgainButton.getText()).to.equal( | ||
await t('core.walletSetupConnectHardwareWalletStepRevamp.errorCta') | ||
); | ||
} | ||
} | ||
|
||
async assertSeeTryAgainButtonEnabled(shouldBeEnabled: boolean) { | ||
await ConnectYourDevicePage.tryAgainButton.waitForEnabled({ reverse: !shouldBeEnabled }); | ||
} | ||
} | ||
|
||
export default new ConnectYourDevicePageAssert(); |
47 changes: 0 additions & 47 deletions
47
packages/e2e-tests/src/assert/onboarding/onboardingConnectHWPageAssert.ts
This file was deleted.
Oops, something went wrong.
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.