Skip to content

Commit

Permalink
test(cypress): update cypress with cst flows
Browse files Browse the repository at this point in the history
  • Loading branch information
machikoyasuda committed Jul 15, 2024
1 parent a80e861 commit 1d6560b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions tests/cypress/plugins/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ export const selectAgency = () => {
return agency;
};

export const selectCourtesyCard = () => {
export const selectAgencyCard = () => {
cy.location("pathname").should("eq", `/eligibility/${agency.slug}`);

cy.contains("MST Courtesy Card").click();
cy.contains("CST Agency Card").click();
cy.contains("Choose this benefit").click();
cy.contains("Continue").click();
};
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
const helpers = require("../plugins/helpers");
const users = require("../fixtures/users.json");

describe("Courtesy Cards", () => {
describe("Agency Cards", () => {
beforeEach(() => {
cy.visit("/");

helpers.selectAgency();
helpers.selectCourtesyCard();
helpers.selectAgencyCard();
});

it("Confirms an eligible user", () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/cypress/specs/benefit-select.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe("Benefit selection", () => {

it("User sees 4 radio buttons", () => {
cy.get("input:radio").should("have.length", 4);
cy.contains("Courtesy Card");
cy.contains("Agency Card");
cy.contains("65 years");
});

Expand Down
2 changes: 1 addition & 1 deletion tests/cypress/specs/rate-limit.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe("Rate limiting feature spec", () => {
cy.visit("/");

helpers.selectAgency();
helpers.selectCourtesyCard();
helpers.selectAgencyCard();
});

it("Limits excess requests", () => {
Expand Down

0 comments on commit 1d6560b

Please sign in to comment.