Skip to content

Commit

Permalink
System tests. Update locators (#2073)
Browse files Browse the repository at this point in the history
* fix: update locators

* fix: run only regress flag

* fix: step name
  • Loading branch information
stepanLav authored Aug 13, 2024
1 parent 62b0070 commit 4637d17
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/system_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,10 @@ jobs:
- run: npx playwright install --with-deps
if: steps.playwright-cache.outputs.cache-hit != 'true'

- name: Run Playwright tests for push event
if: github.event_name == 'push'
- name: Run Playwright tests
if: github.event_name != 'schedule'
run: npx playwright test --grep @regress

- name: Run Playwright tests for pull_request or workflow_dispatch event
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
run: npx playwright test

- name: Run Playwright tests for schedule event
if: github.event_name == 'schedule'
run: npx playwright test --grep @fee-test
Expand Down
2 changes: 1 addition & 1 deletion tests/system/pages/_elements/LoginPageElements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export class LoginPageElements implements BasePageElements {
polkadotVaultButton = 'Polkadot Vault';
continueButton = 'Continue';
accessDeniedText = 'text=Access denied!';
firstInfoButton = '[id="headlessui-popover-button-\\:r4\\:"]';
firstInfoButton = '[id="headlessui-popover-button-\\:r8\\:"]';
subscanLabel = 'View on Subscan';
onboardingLabel = 'Add your wallet';
}
2 changes: 1 addition & 1 deletion tests/system/pages/assetsPage/VaultAssetsPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class VaultAssetsPage extends BasePage<AssetsPageElements> {
}

public async openSettingsWidget(): Promise<AssetsSettingsModalWindow> {
await this.clickOnButtonBySelector(this.pageElements.settingsModalWindowButtonSelector, true);
await this.page.getByRole('main').getByRole('button').nth(1).click();

return new AssetsSettingsModalWindow(this.page, new AssetsSettingsModalElements(), this);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/system/pages/loginPage/WatchOnlyLoginPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class WatchOnlyLoginPage extends BasePage<LoginPageElements> {
}

public async clickInfoButton(): Promise<WatchOnlyLoginPage> {
await this.click(this.pageElements.firstInfoButton);
await this.page.locator(this.pageElements.firstInfoButton).getByRole('button').nth(1).click();

return this;
}
Expand Down

0 comments on commit 4637d17

Please sign in to comment.