Skip to content

Commit

Permalink
Fix assertions on empty check for AB#16875.
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianMaki committed Dec 24, 2024
1 parent 4a8e5f9 commit 61206c4
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,17 @@ describe("Delegation Search", () => {
getTableRows("[data-testid=dependent-table]")
.should("have.length", 1)
.within((_$rows) => {
cy.get("[data-testid=dependent-name]").should("not.be.empty");
cy.get("[data-testid=dependent-dob]").should("not.be.empty");
cy.get("[data-testid=dependent-name]").should(
"not.have.text",
""
);
cy.get("[data-testid=dependent-dob]").should(
"not.have.text",
""
);
cy.get("[data-testid=dependent-address]").should(
"not.be.empty"
"not.have.text",
""
);
cy.get("[data-testid=dependent-protected-switch]").should(
"not.be.checked"
Expand All @@ -50,10 +57,17 @@ describe("Delegation Search", () => {
getTableRows("[data-testid=dependent-table]")
.should("have.length", 1)
.within((_$rows) => {
cy.get("[data-testid=dependent-name]").should("not.be.empty");
cy.get("[data-testid=dependent-dob]").should("not.be.empty");
cy.get("[data-testid=dependent-name]").should(
"not.have.text",
""
);
cy.get("[data-testid=dependent-dob]").should(
"not.have.text",
""
);
cy.get("[data-testid=dependent-address]").should(
"not.be.empty"
"not.have.text",
""
);
cy.get("[data-testid=dependent-protected-switch]").should(
"not.be.checked"
Expand All @@ -67,16 +81,19 @@ describe("Delegation Search", () => {
.eq(0)
.within((_$row) => {
cy.get("[data-testid=delegate-name]").should(
"not.be.empty"
"not.have.text",
""
);
cy.get("[data-testid=delegate-phn]").contains(
dependentWithGuardian.guardianPhn
);
cy.get("[data-testid=delegate-dob]").should(
"not.be.empty"
"not.have.text",
""
);
cy.get("[data-testid=delegate-address]").should(
"not.be.empty"
"not.have.text",
""
);
cy.get("[data-testid=delegate-status]").contains(
"Added"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ describe("Patient details page as admin user", () => {
cy.get("[data-testid=dependent-dob]").contains("2005-01-01");
cy.get("[data-testid=dependent-phn]").contains("9874307215");
cy.get("[data-testid=dependent-address]").should(
"not.be.empty"
"not.have.text",
""
);
cy.get("[data-testid=dependent-expiry-date]")
.invoke("text")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,10 @@ describe("Support", () => {
verifySupportTableResults(hdid, phn, 2);
cy.get("[data-testid=clear-btn]").click();
cy.get("[data-testid=query-type-select]").should("have.value", "Sms");
cy.get("[data-testid=query-input]").should("be.empty");
cy.get("[data-testid=query-input]")
.should("exist")
.should("be.visible")
.should("have.value", "");
cy.get("[data-testid=user-table]").should("not.exist");
});
});

0 comments on commit 61206c4

Please sign in to comment.