From a3161dcc6a799e4639b3a24d7dda7d9a017a5ce0 Mon Sep 17 00:00:00 2001 From: jetzable Date: Mon, 7 Jan 2019 16:23:48 -0600 Subject: [PATCH] Adding cypress tests --- tests/e2e/specs/test.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/e2e/specs/test.js b/tests/e2e/specs/test.js index 4f36a24..7ef3f36 100644 --- a/tests/e2e/specs/test.js +++ b/tests/e2e/specs/test.js @@ -5,10 +5,10 @@ describe('BranchPicker', () => { cy.visit('http://localhost:8080/') cy.contains('h4', 'Empresas') cy.get('.column.companies > .item > .select-item > .info > p > :nth-child(2)') - .click() + .click() cy.contains('h4', 'Almacenes') cy.get('.column.companies > .item > .select-item > .info > p > :nth-child(2)') - .click() + .click() }) }) @@ -17,5 +17,11 @@ describe('CompanyList', () => { cy.visit('http://localhost:8080/') cy.getByText('Artículos para el hogar SA de CV').should('exist') }) + + it('Renders branches according to selection', function () { + cy.getByText('Artículos para el hogar SA de CV') + .click() + cy.getByText('Coyoacán').should('exist') + }) })