Skip to content

Commit

Permalink
test: update Portfolio Detail Page spending test assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
fpigeonjr committed Feb 25, 2025
1 parent 967bd2d commit f82d5b7
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions frontend/cypress/e2e/portfolioDetail.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,19 @@ describe("Portfolio Detail Page", () => {

it("loads the Portfolio spending component", () => {
cy.visit("/portfolios/1/spending").wait(1000);
cy.get("#fiscal-year-select").select("2021");
cy.get("#fiscal-year-select").select("2043");
cy.get("h2").should("contain", "Portfolio Budget & Spending Summary");
cy.get('[data-cy="big-budget-summary-card"]').should("contain", "Spending $0 of $10,200,000");
cy.get('[data-cy="big-budget-summary-card"]').should("contain", "Spending $8,000,000 of $0");
cy.get("#project-agreement-bli-card")
.should("contain", "1 Research")
.should("contain", "1 Direct Obligation")
.should("contain", "2 Executing")
.should("contain", "1 Planned")
.should("contain", "2 Executing")
.should("contain", "1 Obligated");
cy.get("#donut-graph-with-legend-card").should("exist");
cy.get("#donut-graph-with-legend-card")
.should("contain", "$0.00")
.should("contain", "$1,000,000.00")
.should("contain", "$3,000,000.00")
.should("contain", "$4,000,000.00");
//3 table rows trs elements
// table should exist and have one row
cy.get("table").should("exist");
Expand All @@ -52,7 +55,7 @@ describe("Portfolio Detail Page", () => {
.should("contain", "0%")
.should("contain", "$10,200,000.00")
.should("contain", "100%");
cy.get('[data-cy="portfolio-budget-card"]').should("exist");
cy.get('[data-cy="portfolio-budget-card"]').should("contain", "$10,200,000.00");
// check the first can card for the correct values
cy.get('[data-cy="can-card-G990136"]')
.should("contain", "G990136")
Expand Down

0 comments on commit f82d5b7

Please sign in to comment.