Skip to content

Commit

Permalink
feat: add testes indicadores e dashboard oportunidades
Browse files Browse the repository at this point in the history
  • Loading branch information
vicmagpac committed Jun 26, 2024
1 parent 300dd69 commit 6eb94d9
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/cypress/e2e/opportunityPage/index.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
});
});

0 comments on commit 6eb94d9

Please sign in to comment.