View on GitHub
File Changes
-
@e2e
+
@e2e @watch
Feature: Restore Hardware wallet

                      
  Background:
      | name        |
      | Test Wallet |
  
-
  @watch
  Scenario: Successfully restoring 12-word Ledger wallet
    Given The sidebar shows the "wallets" category
    When I click on the add wallet button in the sidebar
    Then I click on option "Hardware wallet"
    Then I should see section "What kind of hardware wallet would you like to restore?"
    Then I click on option "Ledger Nano"
-
    And I scroll to "Restore Wallet Dialog" checkboxes
-
    I check all "Restore Wallet Dialog" checkboxes
+
    Then I confirm "I understand and accept responsibility for the security concerns"
+
    Then I confirm "I understand that I should delete the Balance wallet"
    And I click continue
    And I enter recovery phrase in restore wallet dialog: 
      | recoveryPhrase                                                                                                                                                                   |
);

                      
Then(
-
  /^I scroll to "Restore Wallet Dialog" checkboxes$/,
-
  async function() {
-
    // const targetSelector = '.Dialog_content .walletDeleteNote label'
-
    // await this.client.waitForVisible(targetSelector);
-
    // return scrollIntoView,(this.client, targetSelector);
-

                      
-
    await this.client.waitForVisible('.Dialog_content');
-

                      
-
      await this.client.execute(() => {
-
        const scrollableListContainer = window.document.getElementsByClassName(
-
          'Dialog_content'
-
        );
-
        const scrollableList = window.document.getElementsByClassName(
-
          'Dialog_content'
-
        );
-
        const listHeight = scrollableListContainer[0].getBoundingClientRect()
-
          .height;
-

                      
-
        console.debug('HEIGHT: ', listHeight);
-
        // Scroll to bottom
-
        scrollableList[0].scroll(0, listHeight);
-
      });
+
  /^I confirm "([^"]*)"$/,
+
  async function(text) {
+
    const targetSelector = `//label[contains(text(), "${text}")]`;
+
    await this.client.waitForVisible(targetSelector);
+
    await scrollIntoView(this.client, targetSelector);
+
    await this.client.click(targetSelector);
  }
);

                      
-
When(/^I check all "Restore Wallet Dialog" checkboxes$/, async function() {
-
   const targetSelector = '.Dialog_content .restoreSecurityNote'
-
   const targetSelector2 = '.Dialog_content .walletDeleteNote label'
-
   await this.client.waitForVisible(targetSelector);
-
   await this.client.waitForVisible(targetSelector2);
-
   this.client.click(targetSelector);
-
   await this.client.click(targetSelector2);
-
});
-

                      
Then(/^"([^"]*)" wallet should have "([^"]*)" as id$/, async function(
  walletName,
  walletId