Skip to content

Commit 2309b20

Browse files
authored
test(extension): test maintenance 27 Sep (#1453)
1 parent cb3fffe commit 2309b20

File tree

4 files changed

+25
-12
lines changed

4 files changed

+25
-12
lines changed

packages/e2e-tests/src/elements/toastMessage.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,30 @@
1+
/* eslint-disable no-undef */
2+
import { ChainablePromiseElement } from 'webdriverio';
3+
14
class ToastMessage {
25
private CONTAINER = '[data-testid="toast-content-wrapper"]';
36
private MESSAGE_TEXT = '[data-testid="toast-message-text"]';
47
private ICON = '[data-testid="toast-icon"]';
58
private CLOSE_BUTTON = '[data-testid="toast-close-btn"]';
69
private PROGRESS_BAR = '[data-testid="progressbar-wrapper-id"]';
710

8-
get container() {
11+
get container(): ChainablePromiseElement<WebdriverIO.Element> {
912
return $(this.CONTAINER);
1013
}
1114

12-
get messageText() {
15+
get messageText(): ChainablePromiseElement<WebdriverIO.Element> {
1316
return $(this.MESSAGE_TEXT);
1417
}
1518

16-
get icon() {
19+
get icon(): ChainablePromiseElement<WebdriverIO.Element> {
1720
return $(this.ICON);
1821
}
1922

20-
get closeButton() {
23+
get closeButton(): ChainablePromiseElement<WebdriverIO.Element> {
2124
return $(this.CLOSE_BUTTON);
2225
}
2326

24-
get progressBar() {
27+
get progressBar(): ChainablePromiseElement<WebdriverIO.Element> {
2528
return $(this.PROGRESS_BAR);
2629
}
2730

packages/e2e-tests/src/elements/trezorConnectPage.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
1+
/* eslint-disable no-undef */
2+
import { ChainablePromiseElement } from 'webdriverio';
3+
14
class TrezorConnectPage {
25
private CONFIRM_BUTTON = '[data-test="@permissions/confirm-button"]';
36
private EXPORT_BUTTON = '[id="container"] .confirm';
47
private ANALYTICS_CONFIRM_BUTTON = '[data-test="@analytics/continue-button"]';
58
private ANALYTICS_TOGGLE_BUTTON = '[data-test="@analytics/toggle-switch"]';
69
private SHADOW_ROOT = '#react';
710

8-
get confirmButton() {
11+
get confirmButton(): ChainablePromiseElement<WebdriverIO.Element> {
912
return $(this.CONFIRM_BUTTON);
1013
}
1114

12-
get analyticsConfirmButton() {
15+
get analyticsConfirmButton(): ChainablePromiseElement<WebdriverIO.Element> {
1316
return $(this.SHADOW_ROOT).shadow$(this.ANALYTICS_CONFIRM_BUTTON);
1417
}
1518

16-
get analyticsToggleButton() {
19+
get analyticsToggleButton(): ChainablePromiseElement<WebdriverIO.Element> {
1720
return $(this.SHADOW_ROOT).shadow$(this.ANALYTICS_TOGGLE_BUTTON);
1821
}
1922

20-
get exportButton() {
23+
get exportButton(): ChainablePromiseElement<WebdriverIO.Element> {
2124
return $(this.EXPORT_BUTTON);
2225
}
2326

packages/e2e-tests/src/features/e2e/SendTransactionDappE2E.feature

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ Feature: Send Transactions from Dapp - E2E
9292
And I fill correct password
9393
And I click "Confirm" button on "Sign transaction" page
9494
And I see DApp connector "All done" page
95-
Then I click "Send ADA" "Run" button in test DApp
96-
Then I see DApp connector "All done" page on 3 window handle
97-
And I see DApp connector "Confirm transaction" page on 4 window handle
95+
And I click "Send ADA" "Run" button in test DApp without retry
96+
When I switch to last window
97+
Then I see DApp connector "Confirm transaction" page with all UI elements and with following data in "Transaction Summary" section:
98+
| -3.00 tADA - FEE |

packages/e2e-tests/src/steps/dAppConnectorSteps.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,12 @@ Then(/^I click "(Send ADA|Send Token)" "Run" button in test DApp$/, async (runBu
287287
}
288288
});
289289

290+
Then(/^I click "Send ADA" "Run" button in test DApp without retry$/, async () => {
291+
await DAppConnectorPageObject.switchToTestDAppWindow();
292+
await browser.pause(1000);
293+
await TestDAppPage.sendAdaRunButton.click();
294+
});
295+
290296
Then(/^I click "(Send ADA|Send Token)" button in test DApp$/, async (buttonId: 'Send ADA' | 'Send Token') => {
291297
await DAppConnectorPageObject.switchToTestDAppWindow();
292298
switch (buttonId) {

0 commit comments

Comments
 (0)