diff --git a/cypress/e2e/features/_example.feature b/cypress/e2e/features/_example.feature new file mode 100644 index 0000000000..a1068f56d6 --- /dev/null +++ b/cypress/e2e/features/_example.feature @@ -0,0 +1,4 @@ +Feature: duckduckgo.com + Scenario: visiting the frontpage + When I visit duckduckgo.com + Then I should see a search bar \ No newline at end of file diff --git a/cypress/e2e/features/_example.js b/cypress/e2e/features/_example.js new file mode 100644 index 0000000000..750c452a4a --- /dev/null +++ b/cypress/e2e/features/_example.js @@ -0,0 +1,13 @@ +import { When, Then } from '@badeball/cypress-cucumber-preprocessor'; + +When('I visit duckduckgo.com', () => { + cy.visit('https://www.duckduckgo.com'); +}); + +Then('I should see a search bar', () => { + cy.get('input#searchbox_input').should( + 'have.attr', + 'placeholder', + 'Search the web without being tracked' + ); +}); diff --git a/cypress/e2e/features/indonesia-tcl.feature b/cypress/e2e/features/indonesia-tcl.feature new file mode 100644 index 0000000000..2de59cabf3 --- /dev/null +++ b/cypress/e2e/features/indonesia-tcl.feature @@ -0,0 +1,5 @@ +Feature: Indonesia TCL Image + Scenario: Indonesia Dashboard should show an image instead the real Primay Forest Loss Widget + When I visit Dashboard + And I select Indonesia + Then I should see an image of Indonesia Primary Forest Loss \ No newline at end of file diff --git a/cypress/e2e/features/indonesia-tcl.js b/cypress/e2e/features/indonesia-tcl.js new file mode 100644 index 0000000000..d043450af7 --- /dev/null +++ b/cypress/e2e/features/indonesia-tcl.js @@ -0,0 +1,17 @@ +import { When, Then } from '@badeball/cypress-cucumber-preprocessor'; +import { + goToDashboardFromHome, + selectCountryOnDashboard, +} from '../../api/navigation-api'; + +When('I visit Dashboard', () => { + goToDashboardFromHome(); +}); + +When('I select Indonesia', () => { + selectCountryOnDashboard('Indonesia'); +}); + +Then('I should see an image of Indonesia Primary Forest Loss', () => { + cy.get('[data-cy="indonesia-img"').should('exist'); +});