From dd31fa374ddccf997c8dffd7b66b67b95f70f47a Mon Sep 17 00:00:00 2001 From: Hammad1007 Date: Wed, 20 Dec 2023 17:12:06 +0500 Subject: [PATCH] Update the tests --- background-slider/cypress/e2e/test1.spec.cy.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/background-slider/cypress/e2e/test1.spec.cy.js b/background-slider/cypress/e2e/test1.spec.cy.js index 2aa58c2..71ce6ba 100644 --- a/background-slider/cypress/e2e/test1.spec.cy.js +++ b/background-slider/cypress/e2e/test1.spec.cy.js @@ -34,6 +34,11 @@ describe('Project 4: Background Slider', () => { it('Left arrow is clickable', () => { cy.get('.fa-arrow-left ').should('be.visible').click() }) + + it('Left arrow when clicked takes me to the previous image', () => { + cy.get('.fa-arrow-left ').should('be.visible').click() + cy.get('.slide').should('have.class', 'active').should('be.visible') + }) }) context('Right Arrow', () => { @@ -44,6 +49,11 @@ describe('Project 4: Background Slider', () => { it('Right arrow is clickable', () => { cy.get('.fa-arrow-right ').should('be.visible').click() }) + + it('Right arrow when clicked takes me to the next image', () => { + cy.get('.fa-arrow-right ').should('be.visible').click() + cy.get('.slide').should('have.class', 'active').should('be.visible') + }) }) }) })