Skip to content
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 @@ -547,6 +547,13 @@ class MultidelegationPage {
});
}

async waitForStakePoolGridToLoad() {
await browser.waitUntil(async () => (await this.displayedCards).length > 1, {
timeout: 30_000,
timeoutMsg: 'failed while waiting for stake pool grid to load'
});
}

async clickManageButton() {
await this.manageBtn.waitForClickable();
await this.manageBtn.click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ Feature: Staking Page - Extended View
And (if applicable) first stake pool search result has "<stake_pool_ticker>" ticker
Examples:
| stake_pool_search_term | number_of_results | stake_pool_ticker |
| a Ocean | 3 | OCEAN |
| a ocean | 3 | OCEAN |
| a Capital | 2 | ADACT |
| a capital | 2 | ADACT |
| ABC# | 0 | |
| HUA | 2 | HUADA |
| 123456 | 0 | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ Feature: Staking Page - Extended View
And I am on Staking extended page
And I open Browse pools tab
And I switch to list view on "Browse pools" tab
And I wait for stake pool list to be populated
When I scroll down 500 pixels
Then stake pool list row skeleton is displayed
When I wait 500 milliseconds
Then stake pool list row skeleton is not displayed
Expand All @@ -107,8 +105,6 @@ Feature: Staking Page - Extended View
And I am on Staking extended page
And I open Browse pools tab
And I switch to grid view on "Browse pools" tab
When I scroll down 500 pixels
And I scroll down 500 pixels
Then stake pool grid card skeleton is displayed
When I wait 500 milliseconds
Then stake pool grid card skeleton is not displayed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ Feature: Staking Page - Extended View
Given I reset default behaviour for modal about issues with multi-delegation and DApps
When I navigate to Staking extended page
And I open Browse pools tab
And I wait for stake pool grid to be populated
And I click on a random stake pool from the grid
And I click on "Stake all on this pool" button on stake pool details drawer
And I click "Add stake pool" button
Expand All @@ -117,6 +118,7 @@ Feature: Staking Page - Extended View
When I navigate to Staking extended page
And I open Browse pools tab
And I switch to list view on "Browse pools" tab
And I wait for stake pool list to be populated
And I click on a random stake pool from the list
And I click on "Stake all on this pool" button on stake pool details drawer
And I click "Add stake pool" button
Expand All @@ -131,6 +133,7 @@ Feature: Staking Page - Extended View
Given I reset default behaviour for modal about issues with multi-delegation and DApps
When I navigate to Staking extended page
And I open Browse pools tab
And I wait for stake pool grid to be populated
And I click on a random stake pool from the grid
And I click on "Select pool for multi-staking" button on stake pool details drawer
Then I see the modal about issues with multi-delegation and DApps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ Feature: Staking Page - Delegated funds - Single pool - Extended View
When I navigate to Staking extended page
And I open Browse pools tab
And I switch to list view on "Browse pools" tab
And I wait for stake pool list to be populated
And I click on a random stake pool from the list
And I click on "Stake all on this pool" button on stake pool details drawer
And I click "Fine by me" button on "Changing staking preferences?" modal
Expand All @@ -145,6 +146,7 @@ Feature: Staking Page - Delegated funds - Single pool - Extended View
Given I reset default behaviour for modal about issues with multi-delegation and DApps
When I navigate to Staking extended page
And I open Browse pools tab
And I wait for stake pool grid to be populated
And I click on a random stake pool from the grid
And I click on "Select pool for multi-staking" button on stake pool details drawer
Then I see the modal about issues with multi-delegation and DApps
Expand Down
13 changes: 11 additions & 2 deletions packages/e2e-tests/src/steps/multidelegationSteps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,17 @@ Given(/^I click "Expand view" on Start Staking page$/, async () => {
await StartStakingPage.clickExpandedViewBannerButton();
});

When(/^I wait for stake pool list to be populated$/, async () => {
await MultidelegationPage.waitForStakePoolListToLoad();
When(/^I wait for stake pool (grid|list) to be populated$/, async (view: 'grid' | 'list') => {
switch (view) {
case 'grid':
await MultidelegationPage.waitForStakePoolGridToLoad();
break;
case 'list':
await MultidelegationPage.waitForStakePoolListToLoad();
break;
default:
throw new Error(`Unsupported stake pool display view: ${view}`);
}
});

Then(
Expand Down
Loading