diff --git a/packages/yoroi-extension/features/faq.feature b/packages/yoroi-extension/features/faq.feature new file mode 100644 index 0000000000..f953bb1aa5 --- /dev/null +++ b/packages/yoroi-extension/features/faq.feature @@ -0,0 +1,15 @@ +Feature: Wallet UI FAQ + + Background: + Given I have opened the extension + And I have completed the basic setup + Then I should see the Create wallet screen + Given There is a Shelley wallet stored named shelley-simple-15 + Then Revamp. I switch to revamp version + And I should see the FAQ button + +@faq-1 + Scenario: Press FAQ button + When I click on FAQ button + Then I should see a new tab opened with address https://emurgohelpdesk.zendesk.com/hc/en-us/categories/4412619927695-Yoroi + diff --git a/packages/yoroi-extension/features/pages/sidebarPage.js b/packages/yoroi-extension/features/pages/sidebarPage.js index c4f528b255..b3b7151aa2 100644 --- a/packages/yoroi-extension/features/pages/sidebarPage.js +++ b/packages/yoroi-extension/features/pages/sidebarPage.js @@ -6,4 +6,4 @@ export const stakingButton = { locator: 'sidebar.staking', method: 'id' }; export const assetsButton = { locator: 'sidebar.assets', method: 'id' }; export const votingButton = { locator: 'sidebar.voting', method: 'id' }; export const settingsButton = { locator: 'sidebar.settings', method: 'id' }; -export const faqButton = { locator: 'sidebar.faq', method: 'id' }; \ No newline at end of file +export const faqButton = { locator: '.SidebarRevamp_faq', method: 'css' }; \ No newline at end of file diff --git a/packages/yoroi-extension/features/step_definitions/sidebar-steps.js b/packages/yoroi-extension/features/step_definitions/sidebar-steps.js new file mode 100644 index 0000000000..94bbdf291a --- /dev/null +++ b/packages/yoroi-extension/features/step_definitions/sidebar-steps.js @@ -0,0 +1,23 @@ +// @flow + +import { When, Then } from 'cucumber'; +import { expect } from 'chai'; +import { faqButton } from '../pages/sidebarPage'; +import { faqTabName } from '../support/windowManager'; + +When(/^I click on FAQ button$/, async function () { + this.webDriverLogger.info(`Step: I click on FAQ button`); + await this.click(faqButton); +}); + +Then(/^I should see the FAQ button$/, async function () { + this.webDriverLogger.info(`Step: I should see FAQ button`); + await this.waitForElement(faqButton); +}); + +Then(/^I should see a new tab opened with address (.+)$/, async function (address) { + this.webDriverLogger.info(`Step: I should see a new tab opened with address ${address}`); + await this.windowManager.findNewWindowAndSwitchTo(faqTabName); + const actualAddresses = await this.driver.getCurrentUrl(); + expect(actualAddresses).to.equal(address); +}); diff --git a/packages/yoroi-extension/features/support/windowManager.js b/packages/yoroi-extension/features/support/windowManager.js index 3ece528aa6..067ef5d8c6 100644 --- a/packages/yoroi-extension/features/support/windowManager.js +++ b/packages/yoroi-extension/features/support/windowManager.js @@ -12,6 +12,7 @@ class WindowManagerError extends Error {} export const mockDAppName = 'MockDApp'; export const popupConnectorName = 'popupConnectorWindow'; export const extensionTabName = 'Yoroi'; +export const faqTabName = 'Yoroi - EMURGO'; export class WindowManager { windowHandles: Array;