From 6eb94d99226f4b061854682f49fd8dac8dae251d Mon Sep 17 00:00:00 2001 From: Victor Magalhaes Date: Wed, 26 Jun 2024 09:40:56 -0300 Subject: [PATCH] feat: add testes indicadores e dashboard oportunidades --- src/cypress/e2e/opportunityPage/index.cy.js | 25 +++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/cypress/e2e/opportunityPage/index.cy.js b/src/cypress/e2e/opportunityPage/index.cy.js index 555387b038..868293e576 100644 --- a/src/cypress/e2e/opportunityPage/index.cy.js +++ b/src/cypress/e2e/opportunityPage/index.cy.js @@ -11,4 +11,29 @@ describe("Oportunidade", () => { cy.wait(1000); cy.url().should("include", "/oportunidade/"); }); + + it("Garante que os cards de indicadores das oportunidades funciona", () => { + cy.visit("/oportunidades"); + cy.get(':nth-child(1) > .entity-cards-cards__content > .entity-cards-cards__info > .entity-cards-cards__label').should('have.text', 'Oportunidades criadas'); + cy.get(':nth-child(2) > .entity-cards-cards__content > .entity-cards-cards__info > .entity-cards-cards__label').should('have.text', 'Oportunidades certificadas'); + + cy.wait(1000); + + cy.get(".foundResults").invoke('text').then((text) => { + let expectedCount = Number(text.match(/\d+/), 10); + console.log(expectedCount); + cy.get('#main-app > div.search > div.entity-cards > div > div > div:nth-child(1) > div > div.entity-cards-cards__info > strong').should('have.text', expectedCount); + }); + + }); + + it("Garante que a tab dashboard de oportunidades funciona", () => { + cy.visit("/oportunidades"); + cy.get('.indicator > a > span').should('have.text', 'Indicadores'); + cy.get('.indicator > a').click(); + + cy.wait(1000); + + cy.get('#iFrameResizer0').should('be.visible'); + }); }); \ No newline at end of file