Skip to content

Commit

Permalink
test(extension): fix LW-4060 and LW-7743
Browse files Browse the repository at this point in the history
  • Loading branch information
wklos-iohk committed Feb 19, 2025
1 parent 34bb7cb commit 804020e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
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

0 comments on commit 804020e

Please sign in to comment.