Skip to content

Commit

Permalink
fix the cypress
Browse files Browse the repository at this point in the history
  • Loading branch information
nihal467 committed Jan 31, 2025
1 parent 2dd94c4 commit fb76909
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 2 additions & 0 deletions cypress/e2e/facility_spec/facility_creation.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { generatePhoneNumber } from "@/utils/commonUtils";
import { generateFacilityData } from "@/utils/facilityData";

const LOCATION_HIERARCHY = {
state: "Kerala",
district: "Ernakulam",
localBody: "Aluva",
ward: "4",
};
Expand Down
13 changes: 12 additions & 1 deletion cypress/pageObject/facility/FacilityCreation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,18 @@ export class FacilityCreation {
.should("not.be.empty");
}

fillLocationHierarchy(location: { localBody: string; ward: string }) {
fillLocationHierarchy(location: {
state: string;
district: string;
localBody: string;
ward: string;
}) {
cy.typeAndSelectOption('[data-cy="select-state"]', location.state, false);
cy.typeAndSelectOption(
'[data-cy="select-district"]',
location.district,
false,
);
// Don't verify selection for local body (false parameter)
cy.typeAndSelectOption(
'[data-cy="select-local_body"]',
Expand Down

0 comments on commit fb76909

Please sign in to comment.