Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(extension): fix LW-4060 and LW-7743 #1723

Merged
merged 1 commit into from
Feb 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export const SignData = (): React.ReactElement => {
<Layout title={undefined}>
<div className={styles.passwordContainer}>
<Spin spinning={isLoading}>
<h5 className={styles.message}>
<h5 className={styles.message} data-testid="sign-transaction-description">
{t('browserView.transaction.send.enterWalletPasswordToConfirmTransaction')}
</h5>
<Password
Expand Down
4 changes: 4 additions & 0 deletions packages/e2e-tests/src/assert/dAppConnectorAssert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,10 @@ class DAppConnectorAssert {

async assertSeeSignTransactionPage() {
await this.assertSeeHeader();
await SignTransactionPage.description.waitForDisplayed();
expect(await SignTransactionPage.description.getText()).to.equal(
await t('browserView.transaction.send.enterWalletPasswordToConfirmTransaction')
);
await SignTransactionPage.passwordInput.container.waitForDisplayed();
await SignTransactionPage.confirmButton.waitForDisplayed();
expect(await SignTransactionPage.confirmButton.getText()).to.equal(await t('dapp.confirm.btn.confirm'));
Expand Down
14 changes: 4 additions & 10 deletions packages/e2e-tests/src/features/DAppConnector.feature
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,10 @@ Feature: DAppConnector - Common
Then I see DApp authorization window in <theme> mode
And I click "Authorize" button in DApp authorization window
And I click "Only once" button in DApp authorization window
When I click "Set Collateral" button in test DApp
Then I see DApp collateral window in <theme> mode
When I click "Confirm" button in DApp collateral window
Then I see DApp connector "All done" page in <theme> mode
And I click "Close" button on DApp "All done" page
When I click "Send ADA" "Run" button in test DApp
Then I see DApp connector "Confirm transaction" page in <theme> mode
When I click "Confirm" button on "Confirm transaction" page
Then I see DApp connector "Password" page in <theme> mode
Examples:
| theme |
| light |
Expand All @@ -134,13 +131,10 @@ Feature: DAppConnector - Common
And I close all remaining tabs except current one
And I set theme switcher to dark mode
And I open and authorize test DApp with "Only once" setting
When I click "Set Collateral" button in test DApp
Then I see DApp collateral window in dark mode
And I click "Confirm" button in DApp collateral window
Then I see DApp connector "All done" page in dark mode
And I click "Close" button on DApp "All done" page
When I click "Send ADA" "Run" button in test DApp
Then I see DApp connector "Confirm transaction" page in dark mode
When I click "Confirm" button on "Confirm transaction" page
Then I see DApp connector "Password" page in dark mode

@LW-4071
Scenario: DApp remains authorised after choosing "Always" and removing & restoring a wallet
Expand Down
5 changes: 5 additions & 0 deletions packages/e2e-tests/src/steps/dAppConnectorSteps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ Then(/^I see DApp connector "Confirm transaction" page in (dark|light) mode$/, a
await CommonAssert.assertSeeThemeMode(mode);
});

Then(/^I see DApp connector "Password" page in (dark|light) mode$/, async (mode: 'dark' | 'light') => {
await DAppConnectorAssert.assertSeeSignTransactionPage();
await CommonAssert.assertSeeThemeMode(mode);
});

Then(/^I see DApp connector Sign data "Confirm transaction" page$/, async () => {
await DAppConnectorUtils.waitAndSwitchToDAppConnectorWindow(3);
});
Expand Down
Loading