From bd3a2129de66fdaa7818aa04d2ea029cbb48e21a Mon Sep 17 00:00:00 2001 From: Manus McCole Date: Wed, 14 Jul 2021 11:42:50 +0100 Subject: [PATCH 01/37] Added tests for Stake-pool Settings and Wallet Currency Display Settings --- .../currency-display-settings.feature | 34 +++++++ .../e2e/features/stakepool-settings.feature | 32 +++++++ .../e2e/steps/currency-display-settings.js | 43 +++++++++ .../settings/e2e/steps/stakepool-settings.js | 91 +++++++++++++++++++ 4 files changed, 200 insertions(+) create mode 100644 tests/settings/e2e/features/currency-display-settings.feature create mode 100644 tests/settings/e2e/features/stakepool-settings.feature create mode 100644 tests/settings/e2e/steps/currency-display-settings.js create mode 100644 tests/settings/e2e/steps/stakepool-settings.js diff --git a/tests/settings/e2e/features/currency-display-settings.feature b/tests/settings/e2e/features/currency-display-settings.feature new file mode 100644 index 0000000000..5beefa15cc --- /dev/null +++ b/tests/settings/e2e/features/currency-display-settings.feature @@ -0,0 +1,34 @@ +@e2e @watch +Feature: Wallet currency display settings + + Background: + Given I have completed the basic setup + And I have the following wallets: + | name | + | Test Wallet | + + Scenario Outline: User selects alternative currency's to display wallet balance + Given I am on the General Settings "wallets" screen + And I open currency selection dropdown + When I select "" as the selected displayed currency + And I am on the "Test Wallet" wallet "summary" screen + Then I should see "" displayed beside wallet balance + + Examples: + | currency | ticker | + | Litecoin | LTC | + | Stellar | XLM | + + + Scenario: User hits toggle button to show/not show ada wallet balance in other currencys + Given I am on the General Settings "wallets" screen + When I toggle the button off to change if I want to see my ada balance in other currencys + Then the currency selection box is hidden + And I am on the "Test Wallet" wallet "summary" screen + Then The wallet summary screen does not show ada balance in other currencys placeholder + When I am on the General Settings "wallets" screen + And I toggle the button on to change if I want to see my ada balance in other currencys + When I am on the General Settings "wallets" screen + Then the currency selection box is visible + And I am on the "Test Wallet" wallet "summary" screen + Then The wallet summary screen does show ada balance in other currencys placeholder diff --git a/tests/settings/e2e/features/stakepool-settings.feature b/tests/settings/e2e/features/stakepool-settings.feature new file mode 100644 index 0000000000..134089eaf2 --- /dev/null +++ b/tests/settings/e2e/features/stakepool-settings.feature @@ -0,0 +1,32 @@ +@e2e @watch +Feature: Stake-pool server settings + + Background: + Given I have completed the basic setup + And I have the following wallets: + | name | + | Test Wallet | + + Scenario: Navigating to Stake-pool settings screen and selecting custom stake-pool server + Given I am on the General Settings "stake-pools" screen + When custom server is the default option + And The smash server input textBox is visible + And I enter custom server "https://smash.cardano-testnet.iohkdev.io/" as the custom server option + And I click on Daedalus logo to change focus + And I click the stake-pool custom server inputbox submit button + And I see the your changes have been saved success message + And I am on the Delegation "stake-pools" screen + Then "https://smash.cardano-testnet.iohkdev.io/" is visible on stake-pool screen above stake-pool list and is clickable + And I am brought back to the stake-pool server settings screen + + Scenario: Verify stake-pool custom server textbox is visible and error message verification + Given I am on the General Settings "stake-pools" screen + When I open stake pool server dropdown + And I select custom server option + Then The smash server input textBox is visible + And I enter invalid url "www.test" without https + Then Stake-pool custom input box error message is displayed + And I delete values in smash server custom url input box + And I enter invalid server "https://www.google.ie" containing https + And I click the stake-pool custom server inputbox submit button + Then I see the "This url is not a valid SMASH server" error message displayed diff --git a/tests/settings/e2e/steps/currency-display-settings.js b/tests/settings/e2e/steps/currency-display-settings.js new file mode 100644 index 0000000000..6abc686e48 --- /dev/null +++ b/tests/settings/e2e/steps/currency-display-settings.js @@ -0,0 +1,43 @@ +// @flow +import { When, Then} from 'cucumber'; + +const CONVERTED_CURRENCY_WALLET_DISPLAY_GENERAL = '//*[@class="WalletSummaryCurrency_currencyRate"]'; +const DISPLAY_BALANCE_OTHER_CURRENCYS_TOGGLE_STATUS_ON = '//*[@class="NormalSwitch_component SimpleSwitch_root SwitchOverrides_root SimpleSwitch_checked SwitchOverrides_checked"]'; +const DISPLAY_BALANCE_OTHER_CURRENCYS_TOGGLE_STATUS_OFF = '//*[@class="SimpleSwitch_switch SwitchOverrides_switch"]'; +const SELECT_CURRENCY_DROPDOWN = '//*[@label="Select currency"]'; + +When(/^I open currency selection dropdown$/, function() { + return this.waitAndClick(SELECT_CURRENCY_DROPDOWN); +}); + +When(/^I select "([^"]*)" as the selected displayed currency$/, function(currency) { + return this.waitAndClick(`//*[contains(text(), "${currency}")]`); +}); + +Then(/^I should see "([^"]*)" displayed beside wallet balance$/, function(ticker) { + return this.client.waitForVisible(`//*[@class="WalletSummaryCurrency_currencyRate" and text()="${ticker}"]`); +}); + +When(/^I toggle the button (on|off) to change if I want to see my ada balance in other currencys$/, function(switchStatus) { + let selector = DISPLAY_BALANCE_OTHER_CURRENCYS_TOGGLE_STATUS_ON; + if(switchStatus === 'on'){ + selector = DISPLAY_BALANCE_OTHER_CURRENCYS_TOGGLE_STATUS_OFF; + } + return this.waitAndClick(selector); +}); + +Then(/^the currency selection box is (hidden|visible)$/, function(state) { + let invisibility = false; + if (state === 'hidden') { + invisibility = true; + } + return this.client.waitForVisible(SELECT_CURRENCY_DROPDOWN, null, invisibility); +}); + +Then(/^The wallet summary screen (does|does not) show ada balance in other currencys placeholder$/, function(switchstatus) { + let invisible = true; + if (switchstatus === 'does') { + invisible = false; + } + return this.client.waitForVisible(CONVERTED_CURRENCY_WALLET_DISPLAY_GENERAL, null, invisible); +}); diff --git a/tests/settings/e2e/steps/stakepool-settings.js b/tests/settings/e2e/steps/stakepool-settings.js new file mode 100644 index 0000000000..e2c10a476b --- /dev/null +++ b/tests/settings/e2e/steps/stakepool-settings.js @@ -0,0 +1,91 @@ +import { When, Then,} from 'cucumber'; + +const CUSTOM_SERVER_DROPDOWN_OPTION = '//*[@class="SimpleInput_customValueWrapper"]//*[@value="Custom server"]'; +const DAEDALUS_TOP_BAR_LOGO = '//*[@class="TopBar_topBar TopBar_withoutWallet"]'; +const IS_ERROR_MESSAGE_ACTIVATED = '//*[@class="SimpleInput_input SimpleInput_errored"]'; +const NONE_FETCH_DATA_DIRECTLY_OPTION = '//*[@class="SimpleInput_customValueWrapper"]//*[@value="None - fetch the data directly"]'; +const NOT_A_VALID_SMASH_SERVER_ERROR_MESSAGE_ACTIVATED = '//*[@class="InlineEditingInput_errorMessage" and text()="This URL is not a valid SMASH server"]'; +const OFF_CHAIN_METADATA_SERVER_SMASH_LABEL = '//*[contains(text(), "Off-chain metadata server (SMASH)")]'; +const STAKE_POOL_SERVER_DROPDOWN = '//*[@class="SimpleFormField_inputWrapper"]'; +const STAKE_POOL_SERVER_DROPDOWN_CUSTOM_OPTION = '//*[@class="ScrollbarsCustom-Content"]//span[text()="Custom server"]'; +const SMASH_SERVER_URL_INPUT_BOX = '//*[@label="SMASH server URL"]'; +const STAKE_POOL_CUSTOM_SERVER_INPUT_BOX_SUBMIT_BUTTON = '//*[@class="InlineEditingInput_button InlineEditingInput_okButton SimpleButton_root ButtonOverrides_root"]'; +const STAKE_POOL_CUSTOM_SERVER_INPUT_BOX_X_BUTTON = '//*[@class="InlineEditingInput_button InlineEditingInput_cancelButton SimpleButton_root ButtonOverrides_root"]'; +const STAKE_POOLS_SUBMENU_SETTINGS = '//*[@class="SettingsMenu_component"]//button[text()="Stake pools"]'; +const CHANGES_SAVED_SUCCESS_MESSAGE = '//*[@class="StakePoolsSettings_savingResultLabel"]'; + +When(/^none fetch the data directly is the default option$/, function() { + return this.waitAndClick(NONE_FETCH_DATA_DIRECTLY_OPTION); +}); + +When(/^custom server is the default option$/, function() { + return this.waitAndClick(CUSTOM_SERVER_DROPDOWN_OPTION); +}); + +When(/^I click on Daedalus logo to change focus$/, function() { + // This step was necessary as sometimes if the focus is on text in the textbox the submit button could not recieve the click and i got a "Element is not clickable at point error" + return this.waitAndClick(DAEDALUS_TOP_BAR_LOGO); +}); + +Then(/^"([^"]*)" is visible on stakepool screen above stake-pool list and is clickable$/, function(serverUrl) { + return this.waitAndClick('//*[@class="StakePools_smashSettings"]//span[text()="Moderated by '+ serverUrl + '"]'); + + // old element const MODERATED_BY_IOHK_DEVIO_HEADER_LINK = '//*[@class="StakePools_smashSettings"]//span[text()="Moderated by https://smash.cardano-testnet.iohkdev.io/"]'; + // return this.client.waitForVisible(`//*[@class="WalletSummaryCurrency_currencyRate" and text()="${ticker}"]`); +}); + +Then(/^I am brought back to the stake-pool server settings screen$/, function() { + return this.client.waitForVisible(OFF_CHAIN_METADATA_SERVER_SMASH_LABEL); +}); + +When(/^I select custom server option$/, function() { + return this.waitAndClick(STAKE_POOL_SERVER_DROPDOWN_CUSTOM_OPTION); +}); + +When(/^I open stake pool server dropdown$/, function() { + return this.waitAndClick(STAKE_POOL_SERVER_DROPDOWN); +}); + +Then(/^The smash server input textBox is visible$/, function() { + const millisecondsToWait = 25000; + setTimeout(function() { + }, millisecondsToWait); + + return this.client.waitForVisible(SMASH_SERVER_URL_INPUT_BOX); +}); + +When(/^I enter custom server "([^"]*)" as the custom server option$/, function(customServer) { + this.client.setValue(SMASH_SERVER_URL_INPUT_BOX, customServer); +}); + +When(/^I enter invalid url "([^"]*)" without https$/, function(invalidUrl) { + this.client.setValue(SMASH_SERVER_URL_INPUT_BOX, invalidUrl); +}); + +Then(/^Stake-pool custom input box error message is displayed$/, function() { + return this.client.waitForVisible(IS_ERROR_MESSAGE_ACTIVATED); +}); + +When(/^I enter invalid server "([^"]*)" containing https$/, function(value) { + this.client.setValue(SMASH_SERVER_URL_INPUT_BOX, value); +}); + +When(/^I delete values in smash server custom url input box$/, function() { + return this.waitAndClick(STAKE_POOL_CUSTOM_SERVER_INPUT_BOX_X_BUTTON); +}); + +When(/^I click the stake-pool custom server inputbox submit button$/, function() { + return this.waitAndClick(STAKE_POOL_CUSTOM_SERVER_INPUT_BOX_SUBMIT_BUTTON); +}); + +Then(/^I see the "This url is not a valid SMASH server" error message displayed$/, function() { + return this.client.waitForVisible(NOT_A_VALID_SMASH_SERVER_ERROR_MESSAGE_ACTIVATED); +}); + +When(/^I click on stakepool subtab$/, function() { + return this.waitAndClick(STAKE_POOLS_SUBMENU_SETTINGS); +}); + +Then(/^I see the your changes have been saved success message$/, function() { + return this.client.waitForVisible(CHANGES_SAVED_SUCCESS_MESSAGE); +}); From 57bee2635208717885240cdf3409573a7a999d03 Mon Sep 17 00:00:00 2001 From: Manus McCole Date: Wed, 14 Jul 2021 12:24:17 +0100 Subject: [PATCH 02/37] Deleted old comments and unneeded timeout --- tests/settings/e2e/steps/stakepool-settings.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/tests/settings/e2e/steps/stakepool-settings.js b/tests/settings/e2e/steps/stakepool-settings.js index e2c10a476b..95dbf85310 100644 --- a/tests/settings/e2e/steps/stakepool-settings.js +++ b/tests/settings/e2e/steps/stakepool-settings.js @@ -29,9 +29,6 @@ When(/^I click on Daedalus logo to change focus$/, function() { Then(/^"([^"]*)" is visible on stakepool screen above stake-pool list and is clickable$/, function(serverUrl) { return this.waitAndClick('//*[@class="StakePools_smashSettings"]//span[text()="Moderated by '+ serverUrl + '"]'); - - // old element const MODERATED_BY_IOHK_DEVIO_HEADER_LINK = '//*[@class="StakePools_smashSettings"]//span[text()="Moderated by https://smash.cardano-testnet.iohkdev.io/"]'; - // return this.client.waitForVisible(`//*[@class="WalletSummaryCurrency_currencyRate" and text()="${ticker}"]`); }); Then(/^I am brought back to the stake-pool server settings screen$/, function() { @@ -47,10 +44,6 @@ When(/^I open stake pool server dropdown$/, function() { }); Then(/^The smash server input textBox is visible$/, function() { - const millisecondsToWait = 25000; - setTimeout(function() { - }, millisecondsToWait); - return this.client.waitForVisible(SMASH_SERVER_URL_INPUT_BOX); }); From 8d51456a91b0e2385f87033ca8cb0ad64d6edbea Mon Sep 17 00:00:00 2001 From: Manus McCole Date: Wed, 14 Jul 2021 12:43:30 +0100 Subject: [PATCH 03/37] Fixing typo in stakepool-settings.feature that was preventing code from knowing which function to run --- tests/settings/e2e/features/stakepool-settings.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/settings/e2e/features/stakepool-settings.feature b/tests/settings/e2e/features/stakepool-settings.feature index 134089eaf2..c8cbd9e4f4 100644 --- a/tests/settings/e2e/features/stakepool-settings.feature +++ b/tests/settings/e2e/features/stakepool-settings.feature @@ -16,7 +16,7 @@ Feature: Stake-pool server settings And I click the stake-pool custom server inputbox submit button And I see the your changes have been saved success message And I am on the Delegation "stake-pools" screen - Then "https://smash.cardano-testnet.iohkdev.io/" is visible on stake-pool screen above stake-pool list and is clickable + Then "https://smash.cardano-testnet.iohkdev.io/" is visible on stakepool screen above stake-pool list and is clickable And I am brought back to the stake-pool server settings screen Scenario: Verify stake-pool custom server textbox is visible and error message verification From 7e43bdd43c7b65fdd7e080bb362958fabe127f7c Mon Sep 17 00:00:00 2001 From: Manus McCole Date: Wed, 14 Jul 2021 12:47:19 +0100 Subject: [PATCH 04/37] Minor Code reorganising --- tests/settings/e2e/features/currency-display-settings.feature | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/settings/e2e/features/currency-display-settings.feature b/tests/settings/e2e/features/currency-display-settings.feature index 5beefa15cc..493ac5807a 100644 --- a/tests/settings/e2e/features/currency-display-settings.feature +++ b/tests/settings/e2e/features/currency-display-settings.feature @@ -19,7 +19,6 @@ Feature: Wallet currency display settings | Litecoin | LTC | | Stellar | XLM | - Scenario: User hits toggle button to show/not show ada wallet balance in other currencys Given I am on the General Settings "wallets" screen When I toggle the button off to change if I want to see my ada balance in other currencys From 45593b292e6a2871504fd6ce27861a14de448fc4 Mon Sep 17 00:00:00 2001 From: Manus McCole Date: Wed, 14 Jul 2021 14:28:35 +0100 Subject: [PATCH 05/37] Minor Code reorganisation --- tests/settings/e2e/steps/currency-display-settings.js | 2 +- tests/settings/e2e/steps/stakepool-settings.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/settings/e2e/steps/currency-display-settings.js b/tests/settings/e2e/steps/currency-display-settings.js index 6abc686e48..f3c4ce896b 100644 --- a/tests/settings/e2e/steps/currency-display-settings.js +++ b/tests/settings/e2e/steps/currency-display-settings.js @@ -2,8 +2,8 @@ import { When, Then} from 'cucumber'; const CONVERTED_CURRENCY_WALLET_DISPLAY_GENERAL = '//*[@class="WalletSummaryCurrency_currencyRate"]'; -const DISPLAY_BALANCE_OTHER_CURRENCYS_TOGGLE_STATUS_ON = '//*[@class="NormalSwitch_component SimpleSwitch_root SwitchOverrides_root SimpleSwitch_checked SwitchOverrides_checked"]'; const DISPLAY_BALANCE_OTHER_CURRENCYS_TOGGLE_STATUS_OFF = '//*[@class="SimpleSwitch_switch SwitchOverrides_switch"]'; +const DISPLAY_BALANCE_OTHER_CURRENCYS_TOGGLE_STATUS_ON = '//*[@class="NormalSwitch_component SimpleSwitch_root SwitchOverrides_root SimpleSwitch_checked SwitchOverrides_checked"]'; const SELECT_CURRENCY_DROPDOWN = '//*[@label="Select currency"]'; When(/^I open currency selection dropdown$/, function() { diff --git a/tests/settings/e2e/steps/stakepool-settings.js b/tests/settings/e2e/steps/stakepool-settings.js index 95dbf85310..34f5ef0265 100644 --- a/tests/settings/e2e/steps/stakepool-settings.js +++ b/tests/settings/e2e/steps/stakepool-settings.js @@ -1,18 +1,18 @@ import { When, Then,} from 'cucumber'; +const CHANGES_SAVED_SUCCESS_MESSAGE = '//*[@class="StakePoolsSettings_savingResultLabel"]'; const CUSTOM_SERVER_DROPDOWN_OPTION = '//*[@class="SimpleInput_customValueWrapper"]//*[@value="Custom server"]'; const DAEDALUS_TOP_BAR_LOGO = '//*[@class="TopBar_topBar TopBar_withoutWallet"]'; const IS_ERROR_MESSAGE_ACTIVATED = '//*[@class="SimpleInput_input SimpleInput_errored"]'; const NONE_FETCH_DATA_DIRECTLY_OPTION = '//*[@class="SimpleInput_customValueWrapper"]//*[@value="None - fetch the data directly"]'; const NOT_A_VALID_SMASH_SERVER_ERROR_MESSAGE_ACTIVATED = '//*[@class="InlineEditingInput_errorMessage" and text()="This URL is not a valid SMASH server"]'; const OFF_CHAIN_METADATA_SERVER_SMASH_LABEL = '//*[contains(text(), "Off-chain metadata server (SMASH)")]'; -const STAKE_POOL_SERVER_DROPDOWN = '//*[@class="SimpleFormField_inputWrapper"]'; -const STAKE_POOL_SERVER_DROPDOWN_CUSTOM_OPTION = '//*[@class="ScrollbarsCustom-Content"]//span[text()="Custom server"]'; const SMASH_SERVER_URL_INPUT_BOX = '//*[@label="SMASH server URL"]'; const STAKE_POOL_CUSTOM_SERVER_INPUT_BOX_SUBMIT_BUTTON = '//*[@class="InlineEditingInput_button InlineEditingInput_okButton SimpleButton_root ButtonOverrides_root"]'; const STAKE_POOL_CUSTOM_SERVER_INPUT_BOX_X_BUTTON = '//*[@class="InlineEditingInput_button InlineEditingInput_cancelButton SimpleButton_root ButtonOverrides_root"]'; +const STAKE_POOL_SERVER_DROPDOWN = '//*[@class="SimpleFormField_inputWrapper"]'; +const STAKE_POOL_SERVER_DROPDOWN_CUSTOM_OPTION = '//*[@class="ScrollbarsCustom-Content"]//span[text()="Custom server"]'; const STAKE_POOLS_SUBMENU_SETTINGS = '//*[@class="SettingsMenu_component"]//button[text()="Stake pools"]'; -const CHANGES_SAVED_SUCCESS_MESSAGE = '//*[@class="StakePoolsSettings_savingResultLabel"]'; When(/^none fetch the data directly is the default option$/, function() { return this.waitAndClick(NONE_FETCH_DATA_DIRECTLY_OPTION); From 7eb533805709ab8b2f6ee9b58cc9399e3088f83c Mon Sep 17 00:00:00 2001 From: Manus McCole Date: Wed, 14 Jul 2021 14:44:33 +0100 Subject: [PATCH 06/37] Correcting lint spelling errors --- .../e2e/features/currency-display-settings.feature | 10 +++++----- tests/settings/e2e/features/stakepool-settings.feature | 8 ++++---- tests/settings/e2e/steps/currency-display-settings.js | 4 ++-- tests/settings/e2e/steps/stakepool-settings.js | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/settings/e2e/features/currency-display-settings.feature b/tests/settings/e2e/features/currency-display-settings.feature index 493ac5807a..effede28df 100644 --- a/tests/settings/e2e/features/currency-display-settings.feature +++ b/tests/settings/e2e/features/currency-display-settings.feature @@ -19,15 +19,15 @@ Feature: Wallet currency display settings | Litecoin | LTC | | Stellar | XLM | - Scenario: User hits toggle button to show/not show ada wallet balance in other currencys + Scenario: User hits toggle button to show/not show ada wallet balance in other currency's Given I am on the General Settings "wallets" screen - When I toggle the button off to change if I want to see my ada balance in other currencys + When I toggle the button off to change if I want to see my ada balance in other currency's Then the currency selection box is hidden And I am on the "Test Wallet" wallet "summary" screen - Then The wallet summary screen does not show ada balance in other currencys placeholder + Then The wallet summary screen does not show ada balance in other currency's placeholder When I am on the General Settings "wallets" screen - And I toggle the button on to change if I want to see my ada balance in other currencys + And I toggle the button on to change if I want to see my ada balance in other currency's When I am on the General Settings "wallets" screen Then the currency selection box is visible And I am on the "Test Wallet" wallet "summary" screen - Then The wallet summary screen does show ada balance in other currencys placeholder + Then The wallet summary screen does show ada balance in other currency's placeholder diff --git a/tests/settings/e2e/features/stakepool-settings.feature b/tests/settings/e2e/features/stakepool-settings.feature index c8cbd9e4f4..c5cdac1c5e 100644 --- a/tests/settings/e2e/features/stakepool-settings.feature +++ b/tests/settings/e2e/features/stakepool-settings.feature @@ -13,13 +13,13 @@ Feature: Stake-pool server settings And The smash server input textBox is visible And I enter custom server "https://smash.cardano-testnet.iohkdev.io/" as the custom server option And I click on Daedalus logo to change focus - And I click the stake-pool custom server inputbox submit button + And I click the stake-pool custom server input box submit button And I see the your changes have been saved success message And I am on the Delegation "stake-pools" screen - Then "https://smash.cardano-testnet.iohkdev.io/" is visible on stakepool screen above stake-pool list and is clickable + Then "https://smash.cardano-testnet.iohkdev.io/" is visible on stake-pool screen above stake-pool list and is clickable And I am brought back to the stake-pool server settings screen - Scenario: Verify stake-pool custom server textbox is visible and error message verification + Scenario: Verify stake-pool custom server text box is visible and error message verification Given I am on the General Settings "stake-pools" screen When I open stake pool server dropdown And I select custom server option @@ -28,5 +28,5 @@ Feature: Stake-pool server settings Then Stake-pool custom input box error message is displayed And I delete values in smash server custom url input box And I enter invalid server "https://www.google.ie" containing https - And I click the stake-pool custom server inputbox submit button + And I click the stake-pool custom server input box submit button Then I see the "This url is not a valid SMASH server" error message displayed diff --git a/tests/settings/e2e/steps/currency-display-settings.js b/tests/settings/e2e/steps/currency-display-settings.js index f3c4ce896b..a35d8c712d 100644 --- a/tests/settings/e2e/steps/currency-display-settings.js +++ b/tests/settings/e2e/steps/currency-display-settings.js @@ -18,7 +18,7 @@ Then(/^I should see "([^"]*)" displayed beside wallet balance$/, function(ticker return this.client.waitForVisible(`//*[@class="WalletSummaryCurrency_currencyRate" and text()="${ticker}"]`); }); -When(/^I toggle the button (on|off) to change if I want to see my ada balance in other currencys$/, function(switchStatus) { +When(/^I toggle the button (on|off) to change if I want to see my ada balance in other currency's$/, function(switchStatus) { let selector = DISPLAY_BALANCE_OTHER_CURRENCYS_TOGGLE_STATUS_ON; if(switchStatus === 'on'){ selector = DISPLAY_BALANCE_OTHER_CURRENCYS_TOGGLE_STATUS_OFF; @@ -34,7 +34,7 @@ Then(/^the currency selection box is (hidden|visible)$/, function(state) { return this.client.waitForVisible(SELECT_CURRENCY_DROPDOWN, null, invisibility); }); -Then(/^The wallet summary screen (does|does not) show ada balance in other currencys placeholder$/, function(switchstatus) { +Then(/^The wallet summary screen (does|does not) show ada balance in other currency's placeholder$/, function(switchstatus) { let invisible = true; if (switchstatus === 'does') { invisible = false; diff --git a/tests/settings/e2e/steps/stakepool-settings.js b/tests/settings/e2e/steps/stakepool-settings.js index 34f5ef0265..349b74a951 100644 --- a/tests/settings/e2e/steps/stakepool-settings.js +++ b/tests/settings/e2e/steps/stakepool-settings.js @@ -27,7 +27,7 @@ When(/^I click on Daedalus logo to change focus$/, function() { return this.waitAndClick(DAEDALUS_TOP_BAR_LOGO); }); -Then(/^"([^"]*)" is visible on stakepool screen above stake-pool list and is clickable$/, function(serverUrl) { +Then(/^"([^"]*)" is visible on stake-pool screen above stake-pool list and is clickable$/, function(serverUrl) { return this.waitAndClick('//*[@class="StakePools_smashSettings"]//span[text()="Moderated by '+ serverUrl + '"]'); }); @@ -67,7 +67,7 @@ When(/^I delete values in smash server custom url input box$/, function() { return this.waitAndClick(STAKE_POOL_CUSTOM_SERVER_INPUT_BOX_X_BUTTON); }); -When(/^I click the stake-pool custom server inputbox submit button$/, function() { +When(/^I click the stake-pool custom server input box submit button$/, function() { return this.waitAndClick(STAKE_POOL_CUSTOM_SERVER_INPUT_BOX_SUBMIT_BUTTON); }); From 77881061a5df0926252738be19bfb919015bacc8 Mon Sep 17 00:00:00 2001 From: Manus McCole Date: Wed, 14 Jul 2021 15:42:46 +0100 Subject: [PATCH 07/37] Added entry to CHANGELOG.md --- CHANGELOG.md | 1 + tests/settings/e2e/features/stakepool-settings.feature | 1 + tests/settings/e2e/steps/stakepool-settings.js | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b6f5eb8139..c172eb96fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ Changelog ### Chores +- Added tests for currency display settings and stake-pool settings screens - Disabled Fund5 voting registration ([PR 2608](https://github.com/input-output-hk/daedalus/pull/2608)) - Updated Fund5 registaration start date ([PR 2607](https://github.com/input-output-hk/daedalus/pull/2607)) - Removed Jormungandr integration and legacy clusters ([PR 2579](https://github.com/input-output-hk/daedalus/pull/2579)) diff --git a/tests/settings/e2e/features/stakepool-settings.feature b/tests/settings/e2e/features/stakepool-settings.feature index c5cdac1c5e..e45fb1ad34 100644 --- a/tests/settings/e2e/features/stakepool-settings.feature +++ b/tests/settings/e2e/features/stakepool-settings.feature @@ -30,3 +30,4 @@ Feature: Stake-pool server settings And I enter invalid server "https://www.google.ie" containing https And I click the stake-pool custom server input box submit button Then I see the "This url is not a valid SMASH server" error message displayed + diff --git a/tests/settings/e2e/steps/stakepool-settings.js b/tests/settings/e2e/steps/stakepool-settings.js index 349b74a951..5cb1fcbd3a 100644 --- a/tests/settings/e2e/steps/stakepool-settings.js +++ b/tests/settings/e2e/steps/stakepool-settings.js @@ -23,7 +23,7 @@ When(/^custom server is the default option$/, function() { }); When(/^I click on Daedalus logo to change focus$/, function() { - // This step was necessary as sometimes if the focus is on text in the textbox the submit button could not recieve the click and i got a "Element is not clickable at point error" + // This step was necessary as when the error message for this box is displayed the submit button could not receive the click and i got a "Element is not clickable at point error" return this.waitAndClick(DAEDALUS_TOP_BAR_LOGO); }); From f822ed57051272b2eb8ceb877355897cafe91815 Mon Sep 17 00:00:00 2001 From: Manus McCole Date: Wed, 14 Jul 2021 15:55:09 +0100 Subject: [PATCH 08/37] Adding an extra feature step to improve code reliability --- tests/settings/e2e/features/stakepool-settings.feature | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/settings/e2e/features/stakepool-settings.feature b/tests/settings/e2e/features/stakepool-settings.feature index e45fb1ad34..91f34572e5 100644 --- a/tests/settings/e2e/features/stakepool-settings.feature +++ b/tests/settings/e2e/features/stakepool-settings.feature @@ -28,6 +28,7 @@ Feature: Stake-pool server settings Then Stake-pool custom input box error message is displayed And I delete values in smash server custom url input box And I enter invalid server "https://www.google.ie" containing https + And I click on Daedalus logo to change focus And I click the stake-pool custom server input box submit button Then I see the "This url is not a valid SMASH server" error message displayed From f26c24d8339481a7df8dbe250239a7b177f82330 Mon Sep 17 00:00:00 2001 From: Manus McCole Date: Wed, 14 Jul 2021 16:33:05 +0100 Subject: [PATCH 09/37] Added link to CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c172eb96fb..75ccbd9bf7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,7 +25,7 @@ Changelog ### Chores -- Added tests for currency display settings and stake-pool settings screens +- Added tests for currency display settings and stake-pool settings screens ([PR](https://github.com/input-output-hk/daedalus/pull/2622/)) - Disabled Fund5 voting registration ([PR 2608](https://github.com/input-output-hk/daedalus/pull/2608)) - Updated Fund5 registaration start date ([PR 2607](https://github.com/input-output-hk/daedalus/pull/2607)) - Removed Jormungandr integration and legacy clusters ([PR 2579](https://github.com/input-output-hk/daedalus/pull/2579)) From 96bb304f9bce5491d5578df3c14a188c5fe9ba22 Mon Sep 17 00:00:00 2001 From: Manus McCole Date: Fri, 16 Jul 2021 17:03:10 +0100 Subject: [PATCH 10/37] Some code review code improvements --- .../e2e/features/currency-display-settings.feature | 1 - .../settings/e2e/steps/currency-display-settings.js | 12 +++--------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/tests/settings/e2e/features/currency-display-settings.feature b/tests/settings/e2e/features/currency-display-settings.feature index effede28df..f6e9c6ded1 100644 --- a/tests/settings/e2e/features/currency-display-settings.feature +++ b/tests/settings/e2e/features/currency-display-settings.feature @@ -27,7 +27,6 @@ Feature: Wallet currency display settings Then The wallet summary screen does not show ada balance in other currency's placeholder When I am on the General Settings "wallets" screen And I toggle the button on to change if I want to see my ada balance in other currency's - When I am on the General Settings "wallets" screen Then the currency selection box is visible And I am on the "Test Wallet" wallet "summary" screen Then The wallet summary screen does show ada balance in other currency's placeholder diff --git a/tests/settings/e2e/steps/currency-display-settings.js b/tests/settings/e2e/steps/currency-display-settings.js index a35d8c712d..090a60d08b 100644 --- a/tests/settings/e2e/steps/currency-display-settings.js +++ b/tests/settings/e2e/steps/currency-display-settings.js @@ -27,17 +27,11 @@ When(/^I toggle the button (on|off) to change if I want to see my ada balance in }); Then(/^the currency selection box is (hidden|visible)$/, function(state) { - let invisibility = false; - if (state === 'hidden') { - invisibility = true; - } + const invisibility:boolean = state !== 'visible' return this.client.waitForVisible(SELECT_CURRENCY_DROPDOWN, null, invisibility); }); -Then(/^The wallet summary screen (does|does not) show ada balance in other currency's placeholder$/, function(switchstatus) { - let invisible = true; - if (switchstatus === 'does') { - invisible = false; - } +Then(/^The wallet summary screen (does|does not) show ada balance in other currency's placeholder$/, function(status) { + const invisible:boolean = status !== 'does' return this.client.waitForVisible(CONVERTED_CURRENCY_WALLET_DISPLAY_GENERAL, null, invisible); }); From c07285e50a5d44c8519f91f4037b9a63dbf47716 Mon Sep 17 00:00:00 2001 From: Manus McCole Date: Mon, 19 Jul 2021 16:07:16 +0100 Subject: [PATCH 11/37] Added PR number to CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 75ccbd9bf7..e50fb23062 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,7 +25,7 @@ Changelog ### Chores -- Added tests for currency display settings and stake-pool settings screens ([PR](https://github.com/input-output-hk/daedalus/pull/2622/)) +- Added tests for currency display settings and stake-pool settings screens ([PR 2622](https://github.com/input-output-hk/daedalus/pull/2622/)) - Disabled Fund5 voting registration ([PR 2608](https://github.com/input-output-hk/daedalus/pull/2608)) - Updated Fund5 registaration start date ([PR 2607](https://github.com/input-output-hk/daedalus/pull/2607)) - Removed Jormungandr integration and legacy clusters ([PR 2579](https://github.com/input-output-hk/daedalus/pull/2579)) From 579f202b29ae27fb363164140647fe4ff6bcf704 Mon Sep 17 00:00:00 2001 From: Manus McCole Date: Mon, 19 Jul 2021 17:16:17 +0100 Subject: [PATCH 12/37] Code review enhancements --- .../e2e/features/currency-display-settings.feature | 2 +- .../e2e/features/stakepool-settings.feature | 8 ++++---- .../e2e/steps/currency-display-settings.js | 11 +++++------ tests/settings/e2e/steps/stakepool-settings.js | 14 ++++---------- 4 files changed, 14 insertions(+), 21 deletions(-) diff --git a/tests/settings/e2e/features/currency-display-settings.feature b/tests/settings/e2e/features/currency-display-settings.feature index f6e9c6ded1..b2c52225c3 100644 --- a/tests/settings/e2e/features/currency-display-settings.feature +++ b/tests/settings/e2e/features/currency-display-settings.feature @@ -1,4 +1,4 @@ -@e2e @watch +@e2e Feature: Wallet currency display settings Background: diff --git a/tests/settings/e2e/features/stakepool-settings.feature b/tests/settings/e2e/features/stakepool-settings.feature index 91f34572e5..8a4fe21c95 100644 --- a/tests/settings/e2e/features/stakepool-settings.feature +++ b/tests/settings/e2e/features/stakepool-settings.feature @@ -1,4 +1,4 @@ -@e2e @watch +@e2e Feature: Stake-pool server settings Background: @@ -12,9 +12,9 @@ Feature: Stake-pool server settings When custom server is the default option And The smash server input textBox is visible And I enter custom server "https://smash.cardano-testnet.iohkdev.io/" as the custom server option - And I click on Daedalus logo to change focus + And I clicked outside of the input-box to change focus And I click the stake-pool custom server input box submit button - And I see the your changes have been saved success message + And I see the "Your changes have been saved" success message And I am on the Delegation "stake-pools" screen Then "https://smash.cardano-testnet.iohkdev.io/" is visible on stake-pool screen above stake-pool list and is clickable And I am brought back to the stake-pool server settings screen @@ -28,7 +28,7 @@ Feature: Stake-pool server settings Then Stake-pool custom input box error message is displayed And I delete values in smash server custom url input box And I enter invalid server "https://www.google.ie" containing https - And I click on Daedalus logo to change focus + And I clicked outside of the input-box to change focus And I click the stake-pool custom server input box submit button Then I see the "This url is not a valid SMASH server" error message displayed diff --git a/tests/settings/e2e/steps/currency-display-settings.js b/tests/settings/e2e/steps/currency-display-settings.js index 090a60d08b..f200af66cc 100644 --- a/tests/settings/e2e/steps/currency-display-settings.js +++ b/tests/settings/e2e/steps/currency-display-settings.js @@ -1,9 +1,8 @@ -// @flow -import { When, Then} from 'cucumber'; +import { When, Then } from 'cucumber'; const CONVERTED_CURRENCY_WALLET_DISPLAY_GENERAL = '//*[@class="WalletSummaryCurrency_currencyRate"]'; -const DISPLAY_BALANCE_OTHER_CURRENCYS_TOGGLE_STATUS_OFF = '//*[@class="SimpleSwitch_switch SwitchOverrides_switch"]'; -const DISPLAY_BALANCE_OTHER_CURRENCYS_TOGGLE_STATUS_ON = '//*[@class="NormalSwitch_component SimpleSwitch_root SwitchOverrides_root SimpleSwitch_checked SwitchOverrides_checked"]'; +const DISPLAY_BALANCE_OTHER_CURRENCY_TOGGLE_STATUS_OFF = '//*[@class="SimpleSwitch_switch SwitchOverrides_switch"]'; +const DISPLAY_BALANCE_OTHER_CURRENCY_TOGGLE_STATUS_ON = '//*[@class="NormalSwitch_component SimpleSwitch_root SwitchOverrides_root SimpleSwitch_checked SwitchOverrides_checked"]'; const SELECT_CURRENCY_DROPDOWN = '//*[@label="Select currency"]'; When(/^I open currency selection dropdown$/, function() { @@ -19,9 +18,9 @@ Then(/^I should see "([^"]*)" displayed beside wallet balance$/, function(ticker }); When(/^I toggle the button (on|off) to change if I want to see my ada balance in other currency's$/, function(switchStatus) { - let selector = DISPLAY_BALANCE_OTHER_CURRENCYS_TOGGLE_STATUS_ON; + let selector = DISPLAY_BALANCE_OTHER_CURRENCY_TOGGLE_STATUS_ON; if(switchStatus === 'on'){ - selector = DISPLAY_BALANCE_OTHER_CURRENCYS_TOGGLE_STATUS_OFF; + selector = DISPLAY_BALANCE_OTHER_CURRENCY_TOGGLE_STATUS_OFF; } return this.waitAndClick(selector); }); diff --git a/tests/settings/e2e/steps/stakepool-settings.js b/tests/settings/e2e/steps/stakepool-settings.js index 5cb1fcbd3a..8c050cdfae 100644 --- a/tests/settings/e2e/steps/stakepool-settings.js +++ b/tests/settings/e2e/steps/stakepool-settings.js @@ -1,10 +1,8 @@ -import { When, Then,} from 'cucumber'; +import { When, Then } from 'cucumber'; -const CHANGES_SAVED_SUCCESS_MESSAGE = '//*[@class="StakePoolsSettings_savingResultLabel"]'; const CUSTOM_SERVER_DROPDOWN_OPTION = '//*[@class="SimpleInput_customValueWrapper"]//*[@value="Custom server"]'; const DAEDALUS_TOP_BAR_LOGO = '//*[@class="TopBar_topBar TopBar_withoutWallet"]'; const IS_ERROR_MESSAGE_ACTIVATED = '//*[@class="SimpleInput_input SimpleInput_errored"]'; -const NONE_FETCH_DATA_DIRECTLY_OPTION = '//*[@class="SimpleInput_customValueWrapper"]//*[@value="None - fetch the data directly"]'; const NOT_A_VALID_SMASH_SERVER_ERROR_MESSAGE_ACTIVATED = '//*[@class="InlineEditingInput_errorMessage" and text()="This URL is not a valid SMASH server"]'; const OFF_CHAIN_METADATA_SERVER_SMASH_LABEL = '//*[contains(text(), "Off-chain metadata server (SMASH)")]'; const SMASH_SERVER_URL_INPUT_BOX = '//*[@label="SMASH server URL"]'; @@ -14,15 +12,11 @@ const STAKE_POOL_SERVER_DROPDOWN = '//*[@class="SimpleFormField_inputWrapper"]'; const STAKE_POOL_SERVER_DROPDOWN_CUSTOM_OPTION = '//*[@class="ScrollbarsCustom-Content"]//span[text()="Custom server"]'; const STAKE_POOLS_SUBMENU_SETTINGS = '//*[@class="SettingsMenu_component"]//button[text()="Stake pools"]'; -When(/^none fetch the data directly is the default option$/, function() { - return this.waitAndClick(NONE_FETCH_DATA_DIRECTLY_OPTION); -}); - When(/^custom server is the default option$/, function() { return this.waitAndClick(CUSTOM_SERVER_DROPDOWN_OPTION); }); -When(/^I click on Daedalus logo to change focus$/, function() { +When(/^I clicked outside of the input-box to change focus$/, function() { // This step was necessary as when the error message for this box is displayed the submit button could not receive the click and i got a "Element is not clickable at point error" return this.waitAndClick(DAEDALUS_TOP_BAR_LOGO); }); @@ -79,6 +73,6 @@ When(/^I click on stakepool subtab$/, function() { return this.waitAndClick(STAKE_POOLS_SUBMENU_SETTINGS); }); -Then(/^I see the your changes have been saved success message$/, function() { - return this.client.waitForVisible(CHANGES_SAVED_SUCCESS_MESSAGE); +Then(/^I see the "([^"]*)" success message$/, function(message) { + return this.client.waitForVisible('//*[@class="StakePoolsSettings_savingResultLabel" and text()="'+ message + '"]'); }); From fe946ab783f8998dc374775b0dce4ccf786bd7e6 Mon Sep 17 00:00:00 2001 From: Manus McCole Date: Thu, 22 Jul 2021 11:12:30 +0100 Subject: [PATCH 13/37] Added new custom error messages "The url should start with" and "protocol and hostname" --- tests/settings/e2e/features/stakepool-settings.feature | 8 +++++--- tests/settings/e2e/steps/stakepool-settings.js | 6 +++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/settings/e2e/features/stakepool-settings.feature b/tests/settings/e2e/features/stakepool-settings.feature index 8a4fe21c95..5957d58f21 100644 --- a/tests/settings/e2e/features/stakepool-settings.feature +++ b/tests/settings/e2e/features/stakepool-settings.feature @@ -24,11 +24,13 @@ Feature: Stake-pool server settings When I open stake pool server dropdown And I select custom server option Then The smash server input textBox is visible - And I enter invalid url "www.test" without https - Then Stake-pool custom input box error message is displayed + And I enter invalid url "www.test" in to the custom server input-box + Then Stake-pool custom input box error message "The URL should start with" is displayed + And I delete values in smash server custom url input box + And I enter invalid url "https://test.com/path" in to the custom server input-box + Then Stake-pool custom input box error message "protocol and hostname" is displayed And I delete values in smash server custom url input box And I enter invalid server "https://www.google.ie" containing https And I clicked outside of the input-box to change focus And I click the stake-pool custom server input box submit button Then I see the "This url is not a valid SMASH server" error message displayed - diff --git a/tests/settings/e2e/steps/stakepool-settings.js b/tests/settings/e2e/steps/stakepool-settings.js index 8c050cdfae..002b637f66 100644 --- a/tests/settings/e2e/steps/stakepool-settings.js +++ b/tests/settings/e2e/steps/stakepool-settings.js @@ -45,12 +45,12 @@ When(/^I enter custom server "([^"]*)" as the custom server option$/, function(c this.client.setValue(SMASH_SERVER_URL_INPUT_BOX, customServer); }); -When(/^I enter invalid url "([^"]*)" without https$/, function(invalidUrl) { +When(/^I enter invalid url "([^"]*)" in to the custom server input-box$/, function(invalidUrl) { this.client.setValue(SMASH_SERVER_URL_INPUT_BOX, invalidUrl); }); -Then(/^Stake-pool custom input box error message is displayed$/, function() { - return this.client.waitForVisible(IS_ERROR_MESSAGE_ACTIVATED); +Then(/^Stake-pool custom input box error message "([^"]*)" is displayed$/, function(message) { + return this.client.waitForVisible('//div[contains(text(), "'+ message +'")]'); }); When(/^I enter invalid server "([^"]*)" containing https$/, function(value) { From 14214a2a4096811fac047474d32f1f72c0642b44 Mon Sep 17 00:00:00 2001 From: Manus McCole Date: Thu, 22 Jul 2021 11:25:27 +0100 Subject: [PATCH 14/37] Resaving changes --- tests/settings/e2e/features/stakepool-settings.feature | 2 +- tests/settings/e2e/steps/stakepool-settings.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/settings/e2e/features/stakepool-settings.feature b/tests/settings/e2e/features/stakepool-settings.feature index 5957d58f21..06c3e408c0 100644 --- a/tests/settings/e2e/features/stakepool-settings.feature +++ b/tests/settings/e2e/features/stakepool-settings.feature @@ -11,7 +11,7 @@ Feature: Stake-pool server settings Given I am on the General Settings "stake-pools" screen When custom server is the default option And The smash server input textBox is visible - And I enter custom server "https://smash.cardano-testnet.iohkdev.io/" as the custom server option + And And I enter a custom server URL as custom server option And I clicked outside of the input-box to change focus And I click the stake-pool custom server input box submit button And I see the "Your changes have been saved" success message diff --git a/tests/settings/e2e/steps/stakepool-settings.js b/tests/settings/e2e/steps/stakepool-settings.js index 002b637f66..3c30017a13 100644 --- a/tests/settings/e2e/steps/stakepool-settings.js +++ b/tests/settings/e2e/steps/stakepool-settings.js @@ -41,8 +41,9 @@ Then(/^The smash server input textBox is visible$/, function() { return this.client.waitForVisible(SMASH_SERVER_URL_INPUT_BOX); }); -When(/^I enter custom server "([^"]*)" as the custom server option$/, function(customServer) { - this.client.setValue(SMASH_SERVER_URL_INPUT_BOX, customServer); +When(/^And I enter a custom server URL as custom server option$/, function() { + const server = "https://smash.cardano-testnet.iohkdev.io/" + this.client.setValue(SMASH_SERVER_URL_INPUT_BOX, server); }); When(/^I enter invalid url "([^"]*)" in to the custom server input-box$/, function(invalidUrl) { From 9ba9b73c218296a365aeedfeb2efee5309ea0088 Mon Sep 17 00:00:00 2001 From: Manus McCole Date: Fri, 23 Jul 2021 12:36:59 +0100 Subject: [PATCH 15/37] Added template literals for all embedded expressions --- .../e2e/features/currency-display-settings.feature | 2 +- tests/settings/e2e/features/stakepool-settings.feature | 4 ++-- tests/settings/e2e/steps/stakepool-settings.js | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/settings/e2e/features/currency-display-settings.feature b/tests/settings/e2e/features/currency-display-settings.feature index b2c52225c3..f6e9c6ded1 100644 --- a/tests/settings/e2e/features/currency-display-settings.feature +++ b/tests/settings/e2e/features/currency-display-settings.feature @@ -1,4 +1,4 @@ -@e2e +@e2e @watch Feature: Wallet currency display settings Background: diff --git a/tests/settings/e2e/features/stakepool-settings.feature b/tests/settings/e2e/features/stakepool-settings.feature index 06c3e408c0..c84a305021 100644 --- a/tests/settings/e2e/features/stakepool-settings.feature +++ b/tests/settings/e2e/features/stakepool-settings.feature @@ -1,4 +1,4 @@ -@e2e +@e2e @watch Feature: Stake-pool server settings Background: @@ -16,7 +16,7 @@ Feature: Stake-pool server settings And I click the stake-pool custom server input box submit button And I see the "Your changes have been saved" success message And I am on the Delegation "stake-pools" screen - Then "https://smash.cardano-testnet.iohkdev.io/" is visible on stake-pool screen above stake-pool list and is clickable + Then The custom server I chose earlier is visible on stake-pool screen above stake-pool list and is clickable And I am brought back to the stake-pool server settings screen Scenario: Verify stake-pool custom server text box is visible and error message verification diff --git a/tests/settings/e2e/steps/stakepool-settings.js b/tests/settings/e2e/steps/stakepool-settings.js index 3c30017a13..fcae3a102c 100644 --- a/tests/settings/e2e/steps/stakepool-settings.js +++ b/tests/settings/e2e/steps/stakepool-settings.js @@ -2,7 +2,6 @@ import { When, Then } from 'cucumber'; const CUSTOM_SERVER_DROPDOWN_OPTION = '//*[@class="SimpleInput_customValueWrapper"]//*[@value="Custom server"]'; const DAEDALUS_TOP_BAR_LOGO = '//*[@class="TopBar_topBar TopBar_withoutWallet"]'; -const IS_ERROR_MESSAGE_ACTIVATED = '//*[@class="SimpleInput_input SimpleInput_errored"]'; const NOT_A_VALID_SMASH_SERVER_ERROR_MESSAGE_ACTIVATED = '//*[@class="InlineEditingInput_errorMessage" and text()="This URL is not a valid SMASH server"]'; const OFF_CHAIN_METADATA_SERVER_SMASH_LABEL = '//*[contains(text(), "Off-chain metadata server (SMASH)")]'; const SMASH_SERVER_URL_INPUT_BOX = '//*[@label="SMASH server URL"]'; @@ -21,8 +20,9 @@ When(/^I clicked outside of the input-box to change focus$/, function() { return this.waitAndClick(DAEDALUS_TOP_BAR_LOGO); }); -Then(/^"([^"]*)" is visible on stake-pool screen above stake-pool list and is clickable$/, function(serverUrl) { - return this.waitAndClick('//*[@class="StakePools_smashSettings"]//span[text()="Moderated by '+ serverUrl + '"]'); +Then(/^The custom server I chose earlier is visible on stake-pool screen above stake-pool list and is clickable$/, function() { + const serverUrl = "https://smash.cardano-testnet.iohkdev.io/"; + return this.waitAndClick(`//*[@class="StakePools_smashSettings"]//span[text()="Moderated by ${serverUrl}"]`); }); Then(/^I am brought back to the stake-pool server settings screen$/, function() { @@ -51,7 +51,7 @@ When(/^I enter invalid url "([^"]*)" in to the custom server input-box$/, functi }); Then(/^Stake-pool custom input box error message "([^"]*)" is displayed$/, function(message) { - return this.client.waitForVisible('//div[contains(text(), "'+ message +'")]'); + return this.client.waitForVisible(`//div[contains(text(), "${message}")]`); }); When(/^I enter invalid server "([^"]*)" containing https$/, function(value) { @@ -75,5 +75,5 @@ When(/^I click on stakepool subtab$/, function() { }); Then(/^I see the "([^"]*)" success message$/, function(message) { - return this.client.waitForVisible('//*[@class="StakePoolsSettings_savingResultLabel" and text()="'+ message + '"]'); + return this.client.waitForVisible(`//*[@class="StakePoolsSettings_savingResultLabel" and text()="${message}"]`); }); From e4296276def0cf729dd04952f65f1b9b6523a1f9 Mon Sep 17 00:00:00 2001 From: Manus McCole Date: Fri, 23 Jul 2021 12:41:20 +0100 Subject: [PATCH 16/37] Removed @watch annotation --- tests/settings/e2e/features/currency-display-settings.feature | 2 +- tests/settings/e2e/features/stakepool-settings.feature | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/settings/e2e/features/currency-display-settings.feature b/tests/settings/e2e/features/currency-display-settings.feature index f6e9c6ded1..b2c52225c3 100644 --- a/tests/settings/e2e/features/currency-display-settings.feature +++ b/tests/settings/e2e/features/currency-display-settings.feature @@ -1,4 +1,4 @@ -@e2e @watch +@e2e Feature: Wallet currency display settings Background: diff --git a/tests/settings/e2e/features/stakepool-settings.feature b/tests/settings/e2e/features/stakepool-settings.feature index c84a305021..daef31e4db 100644 --- a/tests/settings/e2e/features/stakepool-settings.feature +++ b/tests/settings/e2e/features/stakepool-settings.feature @@ -1,4 +1,4 @@ -@e2e @watch +@e2e Feature: Stake-pool server settings Background: From daf2d098223ba89a8e9253375e3ed0120f83347b Mon Sep 17 00:00:00 2001 From: Manus McCole Date: Thu, 29 Jul 2021 14:34:59 +0100 Subject: [PATCH 17/37] Minor code improvements Your branch is up to date with 'origin/chore/manus-automation'. --- tests/settings/e2e/features/currency-display-settings.feature | 2 +- tests/settings/e2e/features/stakepool-settings.feature | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/settings/e2e/features/currency-display-settings.feature b/tests/settings/e2e/features/currency-display-settings.feature index b2c52225c3..f6e9c6ded1 100644 --- a/tests/settings/e2e/features/currency-display-settings.feature +++ b/tests/settings/e2e/features/currency-display-settings.feature @@ -1,4 +1,4 @@ -@e2e +@e2e @watch Feature: Wallet currency display settings Background: diff --git a/tests/settings/e2e/features/stakepool-settings.feature b/tests/settings/e2e/features/stakepool-settings.feature index daef31e4db..eed41d13e2 100644 --- a/tests/settings/e2e/features/stakepool-settings.feature +++ b/tests/settings/e2e/features/stakepool-settings.feature @@ -1,4 +1,4 @@ -@e2e +@e2e @watch Feature: Stake-pool server settings Background: @@ -25,7 +25,7 @@ Feature: Stake-pool server settings And I select custom server option Then The smash server input textBox is visible And I enter invalid url "www.test" in to the custom server input-box - Then Stake-pool custom input box error message "The URL should start with" is displayed + Then Stake-pool custom input box error message "https://" is displayed And I delete values in smash server custom url input box And I enter invalid url "https://test.com/path" in to the custom server input-box Then Stake-pool custom input box error message "protocol and hostname" is displayed From 3f3adc18883de4108cfda712830e38eb272e1c90 Mon Sep 17 00:00:00 2001 From: Manus McCole Date: Wed, 4 Aug 2021 11:06:50 +0100 Subject: [PATCH 18/37] Adding ternary operators --- __tests__/numbers.specs.js | 0 tests/settings/e2e/steps/currency-display-settings.js | 7 +++---- 2 files changed, 3 insertions(+), 4 deletions(-) create mode 100644 __tests__/numbers.specs.js diff --git a/__tests__/numbers.specs.js b/__tests__/numbers.specs.js new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/settings/e2e/steps/currency-display-settings.js b/tests/settings/e2e/steps/currency-display-settings.js index f200af66cc..2e1717747d 100644 --- a/tests/settings/e2e/steps/currency-display-settings.js +++ b/tests/settings/e2e/steps/currency-display-settings.js @@ -18,10 +18,9 @@ Then(/^I should see "([^"]*)" displayed beside wallet balance$/, function(ticker }); When(/^I toggle the button (on|off) to change if I want to see my ada balance in other currency's$/, function(switchStatus) { - let selector = DISPLAY_BALANCE_OTHER_CURRENCY_TOGGLE_STATUS_ON; - if(switchStatus === 'on'){ - selector = DISPLAY_BALANCE_OTHER_CURRENCY_TOGGLE_STATUS_OFF; - } + const selector = switchStatus === 'on' + ? DISPLAY_BALANCE_OTHER_CURRENCY_TOGGLE_STATUS_OFF + : DISPLAY_BALANCE_OTHER_CURRENCY_TOGGLE_STATUS_ON; return this.waitAndClick(selector); }); From c880921f0a93b6fea3fd598fe79ac9b65e615598 Mon Sep 17 00:00:00 2001 From: Manus McCole Date: Wed, 4 Aug 2021 13:27:19 +0100 Subject: [PATCH 19/37] Removed Watch Flags --- tests/settings/e2e/features/currency-display-settings.feature | 2 +- tests/settings/e2e/features/stakepool-settings.feature | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/settings/e2e/features/currency-display-settings.feature b/tests/settings/e2e/features/currency-display-settings.feature index f6e9c6ded1..b2c52225c3 100644 --- a/tests/settings/e2e/features/currency-display-settings.feature +++ b/tests/settings/e2e/features/currency-display-settings.feature @@ -1,4 +1,4 @@ -@e2e @watch +@e2e Feature: Wallet currency display settings Background: diff --git a/tests/settings/e2e/features/stakepool-settings.feature b/tests/settings/e2e/features/stakepool-settings.feature index eed41d13e2..8343ba5875 100644 --- a/tests/settings/e2e/features/stakepool-settings.feature +++ b/tests/settings/e2e/features/stakepool-settings.feature @@ -1,4 +1,4 @@ -@e2e @watch +@e2e Feature: Stake-pool server settings Background: From 2a678aeca3127ee14d022810a7e89edc783ede4f Mon Sep 17 00:00:00 2001 From: Manus McCole Date: Wed, 4 Aug 2021 13:34:44 +0100 Subject: [PATCH 20/37] Created constant SERVER_URL --- tests/settings/e2e/steps/stakepool-settings.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/settings/e2e/steps/stakepool-settings.js b/tests/settings/e2e/steps/stakepool-settings.js index fcae3a102c..676e3537b1 100644 --- a/tests/settings/e2e/steps/stakepool-settings.js +++ b/tests/settings/e2e/steps/stakepool-settings.js @@ -4,6 +4,7 @@ const CUSTOM_SERVER_DROPDOWN_OPTION = '//*[@class="SimpleInput_customValueWrappe const DAEDALUS_TOP_BAR_LOGO = '//*[@class="TopBar_topBar TopBar_withoutWallet"]'; const NOT_A_VALID_SMASH_SERVER_ERROR_MESSAGE_ACTIVATED = '//*[@class="InlineEditingInput_errorMessage" and text()="This URL is not a valid SMASH server"]'; const OFF_CHAIN_METADATA_SERVER_SMASH_LABEL = '//*[contains(text(), "Off-chain metadata server (SMASH)")]'; +const SERVER_URL = "https://smash.cardano-testnet.iohkdev.io/"; const SMASH_SERVER_URL_INPUT_BOX = '//*[@label="SMASH server URL"]'; const STAKE_POOL_CUSTOM_SERVER_INPUT_BOX_SUBMIT_BUTTON = '//*[@class="InlineEditingInput_button InlineEditingInput_okButton SimpleButton_root ButtonOverrides_root"]'; const STAKE_POOL_CUSTOM_SERVER_INPUT_BOX_X_BUTTON = '//*[@class="InlineEditingInput_button InlineEditingInput_cancelButton SimpleButton_root ButtonOverrides_root"]'; @@ -21,8 +22,7 @@ When(/^I clicked outside of the input-box to change focus$/, function() { }); Then(/^The custom server I chose earlier is visible on stake-pool screen above stake-pool list and is clickable$/, function() { - const serverUrl = "https://smash.cardano-testnet.iohkdev.io/"; - return this.waitAndClick(`//*[@class="StakePools_smashSettings"]//span[text()="Moderated by ${serverUrl}"]`); + return this.waitAndClick(`//*[@class="StakePools_smashSettings"]//span[text()="Moderated by ${SERVER_URL}"]`); }); Then(/^I am brought back to the stake-pool server settings screen$/, function() { @@ -42,8 +42,7 @@ Then(/^The smash server input textBox is visible$/, function() { }); When(/^And I enter a custom server URL as custom server option$/, function() { - const server = "https://smash.cardano-testnet.iohkdev.io/" - this.client.setValue(SMASH_SERVER_URL_INPUT_BOX, server); + this.client.setValue(SMASH_SERVER_URL_INPUT_BOX, SERVER_URL); }); When(/^I enter invalid url "([^"]*)" in to the custom server input-box$/, function(invalidUrl) { From 00fce2a5102b8605f2f87ae8e8bae73300c8c775 Mon Sep 17 00:00:00 2001 From: Manus McCole Date: Wed, 4 Aug 2021 14:26:24 +0100 Subject: [PATCH 21/37] Removed step I clicked outside of the input-box to change focus --- tests/settings/e2e/features/stakepool-settings.feature | 3 +-- tests/settings/e2e/steps/stakepool-settings.js | 9 +++------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/tests/settings/e2e/features/stakepool-settings.feature b/tests/settings/e2e/features/stakepool-settings.feature index 8343ba5875..7b4a596692 100644 --- a/tests/settings/e2e/features/stakepool-settings.feature +++ b/tests/settings/e2e/features/stakepool-settings.feature @@ -31,6 +31,5 @@ Feature: Stake-pool server settings Then Stake-pool custom input box error message "protocol and hostname" is displayed And I delete values in smash server custom url input box And I enter invalid server "https://www.google.ie" containing https - And I clicked outside of the input-box to change focus - And I click the stake-pool custom server input box submit button + And I focus the stake-pool custom server input box submit button and then click it Then I see the "This url is not a valid SMASH server" error message displayed diff --git a/tests/settings/e2e/steps/stakepool-settings.js b/tests/settings/e2e/steps/stakepool-settings.js index 676e3537b1..0823280863 100644 --- a/tests/settings/e2e/steps/stakepool-settings.js +++ b/tests/settings/e2e/steps/stakepool-settings.js @@ -16,11 +16,6 @@ When(/^custom server is the default option$/, function() { return this.waitAndClick(CUSTOM_SERVER_DROPDOWN_OPTION); }); -When(/^I clicked outside of the input-box to change focus$/, function() { - // This step was necessary as when the error message for this box is displayed the submit button could not receive the click and i got a "Element is not clickable at point error" - return this.waitAndClick(DAEDALUS_TOP_BAR_LOGO); -}); - Then(/^The custom server I chose earlier is visible on stake-pool screen above stake-pool list and is clickable$/, function() { return this.waitAndClick(`//*[@class="StakePools_smashSettings"]//span[text()="Moderated by ${SERVER_URL}"]`); }); @@ -61,7 +56,9 @@ When(/^I delete values in smash server custom url input box$/, function() { return this.waitAndClick(STAKE_POOL_CUSTOM_SERVER_INPUT_BOX_X_BUTTON); }); -When(/^I click the stake-pool custom server input box submit button$/, function() { +When(/^I focus the stake-pool custom server input box submit button and then click it$/, function() { + // This step is necessary as otherwise the error message receives the click + this.client.waitAndClick(DAEDALUS_TOP_BAR_LOGO); return this.waitAndClick(STAKE_POOL_CUSTOM_SERVER_INPUT_BOX_SUBMIT_BUTTON); }); From 3501c5aa567633bc5c2759b1ce05f78338fae20d Mon Sep 17 00:00:00 2001 From: Manus McCole Date: Thu, 5 Aug 2021 16:08:03 +0100 Subject: [PATCH 22/37] Updating stakepool-settings.feature --- tests/settings/e2e/features/stakepool-settings.feature | 3 +-- tests/settings/e2e/steps/stakepool-settings.js | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/settings/e2e/features/stakepool-settings.feature b/tests/settings/e2e/features/stakepool-settings.feature index 7b4a596692..80796824ac 100644 --- a/tests/settings/e2e/features/stakepool-settings.feature +++ b/tests/settings/e2e/features/stakepool-settings.feature @@ -12,8 +12,7 @@ Feature: Stake-pool server settings When custom server is the default option And The smash server input textBox is visible And And I enter a custom server URL as custom server option - And I clicked outside of the input-box to change focus - And I click the stake-pool custom server input box submit button + And I focus the stake-pool custom server input box submit button and then click it And I see the "Your changes have been saved" success message And I am on the Delegation "stake-pools" screen Then The custom server I chose earlier is visible on stake-pool screen above stake-pool list and is clickable diff --git a/tests/settings/e2e/steps/stakepool-settings.js b/tests/settings/e2e/steps/stakepool-settings.js index 0823280863..c63134f5b9 100644 --- a/tests/settings/e2e/steps/stakepool-settings.js +++ b/tests/settings/e2e/steps/stakepool-settings.js @@ -58,7 +58,7 @@ When(/^I delete values in smash server custom url input box$/, function() { When(/^I focus the stake-pool custom server input box submit button and then click it$/, function() { // This step is necessary as otherwise the error message receives the click - this.client.waitAndClick(DAEDALUS_TOP_BAR_LOGO); + this.waitAndClick(DAEDALUS_TOP_BAR_LOGO); return this.waitAndClick(STAKE_POOL_CUSTOM_SERVER_INPUT_BOX_SUBMIT_BUTTON); }); From 0f68d01aefcd60c8226e70f8b0be217e14edd9e9 Mon Sep 17 00:00:00 2001 From: Manus McCole Date: Thu, 5 Aug 2021 16:40:36 +0100 Subject: [PATCH 23/37] Code improvements --- tests/settings/e2e/steps/currency-display-settings.js | 5 +++-- tests/settings/e2e/steps/stakepool-settings.js | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/settings/e2e/steps/currency-display-settings.js b/tests/settings/e2e/steps/currency-display-settings.js index 2e1717747d..0e05b71132 100644 --- a/tests/settings/e2e/steps/currency-display-settings.js +++ b/tests/settings/e2e/steps/currency-display-settings.js @@ -1,3 +1,4 @@ +// @flow import { When, Then } from 'cucumber'; const CONVERTED_CURRENCY_WALLET_DISPLAY_GENERAL = '//*[@class="WalletSummaryCurrency_currencyRate"]'; @@ -6,11 +7,11 @@ const DISPLAY_BALANCE_OTHER_CURRENCY_TOGGLE_STATUS_ON = '//*[@class="NormalSwitc const SELECT_CURRENCY_DROPDOWN = '//*[@label="Select currency"]'; When(/^I open currency selection dropdown$/, function() { - return this.waitAndClick(SELECT_CURRENCY_DROPDOWN); + return this.client.click(SELECT_CURRENCY_DROPDOWN); }); When(/^I select "([^"]*)" as the selected displayed currency$/, function(currency) { - return this.waitAndClick(`//*[contains(text(), "${currency}")]`); + return this.client.click(`//*[contains(text(), "${currency}")]`); }); Then(/^I should see "([^"]*)" displayed beside wallet balance$/, function(ticker) { diff --git a/tests/settings/e2e/steps/stakepool-settings.js b/tests/settings/e2e/steps/stakepool-settings.js index c63134f5b9..3e028efa7f 100644 --- a/tests/settings/e2e/steps/stakepool-settings.js +++ b/tests/settings/e2e/steps/stakepool-settings.js @@ -56,9 +56,9 @@ When(/^I delete values in smash server custom url input box$/, function() { return this.waitAndClick(STAKE_POOL_CUSTOM_SERVER_INPUT_BOX_X_BUTTON); }); -When(/^I focus the stake-pool custom server input box submit button and then click it$/, function() { +When(/^I focus the stake-pool custom server input box submit button and then click it$/, async function() { // This step is necessary as otherwise the error message receives the click - this.waitAndClick(DAEDALUS_TOP_BAR_LOGO); + await this.waitAndClick(DAEDALUS_TOP_BAR_LOGO); return this.waitAndClick(STAKE_POOL_CUSTOM_SERVER_INPUT_BOX_SUBMIT_BUTTON); }); From f3df74310c073dd4c5a91628f43144769ab64135 Mon Sep 17 00:00:00 2001 From: Manus McCole Date: Mon, 16 Aug 2021 10:50:01 +0100 Subject: [PATCH 24/37] Updated CHANGELOG.MD entry to vNext category --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a06ee6d82d..851fe7b60b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ Changelog ### Chores - Removed "Decentralization countdown" tada icon and info tab ([PR 2625](https://github.com/input-output-hk/daedalus/pull/2625)) +- Added tests for currency display settings and stake-pool settings screens ([PR 2622](https://github.com/input-output-hk/daedalus/pull/2622)) ## 4.2.0 @@ -40,7 +41,6 @@ Changelog ### Chores -- Added tests for currency display settings and stake-pool settings screens ([PR 2622](https://github.com/input-output-hk/daedalus/pull/2622/)) - Disabled Fund5 voting registration ([PR 2608](https://github.com/input-output-hk/daedalus/pull/2608)) - Updated Fund5 registaration start date ([PR 2607](https://github.com/input-output-hk/daedalus/pull/2607)) - Removed Jormungandr integration and legacy clusters ([PR 2579](https://github.com/input-output-hk/daedalus/pull/2579)) From e30e36fe7e976fc411edc668e3dc0640a95dcea1 Mon Sep 17 00:00:00 2001 From: Manus McCole Date: Mon, 16 Aug 2021 11:40:21 +0100 Subject: [PATCH 25/37] Deleted file __tests__/numbers.specs.js --- __tests__/numbers.specs.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 __tests__/numbers.specs.js diff --git a/__tests__/numbers.specs.js b/__tests__/numbers.specs.js deleted file mode 100644 index e69de29bb2..0000000000 From 6284b6cd12387c6a3b7f2c9e6df043dfe76ac92b Mon Sep 17 00:00:00 2001 From: Nikola Glumac Date: Mon, 23 Aug 2021 10:54:03 +0200 Subject: [PATCH 26/37] Reorder CHANGELOG --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 419e268741..d02920faa6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,10 +15,10 @@ Changelog ### Chores +- Added tests for currency display settings and stake-pool settings screens ([PR 2622](https://github.com/input-output-hk/daedalus/pull/2622)) - Updated `cardano-wallet` to version `2021-08-11` which includes `cardano-node` alonzo-purple-1.0.1 ([PR 2641](https://github.com/input-output-hk/daedalus/pull/2641)) - Updated `cardano-wallet` to version `2021-07-30` which includes `cardano-node` 1.28.0 ([PR 2635](https://github.com/input-output-hk/daedalus/pull/2635), [PR 2638](https://github.com/input-output-hk/daedalus/pull/2638)) - Removed "Decentralization countdown" tada icon and info tab ([PR 2625](https://github.com/input-output-hk/daedalus/pull/2625)) -- Added tests for currency display settings and stake-pool settings screens ([PR 2622](https://github.com/input-output-hk/daedalus/pull/2622)) ## 4.2.1 From e1b67fbbedaf22f9c586ad074406ae7eca4471d1 Mon Sep 17 00:00:00 2001 From: Manus McCole Date: Tue, 24 Aug 2021 16:00:58 +0100 Subject: [PATCH 27/37] Importing Daedalus text and labels from file en-US.json --- .../currency-display-settings.feature | 2 +- .../e2e/features/stakepool-settings.feature | 2 +- .../e2e/steps/currency-display-settings.js | 5 ++++- .../settings/e2e/steps/stakepool-settings.js | 19 +++++++++++++------ 4 files changed, 19 insertions(+), 9 deletions(-) diff --git a/tests/settings/e2e/features/currency-display-settings.feature b/tests/settings/e2e/features/currency-display-settings.feature index b2c52225c3..f6e9c6ded1 100644 --- a/tests/settings/e2e/features/currency-display-settings.feature +++ b/tests/settings/e2e/features/currency-display-settings.feature @@ -1,4 +1,4 @@ -@e2e +@e2e @watch Feature: Wallet currency display settings Background: diff --git a/tests/settings/e2e/features/stakepool-settings.feature b/tests/settings/e2e/features/stakepool-settings.feature index 80796824ac..12fedb443a 100644 --- a/tests/settings/e2e/features/stakepool-settings.feature +++ b/tests/settings/e2e/features/stakepool-settings.feature @@ -1,4 +1,4 @@ -@e2e +@e2e @watch Feature: Stake-pool server settings Background: diff --git a/tests/settings/e2e/steps/currency-display-settings.js b/tests/settings/e2e/steps/currency-display-settings.js index 0e05b71132..a5cd52a811 100644 --- a/tests/settings/e2e/steps/currency-display-settings.js +++ b/tests/settings/e2e/steps/currency-display-settings.js @@ -1,10 +1,13 @@ // @flow import { When, Then } from 'cucumber'; +import en from '../../../../source/renderer/app/i18n/locales/en-US.json'; + +const SELECT_CURRENCY_TEXT = en['settings.wallets.currency.selectLabel']; const CONVERTED_CURRENCY_WALLET_DISPLAY_GENERAL = '//*[@class="WalletSummaryCurrency_currencyRate"]'; const DISPLAY_BALANCE_OTHER_CURRENCY_TOGGLE_STATUS_OFF = '//*[@class="SimpleSwitch_switch SwitchOverrides_switch"]'; const DISPLAY_BALANCE_OTHER_CURRENCY_TOGGLE_STATUS_ON = '//*[@class="NormalSwitch_component SimpleSwitch_root SwitchOverrides_root SimpleSwitch_checked SwitchOverrides_checked"]'; -const SELECT_CURRENCY_DROPDOWN = '//*[@label="Select currency"]'; +const SELECT_CURRENCY_DROPDOWN = `//*[@label="${SELECT_CURRENCY_TEXT}"]`; When(/^I open currency selection dropdown$/, function() { return this.client.click(SELECT_CURRENCY_DROPDOWN); diff --git a/tests/settings/e2e/steps/stakepool-settings.js b/tests/settings/e2e/steps/stakepool-settings.js index 3e028efa7f..e180dadcbe 100644 --- a/tests/settings/e2e/steps/stakepool-settings.js +++ b/tests/settings/e2e/steps/stakepool-settings.js @@ -1,16 +1,23 @@ import { When, Then } from 'cucumber'; +import en from '../../../../source/renderer/app/i18n/locales/en-US.json'; -const CUSTOM_SERVER_DROPDOWN_OPTION = '//*[@class="SimpleInput_customValueWrapper"]//*[@value="Custom server"]'; +const CUSTOM_SERVER_TEXT = en['settings.stakePools.smash.select.customServer']; +const INVALID_SMASH_SERVER_TEXT = en['api.errors.invalidSmashServer']; +const OFF_CHAIN_METADATA_SERVER_TEXT = en['settings.stakePools.smash.select.label']; +const SMASH_SERVER_URL_TEXT = en['settings.stakePools.smashUrl.input.label']; +const STAKE_POOL_TEXT = en['settings.menu.stakePools.link.label']; + +const CUSTOM_SERVER_DROPDOWN_OPTION = `//*[@class="SimpleInput_customValueWrapper"]//*[@value="${CUSTOM_SERVER_TEXT}"]`; const DAEDALUS_TOP_BAR_LOGO = '//*[@class="TopBar_topBar TopBar_withoutWallet"]'; -const NOT_A_VALID_SMASH_SERVER_ERROR_MESSAGE_ACTIVATED = '//*[@class="InlineEditingInput_errorMessage" and text()="This URL is not a valid SMASH server"]'; -const OFF_CHAIN_METADATA_SERVER_SMASH_LABEL = '//*[contains(text(), "Off-chain metadata server (SMASH)")]'; +const NOT_A_VALID_SMASH_SERVER_ERROR_MESSAGE_ACTIVATED = `//*[@class="InlineEditingInput_errorMessage" and text()="${INVALID_SMASH_SERVER_TEXT}"]`; +const OFF_CHAIN_METADATA_SERVER_SMASH_LABEL = `//*[contains(text(), "${OFF_CHAIN_METADATA_SERVER_TEXT}")]`; const SERVER_URL = "https://smash.cardano-testnet.iohkdev.io/"; -const SMASH_SERVER_URL_INPUT_BOX = '//*[@label="SMASH server URL"]'; +const SMASH_SERVER_URL_INPUT_BOX = `//*[@label="${SMASH_SERVER_URL_TEXT}"]`; const STAKE_POOL_CUSTOM_SERVER_INPUT_BOX_SUBMIT_BUTTON = '//*[@class="InlineEditingInput_button InlineEditingInput_okButton SimpleButton_root ButtonOverrides_root"]'; const STAKE_POOL_CUSTOM_SERVER_INPUT_BOX_X_BUTTON = '//*[@class="InlineEditingInput_button InlineEditingInput_cancelButton SimpleButton_root ButtonOverrides_root"]'; const STAKE_POOL_SERVER_DROPDOWN = '//*[@class="SimpleFormField_inputWrapper"]'; -const STAKE_POOL_SERVER_DROPDOWN_CUSTOM_OPTION = '//*[@class="ScrollbarsCustom-Content"]//span[text()="Custom server"]'; -const STAKE_POOLS_SUBMENU_SETTINGS = '//*[@class="SettingsMenu_component"]//button[text()="Stake pools"]'; +const STAKE_POOL_SERVER_DROPDOWN_CUSTOM_OPTION = `//*[@class="ScrollbarsCustom-Content"]//span[text()="${CUSTOM_SERVER_TEXT}"]`; +const STAKE_POOLS_SUBMENU_SETTINGS = `//*[@class="SettingsMenu_component"]//button[text()="${STAKE_POOL_TEXT}"]`; When(/^custom server is the default option$/, function() { return this.waitAndClick(CUSTOM_SERVER_DROPDOWN_OPTION); From 37d678b87ad9b567480a2b6e96d91e806adc743f Mon Sep 17 00:00:00 2001 From: Manus McCole Date: Mon, 30 Aug 2021 10:04:32 +0100 Subject: [PATCH 28/37] Added 'Your changes have been saved' success message from en-US.json file --- tests/settings/e2e/features/stakepool-settings.feature | 2 +- tests/settings/e2e/steps/stakepool-settings.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/settings/e2e/features/stakepool-settings.feature b/tests/settings/e2e/features/stakepool-settings.feature index 12fedb443a..14774fb20d 100644 --- a/tests/settings/e2e/features/stakepool-settings.feature +++ b/tests/settings/e2e/features/stakepool-settings.feature @@ -13,7 +13,7 @@ Feature: Stake-pool server settings And The smash server input textBox is visible And And I enter a custom server URL as custom server option And I focus the stake-pool custom server input box submit button and then click it - And I see the "Your changes have been saved" success message + And I see the 'Your changes have been saved' success message And I am on the Delegation "stake-pools" screen Then The custom server I chose earlier is visible on stake-pool screen above stake-pool list and is clickable And I am brought back to the stake-pool server settings screen diff --git a/tests/settings/e2e/steps/stakepool-settings.js b/tests/settings/e2e/steps/stakepool-settings.js index e180dadcbe..be47cdf56b 100644 --- a/tests/settings/e2e/steps/stakepool-settings.js +++ b/tests/settings/e2e/steps/stakepool-settings.js @@ -6,6 +6,7 @@ const INVALID_SMASH_SERVER_TEXT = en['api.errors.invalidSmashServer']; const OFF_CHAIN_METADATA_SERVER_TEXT = en['settings.stakePools.smash.select.label']; const SMASH_SERVER_URL_TEXT = en['settings.stakePools.smashUrl.input.label']; const STAKE_POOL_TEXT = en['settings.menu.stakePools.link.label']; +const YOUR_CHANGES_HAVE_BEEN_SAVED_SUCCESS_MESSAGE = en['inline.editing.input.changesSaved']; const CUSTOM_SERVER_DROPDOWN_OPTION = `//*[@class="SimpleInput_customValueWrapper"]//*[@value="${CUSTOM_SERVER_TEXT}"]`; const DAEDALUS_TOP_BAR_LOGO = '//*[@class="TopBar_topBar TopBar_withoutWallet"]'; @@ -77,6 +78,6 @@ When(/^I click on stakepool subtab$/, function() { return this.waitAndClick(STAKE_POOLS_SUBMENU_SETTINGS); }); -Then(/^I see the "([^"]*)" success message$/, function(message) { - return this.client.waitForVisible(`//*[@class="StakePoolsSettings_savingResultLabel" and text()="${message}"]`); +Then(/^I see the 'Your changes have been saved' success message$/, function() { + return this.client.waitForVisible(`//*[@class="StakePoolsSettings_savingResultLabel" and text()="${YOUR_CHANGES_HAVE_BEEN_SAVED_SUCCESS_MESSAGE}"]`); }); From da084916c6df5e53238f4d4b6d851c64c5b0c681 Mon Sep 17 00:00:00 2001 From: Manus McCole Date: Mon, 30 Aug 2021 10:29:08 +0100 Subject: [PATCH 29/37] Removed @watch flags --- tests/settings/e2e/features/currency-display-settings.feature | 2 +- tests/settings/e2e/features/stakepool-settings.feature | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/settings/e2e/features/currency-display-settings.feature b/tests/settings/e2e/features/currency-display-settings.feature index f6e9c6ded1..b2c52225c3 100644 --- a/tests/settings/e2e/features/currency-display-settings.feature +++ b/tests/settings/e2e/features/currency-display-settings.feature @@ -1,4 +1,4 @@ -@e2e @watch +@e2e Feature: Wallet currency display settings Background: diff --git a/tests/settings/e2e/features/stakepool-settings.feature b/tests/settings/e2e/features/stakepool-settings.feature index 14774fb20d..613c05a751 100644 --- a/tests/settings/e2e/features/stakepool-settings.feature +++ b/tests/settings/e2e/features/stakepool-settings.feature @@ -1,4 +1,4 @@ -@e2e @watch +@e2e Feature: Stake-pool server settings Background: From 671f2114d64500fda32f93c86fac5b62f69811ae Mon Sep 17 00:00:00 2001 From: Manus McCole Date: Mon, 30 Aug 2021 12:15:27 +0100 Subject: [PATCH 30/37] Readding entry to CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 50a3c99983..bc941bed2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ Changelog ### Chores +- Added tests for currency display settings and stake-pool settings screens ([PR 2622](https://github.com/input-output-hk/daedalus/pull/2622)) - Updated `cardano-wallet` to version `2021-08-27` which includes `cardano-node` 1.29.0 ([PR 2650](https://github.com/input-output-hk/daedalus/pull/2650)) - Updated `cardano-wallet` to version `2021-08-11` which includes `cardano-node` alonzo-purple-1.0.1 ([PR 2641](https://github.com/input-output-hk/daedalus/pull/2641)) - Updated `cardano-wallet` to version `2021-07-30` which includes `cardano-node` 1.28.0 ([PR 2635](https://github.com/input-output-hk/daedalus/pull/2635), [PR 2638](https://github.com/input-output-hk/daedalus/pull/2638)) From fb3d02318a7a492f119b880043d5fb09eddc952b Mon Sep 17 00:00:00 2001 From: Manus McCole Date: Mon, 13 Sep 2021 15:15:42 +0100 Subject: [PATCH 31/37] Updating constant name for linking to en-US.json' file --- tests/settings/e2e/steps/stakepool-settings.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/settings/e2e/steps/stakepool-settings.js b/tests/settings/e2e/steps/stakepool-settings.js index be47cdf56b..2c09281f67 100644 --- a/tests/settings/e2e/steps/stakepool-settings.js +++ b/tests/settings/e2e/steps/stakepool-settings.js @@ -1,12 +1,12 @@ import { When, Then } from 'cucumber'; -import en from '../../../../source/renderer/app/i18n/locales/en-US.json'; - -const CUSTOM_SERVER_TEXT = en['settings.stakePools.smash.select.customServer']; -const INVALID_SMASH_SERVER_TEXT = en['api.errors.invalidSmashServer']; -const OFF_CHAIN_METADATA_SERVER_TEXT = en['settings.stakePools.smash.select.label']; -const SMASH_SERVER_URL_TEXT = en['settings.stakePools.smashUrl.input.label']; -const STAKE_POOL_TEXT = en['settings.menu.stakePools.link.label']; -const YOUR_CHANGES_HAVE_BEEN_SAVED_SUCCESS_MESSAGE = en['inline.editing.input.changesSaved']; +import enCopy from '../../../../source/renderer/app/i18n/locales/en-US.json'; + +const CUSTOM_SERVER_TEXT = enCopy['settings.stakePools.smash.select.customServer']; +const INVALID_SMASH_SERVER_TEXT = enCopy['api.errors.invalidSmashServer']; +const OFF_CHAIN_METADATA_SERVER_TEXT = enCopy['settings.stakePools.smash.select.label']; +const SMASH_SERVER_URL_TEXT = enCopy['settings.stakePools.smashUrl.input.label']; +const STAKE_POOL_TEXT = enCopy['settings.menu.stakePools.link.label']; +const YOUR_CHANGES_HAVE_BEEN_SAVED_SUCCESS_MESSAGE = enCopy['inline.editing.input.changesSaved']; const CUSTOM_SERVER_DROPDOWN_OPTION = `//*[@class="SimpleInput_customValueWrapper"]//*[@value="${CUSTOM_SERVER_TEXT}"]`; const DAEDALUS_TOP_BAR_LOGO = '//*[@class="TopBar_topBar TopBar_withoutWallet"]'; From ff47a9e26d589bf16fc0d5e3a2df34179bbc3689 Mon Sep 17 00:00:00 2001 From: Daniel Main Date: Tue, 21 Sep 2021 10:11:39 +0200 Subject: [PATCH 32/37] Upgraded cucumber and spectron --- package.json | 10 +- tests/addresses/e2e/steps/addresses.js | 2 +- tests/app/e2e/steps/about-dialog.js | 2 +- tests/app/e2e/steps/app-version-difference.js | 2 +- tests/app/e2e/steps/cardano-node.js | 2 +- tests/app/e2e/steps/daedalus-process.js | 4 +- tests/app/e2e/steps/data-layer-migration.js | 2 +- tests/app/e2e/steps/helpers.js | 2 +- tests/app/e2e/steps/inject-fault.js | 4 +- tests/app/e2e/steps/local-time-difference.js | 2 +- tests/app/e2e/steps/no-disk-space.js | 2 +- tests/app/e2e/steps/node-restart.js | 2 +- .../steps/trouble-connecting-notification.js | 2 +- .../e2e/steps/trouble-syncing-notification.js | 2 +- .../steps/mnemonics-form-validation.steps.js | 2 +- .../e2e/steps/delegation-pending.js | 2 +- tests/delegation/e2e/steps/delegation.js | 2 +- tests/delegation/e2e/steps/rewards.js | 2 +- tests/delegation/e2e/steps/stake-pools.js | 2 +- .../navigation/e2e/steps/general-settings.js | 4 +- tests/navigation/e2e/steps/sidebar.js | 2 +- tests/news/e2e/steps/newsfeed-steps.js | 2 +- .../e2e/steps/paper-wallets-certificate.js | 2 +- tests/settings/e2e/steps/basic-setup.js | 2 +- .../e2e/steps/currency-display-settings.js | 2 +- tests/settings/e2e/steps/custom-formats.js | 2 +- tests/settings/e2e/steps/general-settings.js | 2 +- tests/settings/e2e/steps/select-language.js | 2 +- tests/settings/e2e/steps/settings.js | 2 +- .../settings/e2e/steps/stakepool-settings.js | 2 +- tests/settings/e2e/steps/terms-of-use.js | 2 +- tests/settings/unit/steps/file-names.js | 2 +- tests/setup-common.js | 2 +- tests/setup-e2e.js | 5 +- tests/transactions/e2e/steps/transactions.js | 2 +- tests/transactions/e2e/steps/utxos.js | 2 +- tests/transactions/unit/steps/utxos-chart.js | 2 +- tests/types.js | 2 +- .../e2e/steps/balance-wallets-notification.js | 2 +- tests/wallets/e2e/steps/create-wallet.js | 2 +- tests/wallets/e2e/steps/delete-wallet.js | 2 +- .../e2e/steps/import-and-migrate-wallets.js | 2 +- .../recovery-phrase-verification-steps.js | 2 +- tests/wallets/e2e/steps/restore-wallet.js | 2 +- .../e2e/steps/transfer-funds-wizard.js | 2 +- .../e2e/steps/wallet-not-responding.js | 2 +- tests/wallets/e2e/steps/wallets-limit.js | 2 +- tests/wallets/e2e/steps/wallets-ordering.js | 2 +- tests/wallets/e2e/steps/wallets.js | 2 +- tests/wallets/unit/steps/mnemonics.js | 2 +- tests/wallets/unit/steps/spending-password.js | 2 +- yarn.lock | 368 ++++++++++++------ 52 files changed, 307 insertions(+), 180 deletions(-) diff --git a/package.json b/package.json index 72ddbe4f9e..ee9a8b9433 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "test:e2e:rerun:fail-fast": "yarn cucumber:rerun --require 'tests/setup-e2e.js' --require 'tests/**/e2e/**/*.js' --tags '@e2e and not @skip and not @wip'", "test:e2e:watch": "gulp test:e2e:watch", "test:e2e:watch:once": "KEEP_APP_AFTER_TESTS=true yarn test:e2e --tags '@e2e and @watch'", - "cucumber": "cross-env NODE_ENV=test cucumber-js --require 'tests/setup-common.js' --require-module @babel/register -f json:tests-report/report-data.json -f summary:tests-report/summary.log -f node_modules/cucumber-pretty:tests-report/results.log --format-options '{\"snippetInterface\": \"async-await\"}' -f node_modules/cucumber-pretty --format-options '{\"snippetInterface\": \"async-await\"}' -f rerun:tests/@rerun.txt", + "cucumber": "cross-env NODE_ENV=test cucumber-js --require 'tests/setup-common.js' --require-module @babel/register -f json:tests-report/report-data.json -f summary:tests-report/summary.log --format-options '{\"snippetInterface\": \"async-await\"}' -f @cucumber/pretty-formatter --format-options '{\"snippetInterface\": \"async-await\"}' -f rerun:tests/@rerun.txt", "cucumber:run": "yarn cucumber tests", "cucumber:fail-fast": "yarn cucumber tests --fail-fast", "cucumber:rerun": "yarn cucumber tests-report/@rerun.txt", @@ -79,6 +79,8 @@ "@babel/preset-flow": "7.8.3", "@babel/preset-react": "7.0.0", "@babel/register": "7.0.0", + "@cucumber/cucumber": "7.3.1", + "@cucumber/pretty-formatter": "1.0.0-alpha.1", "@dump247/storybook-state": "1.6.1", "@storybook/addon-actions": "5.3.14", "@storybook/addon-knobs": "5.3.14", @@ -99,8 +101,6 @@ "concurrently": "5.3.0", "cross-env": "7.0.2", "css-loader": "2.0.1", - "cucumber": "6.0.5", - "cucumber-pretty": "6.0.0", "del": "6.0.0", "electron-chromedriver": "13.0.0", "electron-connect": "0.6.3", @@ -111,7 +111,7 @@ "eslint-config-airbnb": "18.2.0", "eslint-config-prettier": "6.12.0", "eslint-formatter-pretty": "4.0.0", - "eslint-import-resolver-webpack": "^0.13.1", + "eslint-import-resolver-webpack": "0.13.1", "eslint-plugin-flowtype": "5.2.0", "eslint-plugin-import": "2.23.3", "eslint-plugin-jsx-a11y": "6.3.1", @@ -150,7 +150,7 @@ "sass-loader": "7.1.0", "sinon": "9.2.2", "spawn-sync": "2.0.0", - "spectron": "14.0.0", + "spectron": "15.0.0", "style-loader": "0.23.1", "stylelint": "13.7.2", "stylelint-order": "4.1.0", diff --git a/tests/addresses/e2e/steps/addresses.js b/tests/addresses/e2e/steps/addresses.js index e46ac97307..4d15b8d4cd 100644 --- a/tests/addresses/e2e/steps/addresses.js +++ b/tests/addresses/e2e/steps/addresses.js @@ -1,5 +1,5 @@ // @flow -import { Given, Then, When } from 'cucumber'; +import { Given, Then, When } from '@cucumber/cucumber'; import { expect } from 'chai'; import { find } from 'lodash'; import { getVisibleElementsCountForSelector } from '../../../common/e2e/steps/helpers'; diff --git a/tests/app/e2e/steps/about-dialog.js b/tests/app/e2e/steps/about-dialog.js index 7b3d316a22..1fca35feca 100644 --- a/tests/app/e2e/steps/about-dialog.js +++ b/tests/app/e2e/steps/about-dialog.js @@ -1,5 +1,5 @@ // @flow -import { Given, When, Then } from 'cucumber'; +import { Given, When, Then } from '@cucumber/cucumber'; import { expect } from 'chai'; import packageJson from '../../../../package.json'; import type { Daedalus } from '../../../types'; diff --git a/tests/app/e2e/steps/app-version-difference.js b/tests/app/e2e/steps/app-version-difference.js index cd1704b267..d58838f3a4 100644 --- a/tests/app/e2e/steps/app-version-difference.js +++ b/tests/app/e2e/steps/app-version-difference.js @@ -1,5 +1,5 @@ // @flow -import { Given, When, Then } from 'cucumber'; +import { Given, When, Then } from '@cucumber/cucumber'; import { expect } from 'chai'; import { environment } from '../../../../source/main/environment'; import { getVisibleTextsForSelector } from '../../../common/e2e/steps/helpers'; diff --git a/tests/app/e2e/steps/cardano-node.js b/tests/app/e2e/steps/cardano-node.js index 376f811eae..2e041773a6 100644 --- a/tests/app/e2e/steps/cardano-node.js +++ b/tests/app/e2e/steps/cardano-node.js @@ -1,5 +1,5 @@ // @flow -import { Given, Then } from 'cucumber'; +import { Given, Then } from '@cucumber/cucumber'; import { CardanoNodeStates } from '../../../../source/common/types/cardano-node.types'; import { getCardanoNodeState, waitForCardanoNodeToExit } from './helpers'; diff --git a/tests/app/e2e/steps/daedalus-process.js b/tests/app/e2e/steps/daedalus-process.js index 89648e554d..74b1b267a3 100644 --- a/tests/app/e2e/steps/daedalus-process.js +++ b/tests/app/e2e/steps/daedalus-process.js @@ -1,5 +1,5 @@ // @flow -import { Given, When, Then } from 'cucumber'; +import { Given, When, Then } from '@cucumber/cucumber'; import { expect } from 'chai'; import { waitUntilTextInSelector } from '../../../common/e2e/steps/helpers'; import { refreshClient, waitForCardanoNodeToExit, waitForDaedalusToExit } from './helpers'; @@ -69,4 +69,4 @@ When(/^I disconnect app$/, function() { this.client.execute(() => { daedalus.stores.networkStatus._setDisconnected(true); }); -}); \ No newline at end of file +}); diff --git a/tests/app/e2e/steps/data-layer-migration.js b/tests/app/e2e/steps/data-layer-migration.js index 65a4376eb7..34860846fa 100644 --- a/tests/app/e2e/steps/data-layer-migration.js +++ b/tests/app/e2e/steps/data-layer-migration.js @@ -1,5 +1,5 @@ // @flow -import { Given, When, Then } from 'cucumber'; +import { Given, When, Then } from '@cucumber/cucumber'; import type { Daedalus } from '../../../types'; declare var daedalus: Daedalus; diff --git a/tests/app/e2e/steps/helpers.js b/tests/app/e2e/steps/helpers.js index 57873e60f3..331d3ccc98 100644 --- a/tests/app/e2e/steps/helpers.js +++ b/tests/app/e2e/steps/helpers.js @@ -1,5 +1,5 @@ // @flow -import { When } from 'cucumber'; +import { When } from '@cucumber/cucumber'; import { getProcessesByName } from '../../../../source/main/utils/processes'; import type { Daedalus } from '../../../types'; diff --git a/tests/app/e2e/steps/inject-fault.js b/tests/app/e2e/steps/inject-fault.js index 9029269e56..72c1fd48ac 100644 --- a/tests/app/e2e/steps/inject-fault.js +++ b/tests/app/e2e/steps/inject-fault.js @@ -1,5 +1,5 @@ // @flow -import { When } from 'cucumber'; +import { When } from '@cucumber/cucumber'; import type { Daedalus } from '../../../types'; declare var daedalus: Daedalus; @@ -13,4 +13,4 @@ When(/^I inject fault named "([^"]*)"$/, async function(faultName) { throw e; }); }, faultName); -}); \ No newline at end of file +}); diff --git a/tests/app/e2e/steps/local-time-difference.js b/tests/app/e2e/steps/local-time-difference.js index 5d684f51f8..469bc97f4a 100644 --- a/tests/app/e2e/steps/local-time-difference.js +++ b/tests/app/e2e/steps/local-time-difference.js @@ -1,5 +1,5 @@ // @flow -import { Given, Then } from 'cucumber'; +import { Given, Then } from '@cucumber/cucumber'; import { expectTextInSelector } from '../../../common/e2e/steps/helpers'; import type { Daedalus } from '../../../types'; diff --git a/tests/app/e2e/steps/no-disk-space.js b/tests/app/e2e/steps/no-disk-space.js index 59549e0c92..348a93893e 100644 --- a/tests/app/e2e/steps/no-disk-space.js +++ b/tests/app/e2e/steps/no-disk-space.js @@ -1,5 +1,5 @@ // @flow -import { Given, When, Then } from 'cucumber'; +import { Given, When, Then } from '@cucumber/cucumber'; import type { Daedalus } from '../../../types'; declare var daedalus: Daedalus; diff --git a/tests/app/e2e/steps/node-restart.js b/tests/app/e2e/steps/node-restart.js index 389a1c17ba..5f722ee583 100644 --- a/tests/app/e2e/steps/node-restart.js +++ b/tests/app/e2e/steps/node-restart.js @@ -1,5 +1,5 @@ // @flow -import { Given, When, Then } from 'cucumber'; +import { Given, When, Then } from '@cucumber/cucumber'; import { waitUntilTextInSelector } from '../../../common/e2e/steps/helpers'; import type { Daedalus } from '../../../types'; diff --git a/tests/app/e2e/steps/trouble-connecting-notification.js b/tests/app/e2e/steps/trouble-connecting-notification.js index a95869a60c..69e02a4d5d 100644 --- a/tests/app/e2e/steps/trouble-connecting-notification.js +++ b/tests/app/e2e/steps/trouble-connecting-notification.js @@ -1,5 +1,5 @@ // @flow -import { Then } from 'cucumber'; +import { Then } from '@cucumber/cucumber'; import { waitUntilTextInSelector } from '../../../common/e2e/steps/helpers'; import type { Daedalus } from '../../../types'; diff --git a/tests/app/e2e/steps/trouble-syncing-notification.js b/tests/app/e2e/steps/trouble-syncing-notification.js index 3759204f3c..4dd8687d41 100644 --- a/tests/app/e2e/steps/trouble-syncing-notification.js +++ b/tests/app/e2e/steps/trouble-syncing-notification.js @@ -1,5 +1,5 @@ // @flow -import { Then } from 'cucumber'; +import { Then } from '@cucumber/cucumber'; import { waitUntilTextInSelector } from '../../../common/e2e/steps/helpers'; import type { Daedalus } from '../../../types'; diff --git a/tests/common/unit/steps/mnemonics-form-validation.steps.js b/tests/common/unit/steps/mnemonics-form-validation.steps.js index 899a44bce5..7ab38e60aa 100644 --- a/tests/common/unit/steps/mnemonics-form-validation.steps.js +++ b/tests/common/unit/steps/mnemonics-form-validation.steps.js @@ -1,5 +1,5 @@ // @flow -import { Given, When, Then } from 'cucumber'; +import { Given, When, Then } from '@cucumber/cucumber'; import { expect } from 'chai'; import { sampleSize } from 'lodash'; import sinon from 'sinon'; diff --git a/tests/delegation/e2e/steps/delegation-pending.js b/tests/delegation/e2e/steps/delegation-pending.js index 2abdf2b9cb..41e0f3b359 100644 --- a/tests/delegation/e2e/steps/delegation-pending.js +++ b/tests/delegation/e2e/steps/delegation-pending.js @@ -1,5 +1,5 @@ // @flow -import { Given, Then } from 'cucumber'; +import { Given, Then } from '@cucumber/cucumber'; import { expect } from 'chai'; import { last } from 'lodash'; import type { Daedalus } from '../../../types'; diff --git a/tests/delegation/e2e/steps/delegation.js b/tests/delegation/e2e/steps/delegation.js index c78adbfd78..661de17902 100644 --- a/tests/delegation/e2e/steps/delegation.js +++ b/tests/delegation/e2e/steps/delegation.js @@ -1,5 +1,5 @@ // @flow -import { Given, Then } from 'cucumber'; +import { Given, Then } from '@cucumber/cucumber'; import { expect } from 'chai'; import BigNumber from 'bignumber.js'; import { navigateTo } from '../../../navigation/e2e/steps/helpers'; diff --git a/tests/delegation/e2e/steps/rewards.js b/tests/delegation/e2e/steps/rewards.js index a0c7faf016..964b8c53ff 100644 --- a/tests/delegation/e2e/steps/rewards.js +++ b/tests/delegation/e2e/steps/rewards.js @@ -1,6 +1,6 @@ // @flow import fs from 'fs'; -import { When, Then } from 'cucumber'; +import { When, Then } from '@cucumber/cucumber'; import path from 'path'; import moment from 'moment'; import type { Daedalus } from '../../../types'; diff --git a/tests/delegation/e2e/steps/stake-pools.js b/tests/delegation/e2e/steps/stake-pools.js index deda0239a5..915f54a36c 100644 --- a/tests/delegation/e2e/steps/stake-pools.js +++ b/tests/delegation/e2e/steps/stake-pools.js @@ -1,5 +1,5 @@ // @flow -import { Given, When, Then } from 'cucumber'; +import { Given, When, Then } from '@cucumber/cucumber'; import { expect } from 'chai'; import BigNumber from 'bignumber.js/bignumber'; import { delegationCentreStakingHelper, getStakePoolByRanking } from './helpers'; diff --git a/tests/navigation/e2e/steps/general-settings.js b/tests/navigation/e2e/steps/general-settings.js index e7de37b64f..57d858e880 100644 --- a/tests/navigation/e2e/steps/general-settings.js +++ b/tests/navigation/e2e/steps/general-settings.js @@ -1,5 +1,5 @@ // @flow -import { Given, Then } from 'cucumber'; +import { Given, Then } from '@cucumber/cucumber'; import { navigateTo, waitUntilUrlEquals } from './helpers'; Given(/^I am on the General Settings "([^"]*)" screen$/, async function( @@ -12,4 +12,4 @@ Then(/^I should see General Settings "([^"]*)" screen$/, async function( screenName ) { return waitUntilUrlEquals.call(this, `/settings/${screenName}`); -}); \ No newline at end of file +}); diff --git a/tests/navigation/e2e/steps/sidebar.js b/tests/navigation/e2e/steps/sidebar.js index 177fe8c21b..6c08703b52 100644 --- a/tests/navigation/e2e/steps/sidebar.js +++ b/tests/navigation/e2e/steps/sidebar.js @@ -1,5 +1,5 @@ // @flow -import { Given, When, Then } from 'cucumber'; +import { Given, When, Then } from '@cucumber/cucumber'; import { sidebarHelpers } from './helpers'; import type { Daedalus } from '../../../types'; diff --git a/tests/news/e2e/steps/newsfeed-steps.js b/tests/news/e2e/steps/newsfeed-steps.js index 6588f18b9d..c0542c352c 100644 --- a/tests/news/e2e/steps/newsfeed-steps.js +++ b/tests/news/e2e/steps/newsfeed-steps.js @@ -1,6 +1,6 @@ import { expect } from 'chai'; import { get } from 'lodash'; -import { Given, When, Then } from 'cucumber'; +import { Given, When, Then } from '@cucumber/cucumber'; import moment from 'moment'; import newsDummyJson from '../documents/dummy-news.json'; diff --git a/tests/paper-wallets/e2e/steps/paper-wallets-certificate.js b/tests/paper-wallets/e2e/steps/paper-wallets-certificate.js index 05e6431c1a..ace4546ec2 100644 --- a/tests/paper-wallets/e2e/steps/paper-wallets-certificate.js +++ b/tests/paper-wallets/e2e/steps/paper-wallets-certificate.js @@ -1,5 +1,5 @@ // @flow -import { Given, When, Then } from 'cucumber'; +import { Given, When, Then } from '@cucumber/cucumber'; import { expect } from 'chai'; import path from 'path'; import { fillOutWalletSendForm } from '../../../wallets/e2e/steps/helpers'; diff --git a/tests/settings/e2e/steps/basic-setup.js b/tests/settings/e2e/steps/basic-setup.js index 3d87f4bd3e..3e81a5ddfb 100644 --- a/tests/settings/e2e/steps/basic-setup.js +++ b/tests/settings/e2e/steps/basic-setup.js @@ -1,5 +1,5 @@ // @flow -import { Given } from 'cucumber'; +import { Given } from '@cucumber/cucumber'; import { initialSettingsHelpers, migrationHelpers, termsOfUseHelpers } from './helpers'; const { acceptMigration } = migrationHelpers; diff --git a/tests/settings/e2e/steps/currency-display-settings.js b/tests/settings/e2e/steps/currency-display-settings.js index a5cd52a811..c076fd4d32 100644 --- a/tests/settings/e2e/steps/currency-display-settings.js +++ b/tests/settings/e2e/steps/currency-display-settings.js @@ -1,5 +1,5 @@ // @flow -import { When, Then } from 'cucumber'; +import { When, Then } from '@cucumber/cucumber'; import en from '../../../../source/renderer/app/i18n/locales/en-US.json'; const SELECT_CURRENCY_TEXT = en['settings.wallets.currency.selectLabel']; diff --git a/tests/settings/e2e/steps/custom-formats.js b/tests/settings/e2e/steps/custom-formats.js index f4a68e7a1b..ebc66b9b5d 100644 --- a/tests/settings/e2e/steps/custom-formats.js +++ b/tests/settings/e2e/steps/custom-formats.js @@ -1,5 +1,5 @@ // @flow -import { Given, When, Then } from 'cucumber'; +import { Given, When, Then } from '@cucumber/cucumber'; import { expect } from 'chai'; import { chooseCustomOptionsByValue, diff --git a/tests/settings/e2e/steps/general-settings.js b/tests/settings/e2e/steps/general-settings.js index a56f911080..57e694091c 100644 --- a/tests/settings/e2e/steps/general-settings.js +++ b/tests/settings/e2e/steps/general-settings.js @@ -1,5 +1,5 @@ // @flow -import { When, Then } from 'cucumber'; +import { When, Then } from '@cucumber/cucumber'; import { expect } from 'chai'; import { camelCase } from 'lodash'; diff --git a/tests/settings/e2e/steps/select-language.js b/tests/settings/e2e/steps/select-language.js index ab3bb07eef..9691ca59b2 100644 --- a/tests/settings/e2e/steps/select-language.js +++ b/tests/settings/e2e/steps/select-language.js @@ -1,5 +1,5 @@ // @flow -import { Given, When, Then } from 'cucumber'; +import { Given, When, Then } from '@cucumber/cucumber'; import { expect } from 'chai'; import { initialSettingsHelpers } from './helpers'; import type { Daedalus } from '../../../types'; diff --git a/tests/settings/e2e/steps/settings.js b/tests/settings/e2e/steps/settings.js index e2208c3b9f..21cc1141e4 100644 --- a/tests/settings/e2e/steps/settings.js +++ b/tests/settings/e2e/steps/settings.js @@ -1,5 +1,5 @@ // @flow -import { Given, When, Then } from 'cucumber'; +import { Given, When, Then } from '@cucumber/cucumber'; import { expect } from 'chai'; import { navigateTo } from '../../../navigation/e2e/steps/helpers'; import { waitUntilWaletNamesEqual } from '../../../wallets/e2e/steps/helpers'; diff --git a/tests/settings/e2e/steps/stakepool-settings.js b/tests/settings/e2e/steps/stakepool-settings.js index 2c09281f67..b1b63290eb 100644 --- a/tests/settings/e2e/steps/stakepool-settings.js +++ b/tests/settings/e2e/steps/stakepool-settings.js @@ -1,4 +1,4 @@ -import { When, Then } from 'cucumber'; +import { When, Then } from '@cucumber/cucumber'; import enCopy from '../../../../source/renderer/app/i18n/locales/en-US.json'; const CUSTOM_SERVER_TEXT = enCopy['settings.stakePools.smash.select.customServer']; diff --git a/tests/settings/e2e/steps/terms-of-use.js b/tests/settings/e2e/steps/terms-of-use.js index 40b5f7b33d..7895f9e58c 100644 --- a/tests/settings/e2e/steps/terms-of-use.js +++ b/tests/settings/e2e/steps/terms-of-use.js @@ -1,5 +1,5 @@ // @flow -import { Given, When, Then } from 'cucumber'; +import { Given, When, Then } from '@cucumber/cucumber'; import { expect } from 'chai'; import { termsOfUseHelpers } from './helpers'; import type { Daedalus } from '../../../types'; diff --git a/tests/settings/unit/steps/file-names.js b/tests/settings/unit/steps/file-names.js index 74307084cb..6fe4bac03a 100644 --- a/tests/settings/unit/steps/file-names.js +++ b/tests/settings/unit/steps/file-names.js @@ -1,4 +1,4 @@ -import { Given, Then } from 'cucumber'; +import { Given, Then } from '@cucumber/cucumber'; import { expect } from 'chai'; import { pickBy, identity } from 'lodash'; import { diff --git a/tests/setup-common.js b/tests/setup-common.js index f7387e106d..88bf5fd2e7 100644 --- a/tests/setup-common.js +++ b/tests/setup-common.js @@ -1,4 +1,4 @@ -import { After, Before } from 'cucumber'; +import { After, Before } from '@cucumber/cucumber'; import sinon from 'sinon'; import { environment } from '../source/main/environment'; diff --git a/tests/setup-e2e.js b/tests/setup-e2e.js index fb925ae7f4..4ce05d0481 100644 --- a/tests/setup-e2e.js +++ b/tests/setup-e2e.js @@ -8,7 +8,7 @@ import { After, AfterAll, setDefaultTimeout, -} from 'cucumber'; +} from '@cucumber/cucumber'; import electronPath from 'electron'; import fakeDialog from 'spectron-fake-dialog'; import { includes } from 'lodash'; @@ -60,8 +60,11 @@ const startApp = async () => { env: Object.assign({}, process.env, { NODE_ENV: TEST, }), + contextIsolation: false, + enableRemoteModule: false, startTimeout: DEFAULT_TIMEOUT, waitTimeout: DEFAULT_TIMEOUT, + chromeDriverArgs: ["--verbose"], chromeDriverLogPath: path.join( __dirname, '../logs/chrome-driver.log' diff --git a/tests/transactions/e2e/steps/transactions.js b/tests/transactions/e2e/steps/transactions.js index dedb408c12..021ae57424 100644 --- a/tests/transactions/e2e/steps/transactions.js +++ b/tests/transactions/e2e/steps/transactions.js @@ -1,5 +1,5 @@ // @flow -import { Given, When, Then } from 'cucumber'; +import { Given, When, Then } from '@cucumber/cucumber'; import { expect } from 'chai'; import BigNumber from 'bignumber.js/bignumber'; import { DECIMAL_PLACES_IN_ADA, LOVELACES_PER_ADA } from '../../../../source/renderer/app/config/numbersConfig'; diff --git a/tests/transactions/e2e/steps/utxos.js b/tests/transactions/e2e/steps/utxos.js index 2da0c7963b..162f24d6f7 100644 --- a/tests/transactions/e2e/steps/utxos.js +++ b/tests/transactions/e2e/steps/utxos.js @@ -1,5 +1,5 @@ // @flow -import { Then } from 'cucumber'; +import { Then } from '@cucumber/cucumber'; import { expect } from 'chai'; import { getVisibleTextsForSelector } from '../../../common/e2e/steps/helpers'; import { getWalletUtxosTotalAmount } from '../../../../source/renderer/app/utils/utxoUtils'; diff --git a/tests/transactions/unit/steps/utxos-chart.js b/tests/transactions/unit/steps/utxos-chart.js index d588a86ccd..0dde7d9084 100644 --- a/tests/transactions/unit/steps/utxos-chart.js +++ b/tests/transactions/unit/steps/utxos-chart.js @@ -1,4 +1,4 @@ -import { Given, Then } from 'cucumber'; +import { Given, Then } from '@cucumber/cucumber'; import { expect } from 'chai'; import { formattedAmountToLovelace, diff --git a/tests/types.js b/tests/types.js index cc09c76a2d..41e1384ffc 100644 --- a/tests/types.js +++ b/tests/types.js @@ -1,5 +1,5 @@ // @flow -import { defineParameterType } from 'cucumber'; +import { defineParameterType } from '@cucumber/cucumber'; import type { Api } from '../source/renderer/app/api'; import type { ActionsMap } from '../source/renderer/app/actions'; import type { StoresMap } from '../source/renderer/app/stores'; diff --git a/tests/wallets/e2e/steps/balance-wallets-notification.js b/tests/wallets/e2e/steps/balance-wallets-notification.js index 64e61a55c8..6eb5244b06 100644 --- a/tests/wallets/e2e/steps/balance-wallets-notification.js +++ b/tests/wallets/e2e/steps/balance-wallets-notification.js @@ -1,5 +1,5 @@ // @flow -import { Then } from 'cucumber'; +import { Then } from '@cucumber/cucumber'; import { expect } from 'chai'; import type { Daedalus } from '../../../types'; diff --git a/tests/wallets/e2e/steps/create-wallet.js b/tests/wallets/e2e/steps/create-wallet.js index 18ed3c4f6b..f7dc7422c4 100644 --- a/tests/wallets/e2e/steps/create-wallet.js +++ b/tests/wallets/e2e/steps/create-wallet.js @@ -1,5 +1,5 @@ // @flow -import { Given, When, Then } from 'cucumber'; +import { Given, When, Then } from '@cucumber/cucumber'; import { addWalletPage } from './helpers'; import type { Daedalus } from '../../../types'; diff --git a/tests/wallets/e2e/steps/delete-wallet.js b/tests/wallets/e2e/steps/delete-wallet.js index a75d135640..ae2409901a 100644 --- a/tests/wallets/e2e/steps/delete-wallet.js +++ b/tests/wallets/e2e/steps/delete-wallet.js @@ -1,5 +1,5 @@ // @flow -import { Given, When, Then } from 'cucumber'; +import { Given, When, Then } from '@cucumber/cucumber'; import type { Daedalus } from '../../../types'; declare var daedalus: Daedalus; diff --git a/tests/wallets/e2e/steps/import-and-migrate-wallets.js b/tests/wallets/e2e/steps/import-and-migrate-wallets.js index 0f8a6f852a..c7ba4a887e 100644 --- a/tests/wallets/e2e/steps/import-and-migrate-wallets.js +++ b/tests/wallets/e2e/steps/import-and-migrate-wallets.js @@ -1,7 +1,7 @@ // @flow import fs from 'fs'; import path from 'path'; -import { When, Then, Given } from 'cucumber'; +import { When, Then, Given } from '@cucumber/cucumber'; import { expect } from 'chai'; import { difference } from 'lodash'; import { MAX_ADA_WALLETS_COUNT } from '../../../../source/renderer/app/config/numbersConfig'; diff --git a/tests/wallets/e2e/steps/recovery-phrase-verification-steps.js b/tests/wallets/e2e/steps/recovery-phrase-verification-steps.js index 59a1ac12d6..3f06c0e911 100644 --- a/tests/wallets/e2e/steps/recovery-phrase-verification-steps.js +++ b/tests/wallets/e2e/steps/recovery-phrase-verification-steps.js @@ -1,4 +1,4 @@ -import { Given, When, Then } from 'cucumber'; +import { Given, When, Then } from '@cucumber/cucumber'; const SETTINGS_PAGE_STATUS_SELECTOR = '.WalletRecoveryPhraseVerificationWidget_status'; const SETTINGS_PAGE_BUTTON_SELECTOR = `${SETTINGS_PAGE_STATUS_SELECTOR} .WalletRecoveryPhraseVerificationWidget_statusButton`; diff --git a/tests/wallets/e2e/steps/restore-wallet.js b/tests/wallets/e2e/steps/restore-wallet.js index 54b69ef708..26c00c0958 100644 --- a/tests/wallets/e2e/steps/restore-wallet.js +++ b/tests/wallets/e2e/steps/restore-wallet.js @@ -1,5 +1,5 @@ // @flow -import { Given, When, Then } from 'cucumber'; +import { Given, When, Then } from '@cucumber/cucumber'; import { expect } from 'chai'; import { isActiveWalletBeingRestored, diff --git a/tests/wallets/e2e/steps/transfer-funds-wizard.js b/tests/wallets/e2e/steps/transfer-funds-wizard.js index 1965b0020d..c180a37b76 100644 --- a/tests/wallets/e2e/steps/transfer-funds-wizard.js +++ b/tests/wallets/e2e/steps/transfer-funds-wizard.js @@ -1,5 +1,5 @@ // @flow -import { When, Then } from 'cucumber'; +import { When, Then } from '@cucumber/cucumber'; import { expect } from 'chai'; import BigNumber from 'bignumber.js/bignumber'; import { formattedWalletAmount } from '../../../../source/renderer/app/utils/formatters'; diff --git a/tests/wallets/e2e/steps/wallet-not-responding.js b/tests/wallets/e2e/steps/wallet-not-responding.js index d285a6a621..1d66a65cac 100644 --- a/tests/wallets/e2e/steps/wallet-not-responding.js +++ b/tests/wallets/e2e/steps/wallet-not-responding.js @@ -1,5 +1,5 @@ // @flow -import { When, Then } from 'cucumber'; +import { When, Then } from '@cucumber/cucumber'; import type { Daedalus } from '../../../types'; import { WalletSyncStateStatuses } from '../../../../source/renderer/app/domains/Wallet.js'; diff --git a/tests/wallets/e2e/steps/wallets-limit.js b/tests/wallets/e2e/steps/wallets-limit.js index 688d0b3ece..8e95d95c67 100644 --- a/tests/wallets/e2e/steps/wallets-limit.js +++ b/tests/wallets/e2e/steps/wallets-limit.js @@ -1,5 +1,5 @@ // @flow -import { Given, When, Then } from 'cucumber'; +import { Given, When, Then } from '@cucumber/cucumber'; import { expect } from 'chai'; import { createWallets, getWalletByName } from './helpers'; import { MAX_ADA_WALLETS_COUNT } from '../../../../source/renderer/app/config/numbersConfig'; diff --git a/tests/wallets/e2e/steps/wallets-ordering.js b/tests/wallets/e2e/steps/wallets-ordering.js index 5c87cc5901..0a8a06d1f4 100644 --- a/tests/wallets/e2e/steps/wallets-ordering.js +++ b/tests/wallets/e2e/steps/wallets-ordering.js @@ -1,5 +1,5 @@ // @flow -import { Then } from 'cucumber'; +import { Then } from '@cucumber/cucumber'; import { expect } from 'chai'; import type { Daedalus } from '../../../types'; diff --git a/tests/wallets/e2e/steps/wallets.js b/tests/wallets/e2e/steps/wallets.js index bbdcd35dcd..d71dc601f0 100644 --- a/tests/wallets/e2e/steps/wallets.js +++ b/tests/wallets/e2e/steps/wallets.js @@ -1,5 +1,5 @@ // @flow -import { Given, When, Then } from 'cucumber'; +import { Given, When, Then } from '@cucumber/cucumber'; import { expect } from 'chai'; import { createWallets, diff --git a/tests/wallets/unit/steps/mnemonics.js b/tests/wallets/unit/steps/mnemonics.js index 89e590b614..40f8a3a6b8 100644 --- a/tests/wallets/unit/steps/mnemonics.js +++ b/tests/wallets/unit/steps/mnemonics.js @@ -1,7 +1,7 @@ // @flow import readline from 'readline'; import { expect } from 'chai'; -import { Given, When, Then } from 'cucumber'; +import { Given, When, Then } from '@cucumber/cucumber'; import { range, concat } from 'lodash'; import { generateAccountMnemonics, generateAdditionalMnemonics, scrambleMnemonics, unscrambleMnemonics } from '../../../../source/renderer/app/api/utils/mnemonics'; import { mnemonicToSeedHex, getScrambledInput, generateMnemonic } from '../../../../source/renderer/app/utils/crypto'; diff --git a/tests/wallets/unit/steps/spending-password.js b/tests/wallets/unit/steps/spending-password.js index e34bc6a772..88b4f30972 100644 --- a/tests/wallets/unit/steps/spending-password.js +++ b/tests/wallets/unit/steps/spending-password.js @@ -1,4 +1,4 @@ -import { Given, Then } from 'cucumber'; +import { Given, Then } from '@cucumber/cucumber'; import { expect } from 'chai'; import { isValidSpendingPassword } from '../../../../source/renderer/app/utils/validations'; diff --git a/yarn.lock b/yarn.lock index b1192adf7e..806d1f1453 100644 --- a/yarn.lock +++ b/yarn.lock @@ -970,7 +970,7 @@ pirates "^4.0.0" source-map-support "^0.5.9" -"@babel/runtime-corejs3@^7.10.2", "@babel/runtime-corejs3@^7.8.3": +"@babel/runtime-corejs3@^7.10.2": version "7.11.2" resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.11.2.tgz#02c3029743150188edeb66541195f54600278419" dependencies: @@ -1029,6 +1029,125 @@ bech32 "^1.1.4" node-int64 "^0.4.0" +"@cucumber/create-meta@^5.0.0": + version "5.0.0" + resolved "https://registry.yarnpkg.com/@cucumber/create-meta/-/create-meta-5.0.0.tgz#baea1a40ec823881eeefc29a523d6c87d13f4016" + dependencies: + "@cucumber/messages" "^16.0.0" + +"@cucumber/cucumber-expressions@^12.1.1": + version "12.1.3" + resolved "https://registry.yarnpkg.com/@cucumber/cucumber-expressions/-/cucumber-expressions-12.1.3.tgz#e7549fb63a815796a9f9ab96baf0c338f84540d3" + dependencies: + regexp-match-indices "1.0.2" + +"@cucumber/cucumber@^7.3.1": + version "7.3.1" + resolved "https://registry.yarnpkg.com/@cucumber/cucumber/-/cucumber-7.3.1.tgz#1339abc92044f865043eceb2993da15cee0cd255" + dependencies: + "@cucumber/create-meta" "^5.0.0" + "@cucumber/cucumber-expressions" "^12.1.1" + "@cucumber/gherkin" "^19.0.3" + "@cucumber/gherkin-streams" "^2.0.2" + "@cucumber/html-formatter" "^15.0.2" + "@cucumber/messages" "^16.0.1" + "@cucumber/tag-expressions" "^3.0.1" + assertion-error-formatter "^3.0.0" + bluebird "^3.7.2" + capital-case "^1.0.4" + cli-table3 "^0.6.0" + colors "^1.4.0" + commander "^7.0.0" + create-require "^1.1.1" + duration "^0.2.2" + durations "^3.4.2" + figures "^3.2.0" + glob "^7.1.6" + indent-string "^4.0.0" + is-generator "^1.0.3" + is-stream "^2.0.0" + knuth-shuffle-seeded "^1.0.6" + lodash "^4.17.21" + mz "^2.7.0" + progress "^2.0.3" + resolve "^1.19.0" + resolve-pkg "^2.0.0" + stack-chain "^2.0.0" + stacktrace-js "^2.0.2" + string-argv "^0.3.1" + tmp "^0.2.1" + util-arity "^1.1.0" + verror "^1.10.0" + +"@cucumber/gherkin-streams@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@cucumber/gherkin-streams/-/gherkin-streams-2.0.2.tgz#de09e279fe793e93ee83606376df291954fef83b" + dependencies: + "@cucumber/gherkin" "^19.0.1" + "@cucumber/message-streams" "^2.0.0" + "@cucumber/messages" "^16.0.0" + commander "7.2.0" + source-map-support "0.5.19" + +"@cucumber/gherkin@^19.0.1": + version "19.0.3" + resolved "https://registry.yarnpkg.com/@cucumber/gherkin/-/gherkin-19.0.3.tgz#61036ca4940e66f8a787be5f92ce229ae3815ebf" + dependencies: + "@cucumber/message-streams" "^2.0.0" + "@cucumber/messages" "^16.0.1" + +"@cucumber/gherkin@^19.0.3": + version "19.0.3" + resolved "https://registry.yarnpkg.com/@cucumber/gherkin/-/gherkin-19.0.3.tgz#61036ca4940e66f8a787be5f92ce229ae3815ebf" + dependencies: + "@cucumber/message-streams" "^2.0.0" + "@cucumber/messages" "^16.0.1" + +"@cucumber/html-formatter@^15.0.2": + version "15.0.2" + resolved "https://registry.yarnpkg.com/@cucumber/html-formatter/-/html-formatter-15.0.2.tgz#0a4c7d3c5de7de0a1b87a8a9af9eca54280175aa" + dependencies: + "@cucumber/messages" "^16.0.1" + commander "7.2.0" + source-map-support "0.5.19" + +"@cucumber/message-streams@^2.0.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@cucumber/message-streams/-/message-streams-2.1.0.tgz#07a7a814ee7c39386a939d5afec2902f5199ffd2" + dependencies: + "@cucumber/messages" "^16.0.1" + +"@cucumber/messages@^16.0.0": + version "16.0.1" + resolved "https://registry.yarnpkg.com/@cucumber/messages/-/messages-16.0.1.tgz#8a9f9bb6ad0430d8ddd044dd49cb45ef37ee67b7" + dependencies: + "@types/uuid" "8.3.0" + class-transformer "0.4.0" + reflect-metadata "0.1.13" + uuid "8.3.2" + +"@cucumber/messages@^16.0.1": + version "16.0.1" + resolved "https://registry.yarnpkg.com/@cucumber/messages/-/messages-16.0.1.tgz#8a9f9bb6ad0430d8ddd044dd49cb45ef37ee67b7" + dependencies: + "@types/uuid" "8.3.0" + class-transformer "0.4.0" + reflect-metadata "0.1.13" + uuid "8.3.2" + +"@cucumber/pretty-formatter@^1.0.0-alpha.1": + version "1.0.0-alpha.1" + resolved "https://registry.yarnpkg.com/@cucumber/pretty-formatter/-/pretty-formatter-1.0.0-alpha.1.tgz#361eb972036c6cf114f2978b42c79c48ea800f0e" + dependencies: + ansi-styles "^5.0.0" + cli-table3 "^0.6.0" + figures "^3.2.0" + ts-dedent "^2.0.0" + +"@cucumber/tag-expressions@^3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@cucumber/tag-expressions/-/tag-expressions-3.0.1.tgz#ca0702342bc4234ad73d9de3f1bf97461c3b5eb7" + "@dump247/storybook-state@1.6.1": version "1.6.1" resolved "https://registry.yarnpkg.com/@dump247/storybook-state/-/storybook-state-1.6.1.tgz#ac805dbad22bba380ae4f74e741189ec6c68cd4a" @@ -1066,9 +1185,9 @@ global-agent "^2.0.2" global-tunnel-ng "^2.7.1" -"@electron/remote@^1.0.4": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@electron/remote/-/remote-1.2.0.tgz#772eb4c3ac17aaba5a9cf05a09092f6277f5671f" +"@electron/remote@^1.1.0": + version "1.2.2" + resolved "https://registry.yarnpkg.com/@electron/remote/-/remote-1.2.2.tgz#4c390a2e669df47af973c09eec106162a296c323" "@emotion/cache@^10.0.27", "@emotion/cache@^10.0.9": version "10.0.29" @@ -2065,6 +2184,10 @@ version "2.0.3" resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.3.tgz#9c088679876f374eb5983f150d4787aa6fb32d7e" +"@types/uuid@8.3.0": + version "8.3.0" + resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-8.3.0.tgz#215c231dff736d5ba92410e6d602050cce7e273f" + "@types/webpack-env@^1.15.0": version "1.15.3" resolved "https://registry.yarnpkg.com/@types/webpack-env/-/webpack-env-1.15.3.tgz#fb602cd4c2f0b7c0fb857e922075fdf677d25d84" @@ -2521,6 +2644,10 @@ ansi-styles@^4.0.0, ansi-styles@^4.1.0: dependencies: color-convert "^2.0.1" +ansi-styles@^5.0.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" + ansi-to-html@^0.6.11: version "0.6.14" resolved "https://registry.yarnpkg.com/ansi-to-html/-/ansi-to-html-0.6.14.tgz#65fe6d08bba5dd9db33f44a20aec331e0010dad8" @@ -3518,10 +3645,6 @@ bech32@^1.1.3, bech32@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9" -becke-ch--regex--s0-0-v1--base--pl--lib@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/becke-ch--regex--s0-0-v1--base--pl--lib/-/becke-ch--regex--s0-0-v1--base--pl--lib-1.4.0.tgz#429ceebbfa5f7e936e78d73fbdc7da7162b20e20" - beeper@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/beeper/-/beeper-1.1.1.tgz#e6d5ea8c5dad001304a70b22638447f69cb2f809" @@ -3606,7 +3729,7 @@ block-stream@*: dependencies: inherits "~2.0.0" -bluebird@^3.1.1, bluebird@^3.3.5, bluebird@^3.4.1, bluebird@^3.5.0, bluebird@^3.5.5: +bluebird@^3.1.1, bluebird@^3.3.5, bluebird@^3.5.0, bluebird@^3.5.5, bluebird@^3.7.2: version "3.7.2" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" @@ -4140,6 +4263,14 @@ caniuse-lite@^1.0.30001219: version "1.0.30001242" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001242.tgz#04201627abcd60dc89211f22cbe2347306cda46b" +capital-case@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/capital-case/-/capital-case-1.0.4.tgz#9d130292353c9249f6b00fa5852bee38a717e669" + dependencies: + no-case "^3.0.4" + tslib "^2.0.3" + upper-case-first "^2.0.2" + cardano-crypto.js@5.3.6-rc.6: version "5.3.6-rc.6" resolved "https://registry.yarnpkg.com/cardano-crypto.js/-/cardano-crypto.js-5.3.6-rc.6.tgz#855d247158a1ee220671522fb192bf4b90b90388" @@ -4367,6 +4498,10 @@ cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: inherits "^2.0.1" safe-buffer "^5.0.1" +class-transformer@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/class-transformer/-/class-transformer-0.4.0.tgz#b52144117b423c516afb44cc1c76dbad31c2165b" + class-utils@^0.3.5: version "0.3.6" resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" @@ -4416,7 +4551,7 @@ cli-spinners@^2.0.0: version "2.6.0" resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.6.0.tgz#36c7dc98fb6a9a76bd6238ec3f77e2425627e939" -cli-table3@0.5.1, cli-table3@^0.5.1: +cli-table3@0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.5.1.tgz#0252372d94dfc40dbd8df06005f48f31f656f202" dependencies: @@ -4425,6 +4560,15 @@ cli-table3@0.5.1, cli-table3@^0.5.1: optionalDependencies: colors "^1.1.2" +cli-table3@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.6.0.tgz#b7b1bc65ca8e7b5cef9124e13dc2b21e2ce4faee" + dependencies: + object-assign "^4.1.0" + string-width "^4.2.0" + optionalDependencies: + colors "^1.1.2" + cli-table@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/cli-table/-/cli-table-0.3.1.tgz#f53b05266a8b1a0b934b3d0821e6e2dc5914ae23" @@ -4627,11 +4771,15 @@ commander@2.17.x: version "2.17.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" +commander@7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" + commander@^2.15.0, commander@^2.19.0, commander@^2.20.0, commander@^2.8.1: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" -commander@^3.0.0, commander@^3.0.1: +commander@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.2.tgz#6837c3fb677ad9933d1cfba42dd14d5117d6b39e" @@ -4647,6 +4795,10 @@ commander@^6.0.0: version "6.1.0" resolved "https://registry.yarnpkg.com/commander/-/commander-6.1.0.tgz#f8d722b78103141006b66f4c7ba1e97315ba75bc" +commander@^7.0.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" + commander@~2.19.0: version "2.19.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" @@ -4947,6 +5099,10 @@ create-react-context@0.3.0, create-react-context@^0.3.0: gud "^1.0.0" warning "^4.0.3" +create-require@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + cross-env@7.0.2: version "7.0.2" resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.2.tgz#bd5ed31339a93a3418ac4f3ca9ca3403082ae5f9" @@ -5159,13 +5315,6 @@ csv-stringify@5.5.1: version "5.5.1" resolved "https://registry.yarnpkg.com/csv-stringify/-/csv-stringify-5.5.1.tgz#f42cdd379b0f7f142933a11f674b1a91ebd0fcd0" -cucumber-expressions@^8.1.0: - version "8.3.0" - resolved "https://registry.yarnpkg.com/cucumber-expressions/-/cucumber-expressions-8.3.0.tgz#67f48307dc8f53540c7f3530ad7b744aa918dd5c" - dependencies: - becke-ch--regex--s0-0-v1--base--pl--lib "^1.4.0" - xregexp "^4.2.4" - cucumber-html-reporter@5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/cucumber-html-reporter/-/cucumber-html-reporter-5.2.0.tgz#2094a6b73880fd11beab64f1bd3b2bfb1dfe27c2" @@ -5180,50 +5329,6 @@ cucumber-html-reporter@5.2.0: open "^6.4.0" uuid "^3.3.3" -cucumber-pretty@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/cucumber-pretty/-/cucumber-pretty-6.0.0.tgz#1331deae9663020f6835d60c0aa3a84637baaa4d" - dependencies: - cli-table3 "^0.5.1" - colors "^1.4.0" - figures "^3.0.0" - -cucumber-tag-expressions@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/cucumber-tag-expressions/-/cucumber-tag-expressions-2.0.3.tgz#5525d60fbecb3fa2707051ace27004e0512e700e" - -cucumber@6.0.5: - version "6.0.5" - resolved "https://registry.yarnpkg.com/cucumber/-/cucumber-6.0.5.tgz#cdc752ad18b551bcf7bc92774c925302f4408714" - dependencies: - assertion-error-formatter "^3.0.0" - bluebird "^3.4.1" - cli-table3 "^0.5.1" - colors "^1.1.2" - commander "^3.0.1" - cucumber-expressions "^8.1.0" - cucumber-tag-expressions "^2.0.2" - duration "^0.2.1" - escape-string-regexp "^2.0.0" - figures "^3.0.0" - gherkin "5.0.0" - glob "^7.1.3" - indent-string "^4.0.0" - is-generator "^1.0.2" - is-stream "^2.0.0" - knuth-shuffle-seeded "^1.0.6" - lodash "^4.17.14" - mz "^2.4.0" - progress "^2.0.0" - resolve "^1.3.3" - serialize-error "^4.1.0" - stack-chain "^2.0.0" - stacktrace-js "^2.0.0" - string-argv "^0.3.0" - title-case "^2.1.1" - util-arity "^1.0.2" - verror "^1.9.0" - cuint@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/cuint/-/cuint-0.2.2.tgz#408086d409550c2631155619e9fa7bcadc3b991b" @@ -5846,13 +5951,17 @@ duplexify@^3.4.2, duplexify@^3.6.0: readable-stream "^2.0.0" stream-shift "^1.0.0" -duration@^0.2.1: +duration@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/duration/-/duration-0.2.2.tgz#ddf149bc3bc6901150fe9017111d016b3357f529" dependencies: d "1" es5-ext "~0.10.46" +durations@^3.4.2: + version "3.4.2" + resolved "https://registry.yarnpkg.com/durations/-/durations-3.4.2.tgz#1de230454373cccfecab927de0bebae2295301db" + each-props@^1.3.0: version "1.3.2" resolved "https://registry.yarnpkg.com/each-props/-/each-props-1.3.2.tgz#ea45a414d16dd5cfa419b1a81720d5ca06892333" @@ -5889,20 +5998,13 @@ ejs@^2.7.4: version "2.7.4" resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.7.4.tgz#48661287573dcc53e366c7a1ae52c3a120eec9ba" -electron-chromedriver@13.0.0: +electron-chromedriver@13.0.0, electron-chromedriver@^13.0.0: version "13.0.0" resolved "https://registry.yarnpkg.com/electron-chromedriver/-/electron-chromedriver-13.0.0.tgz#a553af7743215ac463e1e40e0db14d4a542ef762" dependencies: "@electron/get" "^1.12.4" extract-zip "^2.0.0" -electron-chromedriver@^12.0.0: - version "12.0.0" - resolved "https://registry.yarnpkg.com/electron-chromedriver/-/electron-chromedriver-12.0.0.tgz#55bdc451b938b384642d613a05eadacb1fe476ee" - dependencies: - "@electron/get" "^1.12.4" - extract-zip "^2.0.0" - electron-connect@0.6.3: version "0.6.3" resolved "https://registry.yarnpkg.com/electron-connect/-/electron-connect-0.6.3.tgz#2e0d361cb1c2b0b88e9bd385732882578b055b6d" @@ -6327,10 +6429,6 @@ escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1 version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" -escape-string-regexp@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" - escape-string-regexp@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" @@ -7004,7 +7102,7 @@ figures@^2.0.0: dependencies: escape-string-regexp "^1.0.5" -figures@^3.0.0: +figures@^3.0.0, figures@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" dependencies: @@ -7620,10 +7718,6 @@ getpass@^0.1.1: dependencies: assert-plus "^1.0.0" -gherkin@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/gherkin/-/gherkin-5.0.0.tgz#96def41198ec3908258b511af74f655a2764d2a1" - github-from-package@0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/github-from-package/-/github-from-package-0.0.0.tgz#97fb5d96bfde8973313f20e8288ef9a167fa64ce" @@ -8932,7 +9026,7 @@ is-function@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.2.tgz#4f097f30abf6efadac9833b17ca5dc03f8144e08" -is-generator@^1.0.2: +is-generator@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/is-generator/-/is-generator-1.0.3.tgz#c14c21057ed36e328db80347966c693f886389f3" @@ -10295,6 +10389,12 @@ lower-case@^2.0.1: dependencies: tslib "^1.10.0" +lower-case@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-2.0.2.tgz#6fa237c63dbdc4a82ca0fd882e4722dc5e634e28" + dependencies: + tslib "^2.0.3" + lowercase-keys@^1.0.0, lowercase-keys@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" @@ -10968,7 +11068,7 @@ mute-stream@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" -mz@^2.4.0: +mz@^2.7.0: version "2.7.0" resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" dependencies: @@ -11055,6 +11155,13 @@ no-case@^3.0.3: lower-case "^2.0.1" tslib "^1.10.0" +no-case@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/no-case/-/no-case-3.0.4.tgz#d361fd5c9800f558551a8369fc0dcd4662b6124d" + dependencies: + lower-case "^2.0.2" + tslib "^2.0.3" + node-abi@^2.11.0, node-abi@^2.21.0, node-abi@^2.7.0: version "2.30.0" resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-2.30.0.tgz#8be53bf3e7945a34eea10e0fc9a5982776cf550b" @@ -13607,6 +13714,10 @@ reduce-function-call@^1.0.1: dependencies: balanced-match "^1.0.0" +reflect-metadata@0.1.13: + version "0.1.13" + resolved "https://registry.yarnpkg.com/reflect-metadata/-/reflect-metadata-0.1.13.tgz#67ae3ca57c972a2aa1642b10fe363fe32d49dc08" + refractor@^2.4.1: version "2.10.1" resolved "https://registry.yarnpkg.com/refractor/-/refractor-2.10.1.tgz#166c32f114ed16fd96190ad21d5193d3afc7d34e" @@ -13660,6 +13771,16 @@ regex-not@^1.0.0, regex-not@^1.0.2: extend-shallow "^3.0.2" safe-regex "^1.1.0" +regexp-match-indices@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/regexp-match-indices/-/regexp-match-indices-1.0.2.tgz#cf20054a6f7d5b3e116a701a7b00f82889d10da6" + dependencies: + regexp-tree "^0.1.11" + +regexp-tree@^0.1.11: + version "0.1.24" + resolved "https://registry.yarnpkg.com/regexp-tree/-/regexp-tree-0.1.24.tgz#3d6fa238450a4d66e5bc9c4c14bb720e2196829d" + regexp.prototype.flags@^1.2.0, regexp.prototype.flags@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz#7aba89b3c13a64509dabcf3ca8d9fbb9bdf5cb75" @@ -13927,6 +14048,12 @@ resolve-pathname@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-pathname/-/resolve-pathname-3.0.0.tgz#99d02224d3cf263689becbb393bc560313025dcd" +resolve-pkg@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/resolve-pkg/-/resolve-pkg-2.0.0.tgz#ac06991418a7623edc119084edc98b0e6bf05a41" + dependencies: + resolve-from "^5.0.0" + resolve-url@0.2.1, resolve-url@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" @@ -13935,13 +14062,13 @@ resolve@1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" -resolve@^1.1.5, resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.11.0, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.17.0, resolve@^1.3.2, resolve@^1.3.3, resolve@^1.4.0, resolve@^1.8.1: +resolve@^1.1.5, resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.11.0, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.17.0, resolve@^1.3.2, resolve@^1.4.0, resolve@^1.8.1: version "1.17.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" dependencies: path-parse "^1.0.6" -resolve@^1.20.0: +resolve@^1.19.0, resolve@^1.20.0: version "1.20.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" dependencies: @@ -14024,7 +14151,7 @@ rimraf@2.6.3: dependencies: glob "^7.1.3" -rimraf@3.0.2, rimraf@^3.0.2: +rimraf@3.0.2, rimraf@^3.0.0, rimraf@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" dependencies: @@ -14349,12 +14476,6 @@ sequencify@~0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/sequencify/-/sequencify-0.0.7.tgz#90cff19d02e07027fd767f5ead3e7b95d1e7380c" -serialize-error@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/serialize-error/-/serialize-error-4.1.0.tgz#63e1e33ede20bcd89d9f0528ea4c15fbf0f2b78a" - dependencies: - type-fest "^0.3.0" - serialize-error@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/serialize-error/-/serialize-error-5.0.0.tgz#a7ebbcdb03a5d71a6ed8461ffe0fc1a1afed62ac" @@ -14795,13 +14916,13 @@ spectron-fake-dialog@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/spectron-fake-dialog/-/spectron-fake-dialog-0.0.1.tgz#ffd5cfadcac64eb957340389f047529c4a68e23a" -spectron@14.0.0: - version "14.0.0" - resolved "https://registry.yarnpkg.com/spectron/-/spectron-14.0.0.tgz#c8160e38c30dcda39734f3e8e809162dc0805d14" +spectron@15.0.0: + version "15.0.0" + resolved "https://registry.yarnpkg.com/spectron/-/spectron-15.0.0.tgz#9c0e254b2be3f0725a81b8343092b9d0108439c7" dependencies: - "@electron/remote" "^1.0.4" + "@electron/remote" "^1.1.0" dev-null "^0.1.1" - electron-chromedriver "^12.0.0" + electron-chromedriver "^13.0.0" got "^11.8.0" split "^1.0.1" webdriverio "^6.9.1" @@ -14888,7 +15009,7 @@ stacktrace-gps@^3.0.4: source-map "0.5.6" stackframe "^1.1.1" -stacktrace-js@^2.0.0: +stacktrace-js@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/stacktrace-js/-/stacktrace-js-2.0.2.tgz#4ca93ea9f494752d55709a081d400fdaebee897b" dependencies: @@ -15012,7 +15133,7 @@ strict-uri-encode@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" -string-argv@^0.3.0: +string-argv@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da" @@ -15657,13 +15778,6 @@ tippy.js@^6.3.0: dependencies: "@popperjs/core" "^2.8.3" -title-case@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/title-case/-/title-case-2.1.1.tgz#3e127216da58d2bc5becf137ab91dae3a7cd8faa" - dependencies: - no-case "^2.2.0" - upper-case "^1.0.3" - tmp-promise@^1.0.5: version "1.1.0" resolved "https://registry.yarnpkg.com/tmp-promise/-/tmp-promise-1.1.0.tgz#bb924d239029157b9bc1d506a6aa341f8b13e64c" @@ -15683,6 +15797,12 @@ tmp@^0.0.33: dependencies: os-tmpdir "~1.0.2" +tmp@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.1.tgz#8457fc3037dcf4719c251367a1af6500ee1ccf14" + dependencies: + rimraf "^3.0.0" + tmpl@1.0.x: version "1.0.4" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" @@ -15878,6 +15998,10 @@ ts-dedent@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/ts-dedent/-/ts-dedent-1.2.0.tgz#6aa2229d837159bb6d635b6b233002423b91e0b0" +ts-dedent@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/ts-dedent/-/ts-dedent-2.2.0.tgz#39e4bd297cd036292ae2394eb3412be63f563bb5" + ts-essentials@^2.0.3: version "2.0.12" resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-2.0.12.tgz#c9303f3d74f75fa7528c3d49b80e089ab09d8745" @@ -15914,6 +16038,10 @@ tslib@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.1.tgz#410eb0d113e5b6356490eec749603725b021b43e" +tslib@^2.0.3: + version "2.3.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" + tslib@^2.1.0: version "2.3.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.0.tgz#803b8cdab3e12ba581a4ca41c8839bbb0dacb09e" @@ -15964,10 +16092,6 @@ type-fest@^0.20.2: version "0.20.2" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" -type-fest@^0.3.0: - version "0.3.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.3.1.tgz#63d00d204e059474fe5e1b7c011112bbd1dc29e1" - type-fest@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.6.0.tgz#8d2a2370d3df886eb5c90ada1c5bf6188acf838b" @@ -16317,7 +16441,13 @@ update-notifier@^4.0.0, update-notifier@^4.1.0: semver-diff "^3.1.1" xdg-basedir "^4.0.0" -upper-case@^1.0.3, upper-case@^1.1.1: +upper-case-first@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/upper-case-first/-/upper-case-first-2.0.2.tgz#992c3273f882abd19d1e02894cc147117f844324" + dependencies: + tslib "^2.0.3" + +upper-case@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598" @@ -16420,7 +16550,7 @@ utf8-byte-length@^1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/utf8-byte-length/-/utf8-byte-length-1.0.4.tgz#f45f150c4c66eee968186505ab93fcbb8ad6bf61" -util-arity@^1.0.2: +util-arity@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/util-arity/-/util-arity-1.1.0.tgz#59d01af1fdb3fede0ac4e632b0ab5f6ce97c9330" @@ -16464,14 +16594,14 @@ utils-merge@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" +uuid@8.3.2, uuid@^8.0.0: + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + uuid@^3.3.2, uuid@^3.3.3: version "3.4.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" -uuid@^8.0.0: - version "8.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" - v8-compile-cache@^2.0.3, v8-compile-cache@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz#54bc3cdd43317bca91e35dcaf305b1a7237de745" @@ -16523,7 +16653,7 @@ vary@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" -verror@1.10.0, verror@^1.9.0: +verror@1.10.0, verror@^1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" dependencies: @@ -17052,12 +17182,6 @@ xmldom@0.1.x: version "0.1.31" resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.1.31.tgz#b76c9a1bd9f0a9737e5a72dc37231cf38375e2ff" -xregexp@^4.2.4: - version "4.3.0" - resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-4.3.0.tgz#7e92e73d9174a99a59743f67a4ce879a04b5ae50" - dependencies: - "@babel/runtime-corejs3" "^7.8.3" - "xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0, xtend@^4.0.1, xtend@^4.0.2, xtend@~4.0.0, xtend@~4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" From b3d951c5facc07e42e0529232f92dbc55b44283d Mon Sep 17 00:00:00 2001 From: Daniel Main Date: Tue, 21 Sep 2021 10:54:46 +0200 Subject: [PATCH 33/37] Fix wrong path for starting electron --- tests/setup-e2e.js | 4 +--- yarn.lock | 38 +++++++++----------------------------- 2 files changed, 10 insertions(+), 32 deletions(-) diff --git a/tests/setup-e2e.js b/tests/setup-e2e.js index 4ce05d0481..def435070b 100644 --- a/tests/setup-e2e.js +++ b/tests/setup-e2e.js @@ -55,13 +55,11 @@ const defaultWalletKeyFilePath = path.resolve( const startApp = async () => { const app = new Application({ path: electronPath, - args: ['./dist/main/index.js'], + args: [path.join(__dirname, '..')], requireName: 'spectronRequire', env: Object.assign({}, process.env, { NODE_ENV: TEST, }), - contextIsolation: false, - enableRemoteModule: false, startTimeout: DEFAULT_TIMEOUT, waitTimeout: DEFAULT_TIMEOUT, chromeDriverArgs: ["--verbose"], diff --git a/yarn.lock b/yarn.lock index 806d1f1453..ffa4addb77 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1041,9 +1041,9 @@ dependencies: regexp-match-indices "1.0.2" -"@cucumber/cucumber@^7.3.1": +"@cucumber/cucumber@7.3.1": version "7.3.1" - resolved "https://registry.yarnpkg.com/@cucumber/cucumber/-/cucumber-7.3.1.tgz#1339abc92044f865043eceb2993da15cee0cd255" + resolved "https://registry.npmjs.org/@cucumber/cucumber/-/cucumber-7.3.1.tgz#1339abc92044f865043eceb2993da15cee0cd255" dependencies: "@cucumber/create-meta" "^5.0.0" "@cucumber/cucumber-expressions" "^12.1.1" @@ -1089,14 +1089,7 @@ commander "7.2.0" source-map-support "0.5.19" -"@cucumber/gherkin@^19.0.1": - version "19.0.3" - resolved "https://registry.yarnpkg.com/@cucumber/gherkin/-/gherkin-19.0.3.tgz#61036ca4940e66f8a787be5f92ce229ae3815ebf" - dependencies: - "@cucumber/message-streams" "^2.0.0" - "@cucumber/messages" "^16.0.1" - -"@cucumber/gherkin@^19.0.3": +"@cucumber/gherkin@^19.0.1", "@cucumber/gherkin@^19.0.3": version "19.0.3" resolved "https://registry.yarnpkg.com/@cucumber/gherkin/-/gherkin-19.0.3.tgz#61036ca4940e66f8a787be5f92ce229ae3815ebf" dependencies: @@ -1117,7 +1110,7 @@ dependencies: "@cucumber/messages" "^16.0.1" -"@cucumber/messages@^16.0.0": +"@cucumber/messages@^16.0.0", "@cucumber/messages@^16.0.1": version "16.0.1" resolved "https://registry.yarnpkg.com/@cucumber/messages/-/messages-16.0.1.tgz#8a9f9bb6ad0430d8ddd044dd49cb45ef37ee67b7" dependencies: @@ -1126,18 +1119,9 @@ reflect-metadata "0.1.13" uuid "8.3.2" -"@cucumber/messages@^16.0.1": - version "16.0.1" - resolved "https://registry.yarnpkg.com/@cucumber/messages/-/messages-16.0.1.tgz#8a9f9bb6ad0430d8ddd044dd49cb45ef37ee67b7" - dependencies: - "@types/uuid" "8.3.0" - class-transformer "0.4.0" - reflect-metadata "0.1.13" - uuid "8.3.2" - -"@cucumber/pretty-formatter@^1.0.0-alpha.1": +"@cucumber/pretty-formatter@1.0.0-alpha.1": version "1.0.0-alpha.1" - resolved "https://registry.yarnpkg.com/@cucumber/pretty-formatter/-/pretty-formatter-1.0.0-alpha.1.tgz#361eb972036c6cf114f2978b42c79c48ea800f0e" + resolved "https://registry.npmjs.org/@cucumber/pretty-formatter/-/pretty-formatter-1.0.0-alpha.1.tgz#361eb972036c6cf114f2978b42c79c48ea800f0e" dependencies: ansi-styles "^5.0.0" cli-table3 "^0.6.0" @@ -4771,7 +4755,7 @@ commander@2.17.x: version "2.17.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" -commander@7.2.0: +commander@7.2.0, commander@^7.0.0: version "7.2.0" resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" @@ -4795,10 +4779,6 @@ commander@^6.0.0: version "6.1.0" resolved "https://registry.yarnpkg.com/commander/-/commander-6.1.0.tgz#f8d722b78103141006b66f4c7ba1e97315ba75bc" -commander@^7.0.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" - commander@~2.19.0: version "2.19.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" @@ -6506,9 +6486,9 @@ eslint-import-resolver-node@^0.3.4: debug "^2.6.9" resolve "^1.13.1" -eslint-import-resolver-webpack@^0.13.1: +eslint-import-resolver-webpack@0.13.1: version "0.13.1" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-webpack/-/eslint-import-resolver-webpack-0.13.1.tgz#6d2fb928091daf2da46efa1e568055555b2de902" + resolved "https://registry.npmjs.org/eslint-import-resolver-webpack/-/eslint-import-resolver-webpack-0.13.1.tgz#6d2fb928091daf2da46efa1e568055555b2de902" dependencies: array-find "^1.0.0" debug "^3.2.7" From a54f6e3d323dea3a65a65d8bc764ef122cac5fa0 Mon Sep 17 00:00:00 2001 From: Manus McCole Date: Tue, 21 Sep 2021 11:58:01 +0100 Subject: [PATCH 34/37] Code refactor.Adding condition for testnet --- .../settings/e2e/features/stakepool-settings.feature | 5 +++-- tests/settings/e2e/steps/stakepool-settings.js | 11 +++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/tests/settings/e2e/features/stakepool-settings.feature b/tests/settings/e2e/features/stakepool-settings.feature index 613c05a751..d504854f57 100644 --- a/tests/settings/e2e/features/stakepool-settings.feature +++ b/tests/settings/e2e/features/stakepool-settings.feature @@ -1,4 +1,4 @@ -@e2e +@e2e @watch Feature: Stake-pool server settings Background: @@ -9,7 +9,8 @@ Feature: Stake-pool server settings Scenario: Navigating to Stake-pool settings screen and selecting custom stake-pool server Given I am on the General Settings "stake-pools" screen - When custom server is the default option + When I open stake pool server dropdown + When I select custom server And The smash server input textBox is visible And And I enter a custom server URL as custom server option And I focus the stake-pool custom server input box submit button and then click it diff --git a/tests/settings/e2e/steps/stakepool-settings.js b/tests/settings/e2e/steps/stakepool-settings.js index 2c09281f67..8f01a2e926 100644 --- a/tests/settings/e2e/steps/stakepool-settings.js +++ b/tests/settings/e2e/steps/stakepool-settings.js @@ -1,5 +1,6 @@ import { When, Then } from 'cucumber'; import enCopy from '../../../../source/renderer/app/i18n/locales/en-US.json'; +import { environment } from '../../../../source/main/environment'; const CUSTOM_SERVER_TEXT = enCopy['settings.stakePools.smash.select.customServer']; const INVALID_SMASH_SERVER_TEXT = enCopy['api.errors.invalidSmashServer']; @@ -12,7 +13,6 @@ const CUSTOM_SERVER_DROPDOWN_OPTION = `//*[@class="SimpleInput_customValueWrappe const DAEDALUS_TOP_BAR_LOGO = '//*[@class="TopBar_topBar TopBar_withoutWallet"]'; const NOT_A_VALID_SMASH_SERVER_ERROR_MESSAGE_ACTIVATED = `//*[@class="InlineEditingInput_errorMessage" and text()="${INVALID_SMASH_SERVER_TEXT}"]`; const OFF_CHAIN_METADATA_SERVER_SMASH_LABEL = `//*[contains(text(), "${OFF_CHAIN_METADATA_SERVER_TEXT}")]`; -const SERVER_URL = "https://smash.cardano-testnet.iohkdev.io/"; const SMASH_SERVER_URL_INPUT_BOX = `//*[@label="${SMASH_SERVER_URL_TEXT}"]`; const STAKE_POOL_CUSTOM_SERVER_INPUT_BOX_SUBMIT_BUTTON = '//*[@class="InlineEditingInput_button InlineEditingInput_okButton SimpleButton_root ButtonOverrides_root"]'; const STAKE_POOL_CUSTOM_SERVER_INPUT_BOX_X_BUTTON = '//*[@class="InlineEditingInput_button InlineEditingInput_cancelButton SimpleButton_root ButtonOverrides_root"]'; @@ -20,7 +20,9 @@ const STAKE_POOL_SERVER_DROPDOWN = '//*[@class="SimpleFormField_inputWrapper"]'; const STAKE_POOL_SERVER_DROPDOWN_CUSTOM_OPTION = `//*[@class="ScrollbarsCustom-Content"]//span[text()="${CUSTOM_SERVER_TEXT}"]`; const STAKE_POOLS_SUBMENU_SETTINGS = `//*[@class="SettingsMenu_component"]//button[text()="${STAKE_POOL_TEXT}"]`; -When(/^custom server is the default option$/, function() { +const { IsTestnet } = environment; + +When(/^I select custom server$/, function() { return this.waitAndClick(CUSTOM_SERVER_DROPDOWN_OPTION); }); @@ -45,6 +47,11 @@ Then(/^The smash server input textBox is visible$/, function() { }); When(/^And I enter a custom server URL as custom server option$/, function() { + let SERVER_URL = "https://smash.cardano-testnet.iohkdev.io/"; + if (IsTestnet) { + SERVER_URL = "https://smash.cardano-mainnet.iohk.io"; + } + this.client.setValue(SMASH_SERVER_URL_INPUT_BOX, SERVER_URL); }); From 9c723b96ed7f32d709352acab3fef0d2279b3e2a Mon Sep 17 00:00:00 2001 From: Manus McCole Date: Tue, 21 Sep 2021 15:41:27 +0100 Subject: [PATCH 35/37] Minor formatting --- tests/settings/e2e/features/stakepool-settings.feature | 2 +- tests/settings/e2e/steps/stakepool-settings.js | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/settings/e2e/features/stakepool-settings.feature b/tests/settings/e2e/features/stakepool-settings.feature index d504854f57..f91fdbddf8 100644 --- a/tests/settings/e2e/features/stakepool-settings.feature +++ b/tests/settings/e2e/features/stakepool-settings.feature @@ -1,4 +1,4 @@ -@e2e @watch +@e2e Feature: Stake-pool server settings Background: diff --git a/tests/settings/e2e/steps/stakepool-settings.js b/tests/settings/e2e/steps/stakepool-settings.js index c0dffb0493..c5d490c4fd 100644 --- a/tests/settings/e2e/steps/stakepool-settings.js +++ b/tests/settings/e2e/steps/stakepool-settings.js @@ -2,6 +2,8 @@ import { When, Then } from '@cucumber/cucumber'; import enCopy from '../../../../source/renderer/app/i18n/locales/en-US.json'; import { environment } from '../../../../source/main/environment'; +const { IsTestnet } = environment; + const CUSTOM_SERVER_TEXT = enCopy['settings.stakePools.smash.select.customServer']; const INVALID_SMASH_SERVER_TEXT = enCopy['api.errors.invalidSmashServer']; const OFF_CHAIN_METADATA_SERVER_TEXT = enCopy['settings.stakePools.smash.select.label']; @@ -20,8 +22,6 @@ const STAKE_POOL_SERVER_DROPDOWN = '//*[@class="SimpleFormField_inputWrapper"]'; const STAKE_POOL_SERVER_DROPDOWN_CUSTOM_OPTION = `//*[@class="ScrollbarsCustom-Content"]//span[text()="${CUSTOM_SERVER_TEXT}"]`; const STAKE_POOLS_SUBMENU_SETTINGS = `//*[@class="SettingsMenu_component"]//button[text()="${STAKE_POOL_TEXT}"]`; -const { IsTestnet } = environment; - When(/^I select custom server$/, function() { return this.waitAndClick(CUSTOM_SERVER_DROPDOWN_OPTION); }); @@ -51,7 +51,6 @@ When(/^And I enter a custom server URL as custom server option$/, function() { if (IsTestnet) { SERVER_URL = "https://smash.cardano-mainnet.iohk.io"; } - this.client.setValue(SMASH_SERVER_URL_INPUT_BOX, SERVER_URL); }); From f5aee024d9dad4753ad9d08bf523e939c7ced290 Mon Sep 17 00:00:00 2001 From: Daniel Main Date: Wed, 22 Sep 2021 15:30:03 +0200 Subject: [PATCH 36/37] Starting Spectron like the official documentation suggests --- tests/setup-e2e.js | 76 ++++++++++++++++++++++------------------------ 1 file changed, 37 insertions(+), 39 deletions(-) diff --git a/tests/setup-e2e.js b/tests/setup-e2e.js index def435070b..4573270c95 100644 --- a/tests/setup-e2e.js +++ b/tests/setup-e2e.js @@ -33,11 +33,29 @@ global.environment = environment; /* eslint-disable consistent-return */ declare var daedalus: Daedalus; -const context = {}; + +const application = new Application({ + path: electronPath, + args: [path.join(__dirname, '..')], + requireName: 'spectronRequire', + env: Object.assign({}, process.env, { + NODE_ENV: TEST, + }), + startTimeout: DEFAULT_TIMEOUT, + waitTimeout: DEFAULT_TIMEOUT, + chromeDriverArgs: ["--verbose"], + + chromeDriverLogPath: path.join( + __dirname, + '../logs/chrome-driver.log' + ), + webdriverLogPath: path.join(__dirname, '../logs/webdriver'), +}); + let scenariosCount = 0; const printMainProcessLogs = () => - context.app.client.getMainProcessLogs().then(logs => { + application.client.getMainProcessLogs().then(logs => { // eslint-disable-next-line no-console console.log('========= DAEDALUS LOGS ========='); // eslint-disable-next-line no-console @@ -52,33 +70,6 @@ const defaultWalletKeyFilePath = path.resolve( './wallets/e2e/documents/default-wallet.key' ); -const startApp = async () => { - const app = new Application({ - path: electronPath, - args: [path.join(__dirname, '..')], - requireName: 'spectronRequire', - env: Object.assign({}, process.env, { - NODE_ENV: TEST, - }), - startTimeout: DEFAULT_TIMEOUT, - waitTimeout: DEFAULT_TIMEOUT, - chromeDriverArgs: ["--verbose"], - chromeDriverLogPath: path.join( - __dirname, - '../logs/chrome-driver.log' - ), - webdriverLogPath: path.join(__dirname, '../logs/webdriver'), - }); - fakeDialog.apply(app); - await app.start(); - // TODO: develop mock that accept custom value to return - fakeDialog.mock([ - { method: 'showOpenDialog', value: [defaultWalletKeyFilePath] }, - ]); - await app.client.waitUntilWindowLoaded(); - return app; -}; - // The cucumber timeout should be high (and never reached in best case) // because the errors thrown by webdriver.io timeouts are more descriptive // and helpful than "this step timed out after 5 seconds" messages @@ -90,7 +81,14 @@ function getTagNames(testCase) { // Boot up the electron app before all features BeforeAll({ timeout: 5 * 60 * 1000 }, async () => { - context.app = await startApp(); + await application.start(); + fakeDialog.apply(application); + // TODO: develop mock that accept custom value to return + fakeDialog.mock([ + { method: 'showOpenDialog', value: [defaultWalletKeyFilePath] }, + ]); + await application.client.waitUntilWindowLoaded(); + return true; }); // Skip / Execute test depending on node integration @@ -103,9 +101,9 @@ Before(async function(testCase) { // Make the electron app accessible in each scenario context Before({ tags: '@e2e', timeout: DEFAULT_TIMEOUT * 2 }, async function(testCase) { const tags = getTagNames(testCase); - this.app = context.app; - this.client = context.app.client; - this.browserWindow = context.app.browserWindow; + this.app = application; + this.client = application.client; + this.browserWindow = application.browserWindow; // Set timeouts of various operations: @@ -195,8 +193,8 @@ Before({ tags: '@e2e' }, function() { // this ensures that the spectron instance of the app restarts // after the node update acceptance test shuts it down via 'kill-process' // eslint-disable-next-line prefer-arrow-callback -After({ tags: '@restartApp' }, async function() { - context.app = await startApp(); +After({ tags: '@restartApp' }, () => { + return application.stop(); }); // this ensures that the reset-backend call successfully executes @@ -218,7 +216,7 @@ After({ tags: '@e2e' }, async function({ sourceLocation, result }) { if (result.status === 'failed') { const testName = getTestNameFromTestFile(sourceLocation.uri); const file = generateScreenshotFilePath(testName); - await saveScreenshot(context.app, file); + await saveScreenshot(application, file); await printMainProcessLogs(); } }); @@ -233,13 +231,13 @@ After({ tags: '@rewardsCsv' }, async function() { // eslint-disable-next-line prefer-arrow-callback AfterAll(async function() { - const allWindowsClosed = (await context.app.client.getWindowCount()) === 0; - if (allWindowsClosed || !context.app.running) return; + const allWindowsClosed = (await application.client.getWindowCount()) === 0; + if (allWindowsClosed || !application.running) return; if (scenariosCount === 0) { await printMainProcessLogs(); } if (process.env.KEEP_APP_AFTER_TESTS === 'true') { return; } - return context.app.stop(); + return application.stop(); }); From fdcff173b5a8267d7ec76d5944cee019cfadf690 Mon Sep 17 00:00:00 2001 From: Daniel Main Date: Tue, 17 Jan 2023 15:12:14 +0100 Subject: [PATCH 37/37] Renamed all js files to ts --- tests/_utils/{TestDecorator.js => TestDecorator.ts} | 0 tests/addresses/e2e/steps/{addresses.js => addresses.ts} | 0 tests/app/e2e/steps/{about-dialog.js => about-dialog.ts} | 0 .../{app-version-difference.js => app-version-difference.ts} | 0 tests/app/e2e/steps/{cardano-node.js => cardano-node.ts} | 0 tests/app/e2e/steps/{daedalus-process.js => daedalus-process.ts} | 0 .../steps/{data-layer-migration.js => data-layer-migration.ts} | 0 tests/app/e2e/steps/{helpers.js => helpers.ts} | 0 tests/app/e2e/steps/{inject-fault.js => inject-fault.ts} | 0 .../steps/{local-time-difference.js => local-time-difference.ts} | 0 tests/app/e2e/steps/{no-disk-space.js => no-disk-space.ts} | 0 tests/app/e2e/steps/{node-restart.js => node-restart.ts} | 0 ...necting-notification.js => trouble-connecting-notification.ts} | 0 ...le-syncing-notification.js => trouble-syncing-notification.ts} | 0 tests/assets/unit/{assets.spec.js => assets.spec.ts} | 0 tests/common/e2e/steps/{config.js => config.ts} | 0 tests/common/e2e/steps/{helpers.js => helpers.ts} | 0 tests/common/unit/{networks.spec.js => networks.spec.ts} | 0 ...orm-validation.steps.js => mnemonics-form-validation.steps.ts} | 0 .../e2e/steps/{delegation-pending.js => delegation-pending.ts} | 0 tests/delegation/e2e/steps/{delegation.js => delegation.ts} | 0 tests/delegation/e2e/steps/{helpers.js => helpers.ts} | 0 tests/delegation/e2e/steps/{rewards.js => rewards.ts} | 0 tests/delegation/e2e/steps/{stake-pools.js => stake-pools.ts} | 0 .../e2e/steps/{general-settings.js => general-settings.ts} | 0 tests/navigation/e2e/steps/{helpers.js => helpers.ts} | 0 tests/navigation/e2e/steps/{sidebar.js => sidebar.ts} | 0 tests/news/e2e/steps/{newsfeed-steps.js => newsfeed-steps.ts} | 0 ...{paper-wallets-certificate.js => paper-wallets-certificate.ts} | 0 tests/{reporter.js => reporter.ts} | 0 tests/settings/e2e/steps/{basic-setup.js => basic-setup.ts} | 0 ...{currency-display-settings.js => currency-display-settings.ts} | 0 tests/settings/e2e/steps/{custom-formats.js => custom-formats.ts} | 0 .../e2e/steps/{general-settings.js => general-settings.ts} | 0 tests/settings/e2e/steps/{helpers.js => helpers.ts} | 0 .../settings/e2e/steps/{select-language.js => select-language.ts} | 0 tests/settings/e2e/steps/{settings.js => settings.ts} | 0 .../e2e/steps/{stakepool-settings.js => stakepool-settings.ts} | 0 tests/settings/e2e/steps/{terms-of-use.js => terms-of-use.ts} | 0 tests/settings/unit/steps/{file-names.js => file-names.ts} | 0 tests/{setup-common.js => setup-common.ts} | 0 tests/{setup-e2e.js => setup-e2e.ts} | 0 tests/transactions/e2e/steps/{transactions.js => transactions.ts} | 0 tests/transactions/e2e/steps/{utxos.js => utxos.ts} | 0 tests/transactions/unit/steps/{helpers.js => helpers.ts} | 0 tests/transactions/unit/steps/{utxos-chart.js => utxos-chart.ts} | 0 tests/{types.js => types.ts} | 0 ...ce-wallets-notification.js => balance-wallets-notification.ts} | 0 tests/wallets/e2e/steps/{create-wallet.js => create-wallet.ts} | 0 tests/wallets/e2e/steps/{delete-wallet.js => delete-wallet.ts} | 0 tests/wallets/e2e/steps/{helpers.js => helpers.ts} | 0 ...mport-and-migrate-wallets.js => import-and-migrate-wallets.ts} | 0 ...erification-steps.js => recovery-phrase-verification-steps.ts} | 0 tests/wallets/e2e/steps/{restore-wallet.js => restore-wallet.ts} | 0 .../steps/{transfer-funds-wizard.js => transfer-funds-wizard.ts} | 0 .../steps/{wallet-not-responding.js => wallet-not-responding.ts} | 0 tests/wallets/e2e/steps/{wallets-limit.js => wallets-limit.ts} | 0 .../e2e/steps/{wallets-ordering.js => wallets-ordering.ts} | 0 tests/wallets/e2e/steps/{wallets.js => wallets.ts} | 0 tests/wallets/unit/steps/{mnemonics.js => mnemonics.ts} | 0 .../unit/steps/{spending-password.js => spending-password.ts} | 0 tests/wallets/unit/{wallet-utils.spec.js => wallet-utils.spec.ts} | 0 62 files changed, 0 insertions(+), 0 deletions(-) rename tests/_utils/{TestDecorator.js => TestDecorator.ts} (100%) rename tests/addresses/e2e/steps/{addresses.js => addresses.ts} (100%) rename tests/app/e2e/steps/{about-dialog.js => about-dialog.ts} (100%) rename tests/app/e2e/steps/{app-version-difference.js => app-version-difference.ts} (100%) rename tests/app/e2e/steps/{cardano-node.js => cardano-node.ts} (100%) rename tests/app/e2e/steps/{daedalus-process.js => daedalus-process.ts} (100%) rename tests/app/e2e/steps/{data-layer-migration.js => data-layer-migration.ts} (100%) rename tests/app/e2e/steps/{helpers.js => helpers.ts} (100%) rename tests/app/e2e/steps/{inject-fault.js => inject-fault.ts} (100%) rename tests/app/e2e/steps/{local-time-difference.js => local-time-difference.ts} (100%) rename tests/app/e2e/steps/{no-disk-space.js => no-disk-space.ts} (100%) rename tests/app/e2e/steps/{node-restart.js => node-restart.ts} (100%) rename tests/app/e2e/steps/{trouble-connecting-notification.js => trouble-connecting-notification.ts} (100%) rename tests/app/e2e/steps/{trouble-syncing-notification.js => trouble-syncing-notification.ts} (100%) rename tests/assets/unit/{assets.spec.js => assets.spec.ts} (100%) rename tests/common/e2e/steps/{config.js => config.ts} (100%) rename tests/common/e2e/steps/{helpers.js => helpers.ts} (100%) rename tests/common/unit/{networks.spec.js => networks.spec.ts} (100%) rename tests/common/unit/steps/{mnemonics-form-validation.steps.js => mnemonics-form-validation.steps.ts} (100%) rename tests/delegation/e2e/steps/{delegation-pending.js => delegation-pending.ts} (100%) rename tests/delegation/e2e/steps/{delegation.js => delegation.ts} (100%) rename tests/delegation/e2e/steps/{helpers.js => helpers.ts} (100%) rename tests/delegation/e2e/steps/{rewards.js => rewards.ts} (100%) rename tests/delegation/e2e/steps/{stake-pools.js => stake-pools.ts} (100%) rename tests/navigation/e2e/steps/{general-settings.js => general-settings.ts} (100%) rename tests/navigation/e2e/steps/{helpers.js => helpers.ts} (100%) rename tests/navigation/e2e/steps/{sidebar.js => sidebar.ts} (100%) rename tests/news/e2e/steps/{newsfeed-steps.js => newsfeed-steps.ts} (100%) rename tests/paper-wallets/e2e/steps/{paper-wallets-certificate.js => paper-wallets-certificate.ts} (100%) rename tests/{reporter.js => reporter.ts} (100%) rename tests/settings/e2e/steps/{basic-setup.js => basic-setup.ts} (100%) rename tests/settings/e2e/steps/{currency-display-settings.js => currency-display-settings.ts} (100%) rename tests/settings/e2e/steps/{custom-formats.js => custom-formats.ts} (100%) rename tests/settings/e2e/steps/{general-settings.js => general-settings.ts} (100%) rename tests/settings/e2e/steps/{helpers.js => helpers.ts} (100%) rename tests/settings/e2e/steps/{select-language.js => select-language.ts} (100%) rename tests/settings/e2e/steps/{settings.js => settings.ts} (100%) rename tests/settings/e2e/steps/{stakepool-settings.js => stakepool-settings.ts} (100%) rename tests/settings/e2e/steps/{terms-of-use.js => terms-of-use.ts} (100%) rename tests/settings/unit/steps/{file-names.js => file-names.ts} (100%) rename tests/{setup-common.js => setup-common.ts} (100%) rename tests/{setup-e2e.js => setup-e2e.ts} (100%) rename tests/transactions/e2e/steps/{transactions.js => transactions.ts} (100%) rename tests/transactions/e2e/steps/{utxos.js => utxos.ts} (100%) rename tests/transactions/unit/steps/{helpers.js => helpers.ts} (100%) rename tests/transactions/unit/steps/{utxos-chart.js => utxos-chart.ts} (100%) rename tests/{types.js => types.ts} (100%) rename tests/wallets/e2e/steps/{balance-wallets-notification.js => balance-wallets-notification.ts} (100%) rename tests/wallets/e2e/steps/{create-wallet.js => create-wallet.ts} (100%) rename tests/wallets/e2e/steps/{delete-wallet.js => delete-wallet.ts} (100%) rename tests/wallets/e2e/steps/{helpers.js => helpers.ts} (100%) rename tests/wallets/e2e/steps/{import-and-migrate-wallets.js => import-and-migrate-wallets.ts} (100%) rename tests/wallets/e2e/steps/{recovery-phrase-verification-steps.js => recovery-phrase-verification-steps.ts} (100%) rename tests/wallets/e2e/steps/{restore-wallet.js => restore-wallet.ts} (100%) rename tests/wallets/e2e/steps/{transfer-funds-wizard.js => transfer-funds-wizard.ts} (100%) rename tests/wallets/e2e/steps/{wallet-not-responding.js => wallet-not-responding.ts} (100%) rename tests/wallets/e2e/steps/{wallets-limit.js => wallets-limit.ts} (100%) rename tests/wallets/e2e/steps/{wallets-ordering.js => wallets-ordering.ts} (100%) rename tests/wallets/e2e/steps/{wallets.js => wallets.ts} (100%) rename tests/wallets/unit/steps/{mnemonics.js => mnemonics.ts} (100%) rename tests/wallets/unit/steps/{spending-password.js => spending-password.ts} (100%) rename tests/wallets/unit/{wallet-utils.spec.js => wallet-utils.spec.ts} (100%) diff --git a/tests/_utils/TestDecorator.js b/tests/_utils/TestDecorator.ts similarity index 100% rename from tests/_utils/TestDecorator.js rename to tests/_utils/TestDecorator.ts diff --git a/tests/addresses/e2e/steps/addresses.js b/tests/addresses/e2e/steps/addresses.ts similarity index 100% rename from tests/addresses/e2e/steps/addresses.js rename to tests/addresses/e2e/steps/addresses.ts diff --git a/tests/app/e2e/steps/about-dialog.js b/tests/app/e2e/steps/about-dialog.ts similarity index 100% rename from tests/app/e2e/steps/about-dialog.js rename to tests/app/e2e/steps/about-dialog.ts diff --git a/tests/app/e2e/steps/app-version-difference.js b/tests/app/e2e/steps/app-version-difference.ts similarity index 100% rename from tests/app/e2e/steps/app-version-difference.js rename to tests/app/e2e/steps/app-version-difference.ts diff --git a/tests/app/e2e/steps/cardano-node.js b/tests/app/e2e/steps/cardano-node.ts similarity index 100% rename from tests/app/e2e/steps/cardano-node.js rename to tests/app/e2e/steps/cardano-node.ts diff --git a/tests/app/e2e/steps/daedalus-process.js b/tests/app/e2e/steps/daedalus-process.ts similarity index 100% rename from tests/app/e2e/steps/daedalus-process.js rename to tests/app/e2e/steps/daedalus-process.ts diff --git a/tests/app/e2e/steps/data-layer-migration.js b/tests/app/e2e/steps/data-layer-migration.ts similarity index 100% rename from tests/app/e2e/steps/data-layer-migration.js rename to tests/app/e2e/steps/data-layer-migration.ts diff --git a/tests/app/e2e/steps/helpers.js b/tests/app/e2e/steps/helpers.ts similarity index 100% rename from tests/app/e2e/steps/helpers.js rename to tests/app/e2e/steps/helpers.ts diff --git a/tests/app/e2e/steps/inject-fault.js b/tests/app/e2e/steps/inject-fault.ts similarity index 100% rename from tests/app/e2e/steps/inject-fault.js rename to tests/app/e2e/steps/inject-fault.ts diff --git a/tests/app/e2e/steps/local-time-difference.js b/tests/app/e2e/steps/local-time-difference.ts similarity index 100% rename from tests/app/e2e/steps/local-time-difference.js rename to tests/app/e2e/steps/local-time-difference.ts diff --git a/tests/app/e2e/steps/no-disk-space.js b/tests/app/e2e/steps/no-disk-space.ts similarity index 100% rename from tests/app/e2e/steps/no-disk-space.js rename to tests/app/e2e/steps/no-disk-space.ts diff --git a/tests/app/e2e/steps/node-restart.js b/tests/app/e2e/steps/node-restart.ts similarity index 100% rename from tests/app/e2e/steps/node-restart.js rename to tests/app/e2e/steps/node-restart.ts diff --git a/tests/app/e2e/steps/trouble-connecting-notification.js b/tests/app/e2e/steps/trouble-connecting-notification.ts similarity index 100% rename from tests/app/e2e/steps/trouble-connecting-notification.js rename to tests/app/e2e/steps/trouble-connecting-notification.ts diff --git a/tests/app/e2e/steps/trouble-syncing-notification.js b/tests/app/e2e/steps/trouble-syncing-notification.ts similarity index 100% rename from tests/app/e2e/steps/trouble-syncing-notification.js rename to tests/app/e2e/steps/trouble-syncing-notification.ts diff --git a/tests/assets/unit/assets.spec.js b/tests/assets/unit/assets.spec.ts similarity index 100% rename from tests/assets/unit/assets.spec.js rename to tests/assets/unit/assets.spec.ts diff --git a/tests/common/e2e/steps/config.js b/tests/common/e2e/steps/config.ts similarity index 100% rename from tests/common/e2e/steps/config.js rename to tests/common/e2e/steps/config.ts diff --git a/tests/common/e2e/steps/helpers.js b/tests/common/e2e/steps/helpers.ts similarity index 100% rename from tests/common/e2e/steps/helpers.js rename to tests/common/e2e/steps/helpers.ts diff --git a/tests/common/unit/networks.spec.js b/tests/common/unit/networks.spec.ts similarity index 100% rename from tests/common/unit/networks.spec.js rename to tests/common/unit/networks.spec.ts diff --git a/tests/common/unit/steps/mnemonics-form-validation.steps.js b/tests/common/unit/steps/mnemonics-form-validation.steps.ts similarity index 100% rename from tests/common/unit/steps/mnemonics-form-validation.steps.js rename to tests/common/unit/steps/mnemonics-form-validation.steps.ts diff --git a/tests/delegation/e2e/steps/delegation-pending.js b/tests/delegation/e2e/steps/delegation-pending.ts similarity index 100% rename from tests/delegation/e2e/steps/delegation-pending.js rename to tests/delegation/e2e/steps/delegation-pending.ts diff --git a/tests/delegation/e2e/steps/delegation.js b/tests/delegation/e2e/steps/delegation.ts similarity index 100% rename from tests/delegation/e2e/steps/delegation.js rename to tests/delegation/e2e/steps/delegation.ts diff --git a/tests/delegation/e2e/steps/helpers.js b/tests/delegation/e2e/steps/helpers.ts similarity index 100% rename from tests/delegation/e2e/steps/helpers.js rename to tests/delegation/e2e/steps/helpers.ts diff --git a/tests/delegation/e2e/steps/rewards.js b/tests/delegation/e2e/steps/rewards.ts similarity index 100% rename from tests/delegation/e2e/steps/rewards.js rename to tests/delegation/e2e/steps/rewards.ts diff --git a/tests/delegation/e2e/steps/stake-pools.js b/tests/delegation/e2e/steps/stake-pools.ts similarity index 100% rename from tests/delegation/e2e/steps/stake-pools.js rename to tests/delegation/e2e/steps/stake-pools.ts diff --git a/tests/navigation/e2e/steps/general-settings.js b/tests/navigation/e2e/steps/general-settings.ts similarity index 100% rename from tests/navigation/e2e/steps/general-settings.js rename to tests/navigation/e2e/steps/general-settings.ts diff --git a/tests/navigation/e2e/steps/helpers.js b/tests/navigation/e2e/steps/helpers.ts similarity index 100% rename from tests/navigation/e2e/steps/helpers.js rename to tests/navigation/e2e/steps/helpers.ts diff --git a/tests/navigation/e2e/steps/sidebar.js b/tests/navigation/e2e/steps/sidebar.ts similarity index 100% rename from tests/navigation/e2e/steps/sidebar.js rename to tests/navigation/e2e/steps/sidebar.ts diff --git a/tests/news/e2e/steps/newsfeed-steps.js b/tests/news/e2e/steps/newsfeed-steps.ts similarity index 100% rename from tests/news/e2e/steps/newsfeed-steps.js rename to tests/news/e2e/steps/newsfeed-steps.ts diff --git a/tests/paper-wallets/e2e/steps/paper-wallets-certificate.js b/tests/paper-wallets/e2e/steps/paper-wallets-certificate.ts similarity index 100% rename from tests/paper-wallets/e2e/steps/paper-wallets-certificate.js rename to tests/paper-wallets/e2e/steps/paper-wallets-certificate.ts diff --git a/tests/reporter.js b/tests/reporter.ts similarity index 100% rename from tests/reporter.js rename to tests/reporter.ts diff --git a/tests/settings/e2e/steps/basic-setup.js b/tests/settings/e2e/steps/basic-setup.ts similarity index 100% rename from tests/settings/e2e/steps/basic-setup.js rename to tests/settings/e2e/steps/basic-setup.ts diff --git a/tests/settings/e2e/steps/currency-display-settings.js b/tests/settings/e2e/steps/currency-display-settings.ts similarity index 100% rename from tests/settings/e2e/steps/currency-display-settings.js rename to tests/settings/e2e/steps/currency-display-settings.ts diff --git a/tests/settings/e2e/steps/custom-formats.js b/tests/settings/e2e/steps/custom-formats.ts similarity index 100% rename from tests/settings/e2e/steps/custom-formats.js rename to tests/settings/e2e/steps/custom-formats.ts diff --git a/tests/settings/e2e/steps/general-settings.js b/tests/settings/e2e/steps/general-settings.ts similarity index 100% rename from tests/settings/e2e/steps/general-settings.js rename to tests/settings/e2e/steps/general-settings.ts diff --git a/tests/settings/e2e/steps/helpers.js b/tests/settings/e2e/steps/helpers.ts similarity index 100% rename from tests/settings/e2e/steps/helpers.js rename to tests/settings/e2e/steps/helpers.ts diff --git a/tests/settings/e2e/steps/select-language.js b/tests/settings/e2e/steps/select-language.ts similarity index 100% rename from tests/settings/e2e/steps/select-language.js rename to tests/settings/e2e/steps/select-language.ts diff --git a/tests/settings/e2e/steps/settings.js b/tests/settings/e2e/steps/settings.ts similarity index 100% rename from tests/settings/e2e/steps/settings.js rename to tests/settings/e2e/steps/settings.ts diff --git a/tests/settings/e2e/steps/stakepool-settings.js b/tests/settings/e2e/steps/stakepool-settings.ts similarity index 100% rename from tests/settings/e2e/steps/stakepool-settings.js rename to tests/settings/e2e/steps/stakepool-settings.ts diff --git a/tests/settings/e2e/steps/terms-of-use.js b/tests/settings/e2e/steps/terms-of-use.ts similarity index 100% rename from tests/settings/e2e/steps/terms-of-use.js rename to tests/settings/e2e/steps/terms-of-use.ts diff --git a/tests/settings/unit/steps/file-names.js b/tests/settings/unit/steps/file-names.ts similarity index 100% rename from tests/settings/unit/steps/file-names.js rename to tests/settings/unit/steps/file-names.ts diff --git a/tests/setup-common.js b/tests/setup-common.ts similarity index 100% rename from tests/setup-common.js rename to tests/setup-common.ts diff --git a/tests/setup-e2e.js b/tests/setup-e2e.ts similarity index 100% rename from tests/setup-e2e.js rename to tests/setup-e2e.ts diff --git a/tests/transactions/e2e/steps/transactions.js b/tests/transactions/e2e/steps/transactions.ts similarity index 100% rename from tests/transactions/e2e/steps/transactions.js rename to tests/transactions/e2e/steps/transactions.ts diff --git a/tests/transactions/e2e/steps/utxos.js b/tests/transactions/e2e/steps/utxos.ts similarity index 100% rename from tests/transactions/e2e/steps/utxos.js rename to tests/transactions/e2e/steps/utxos.ts diff --git a/tests/transactions/unit/steps/helpers.js b/tests/transactions/unit/steps/helpers.ts similarity index 100% rename from tests/transactions/unit/steps/helpers.js rename to tests/transactions/unit/steps/helpers.ts diff --git a/tests/transactions/unit/steps/utxos-chart.js b/tests/transactions/unit/steps/utxos-chart.ts similarity index 100% rename from tests/transactions/unit/steps/utxos-chart.js rename to tests/transactions/unit/steps/utxos-chart.ts diff --git a/tests/types.js b/tests/types.ts similarity index 100% rename from tests/types.js rename to tests/types.ts diff --git a/tests/wallets/e2e/steps/balance-wallets-notification.js b/tests/wallets/e2e/steps/balance-wallets-notification.ts similarity index 100% rename from tests/wallets/e2e/steps/balance-wallets-notification.js rename to tests/wallets/e2e/steps/balance-wallets-notification.ts diff --git a/tests/wallets/e2e/steps/create-wallet.js b/tests/wallets/e2e/steps/create-wallet.ts similarity index 100% rename from tests/wallets/e2e/steps/create-wallet.js rename to tests/wallets/e2e/steps/create-wallet.ts diff --git a/tests/wallets/e2e/steps/delete-wallet.js b/tests/wallets/e2e/steps/delete-wallet.ts similarity index 100% rename from tests/wallets/e2e/steps/delete-wallet.js rename to tests/wallets/e2e/steps/delete-wallet.ts diff --git a/tests/wallets/e2e/steps/helpers.js b/tests/wallets/e2e/steps/helpers.ts similarity index 100% rename from tests/wallets/e2e/steps/helpers.js rename to tests/wallets/e2e/steps/helpers.ts diff --git a/tests/wallets/e2e/steps/import-and-migrate-wallets.js b/tests/wallets/e2e/steps/import-and-migrate-wallets.ts similarity index 100% rename from tests/wallets/e2e/steps/import-and-migrate-wallets.js rename to tests/wallets/e2e/steps/import-and-migrate-wallets.ts diff --git a/tests/wallets/e2e/steps/recovery-phrase-verification-steps.js b/tests/wallets/e2e/steps/recovery-phrase-verification-steps.ts similarity index 100% rename from tests/wallets/e2e/steps/recovery-phrase-verification-steps.js rename to tests/wallets/e2e/steps/recovery-phrase-verification-steps.ts diff --git a/tests/wallets/e2e/steps/restore-wallet.js b/tests/wallets/e2e/steps/restore-wallet.ts similarity index 100% rename from tests/wallets/e2e/steps/restore-wallet.js rename to tests/wallets/e2e/steps/restore-wallet.ts diff --git a/tests/wallets/e2e/steps/transfer-funds-wizard.js b/tests/wallets/e2e/steps/transfer-funds-wizard.ts similarity index 100% rename from tests/wallets/e2e/steps/transfer-funds-wizard.js rename to tests/wallets/e2e/steps/transfer-funds-wizard.ts diff --git a/tests/wallets/e2e/steps/wallet-not-responding.js b/tests/wallets/e2e/steps/wallet-not-responding.ts similarity index 100% rename from tests/wallets/e2e/steps/wallet-not-responding.js rename to tests/wallets/e2e/steps/wallet-not-responding.ts diff --git a/tests/wallets/e2e/steps/wallets-limit.js b/tests/wallets/e2e/steps/wallets-limit.ts similarity index 100% rename from tests/wallets/e2e/steps/wallets-limit.js rename to tests/wallets/e2e/steps/wallets-limit.ts diff --git a/tests/wallets/e2e/steps/wallets-ordering.js b/tests/wallets/e2e/steps/wallets-ordering.ts similarity index 100% rename from tests/wallets/e2e/steps/wallets-ordering.js rename to tests/wallets/e2e/steps/wallets-ordering.ts diff --git a/tests/wallets/e2e/steps/wallets.js b/tests/wallets/e2e/steps/wallets.ts similarity index 100% rename from tests/wallets/e2e/steps/wallets.js rename to tests/wallets/e2e/steps/wallets.ts diff --git a/tests/wallets/unit/steps/mnemonics.js b/tests/wallets/unit/steps/mnemonics.ts similarity index 100% rename from tests/wallets/unit/steps/mnemonics.js rename to tests/wallets/unit/steps/mnemonics.ts diff --git a/tests/wallets/unit/steps/spending-password.js b/tests/wallets/unit/steps/spending-password.ts similarity index 100% rename from tests/wallets/unit/steps/spending-password.js rename to tests/wallets/unit/steps/spending-password.ts diff --git a/tests/wallets/unit/wallet-utils.spec.js b/tests/wallets/unit/wallet-utils.spec.ts similarity index 100% rename from tests/wallets/unit/wallet-utils.spec.js rename to tests/wallets/unit/wallet-utils.spec.ts