View on GitHub
File Changes
      | name          |
      | Test Wallet |

                      
+
  @watch
  Scenario: "Loading stake pools" message is shown during initial loading of stake pool data
    Given The sidebar shows "Delegation Center" staking page icon
    When I click on the "Delegation Center" staking page button
    And I click on the "Stake Pools" tab
    And I see the "Stake Pools" page
    And I see the "Loading stake pools" message
-
    And Loading of stake pools was unsuccessful
    Then I should see loading stake pools error message
    And I should not see any stake pools

                      
-
  @watch
  Scenario: Stake pools are correctly ordered by rank
    Given The sidebar shows "Delegation Center" staking page icon
    When I click on the "Delegation Center" staking page button
    And I see the "Delegation Center" staking page
    And I click on the "Stake Pools" tab
    And I see the "Stake Pools" page
    #And I see the "Loading stake pools" message
-
    And I should see "3" stake pools loaded
-
    #Then I should see stake pools ordered by rank
+
    And I should see "3" stake pools loaded by rank

                      
  Scenario: Stake pools search works as expected
    Given The sidebar shows "Delegation Center" staking page icon
// @flow
-
import {Given, When, Then} from 'cucumber';
-
import {expect} from 'chai';
-
import type {Daedalus} from '../../../types';
+
import { Given, When, Then } from 'cucumber';
+
import { expect } from 'chai';
+
import type { Daedalus } from '../../../types';

                      
declare var daedalus: Daedalus;

                      
  return this.client.waitForVisible('.StakePools_component');
});

                      
-
Then(/^I should see "([^"]*)" stake pools loaded$/, async function (numberOfStakePools) {
-
  const stakePools = await this.client.executeAsync((done) => {
+
Then(/^I should see "([^"]*)" stake pools loaded by rank$/, async function (numberOfStakePools) {
+
  const stakePools = await this.client.executeAsync(done => {
    daedalus.stores.staking.stakePoolsRequest
      .execute()
      .then(done)
      .catch(error => done(error));
  });
  // const stakePools2 = await this.client.execute(() => daedalus.stores.staking.stakePoolsRequest);
-
  const result = stakePools && stakePools.result ? stakePools.result : [];
-
  expect(result.length).to.equal(numberOfStakePools);
+
  const result = stakePools && stakePools.value ? stakePools.value : [];
+
  expect(result.length).to.equal(parseInt(numberOfStakePools));
});