Skip to content

Commit

Permalink
test(e2e): displays the empty state when there's no matching item
Browse files Browse the repository at this point in the history
  • Loading branch information
zainfathoni committed Sep 14, 2021
1 parent 4239ead commit 51fdfb4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cypress/e2e/contacts/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,14 @@ describe("contacts page typed search", () => {
cy.findAllByText(/dompet dhuafa/i).should("be.visible"),
);
});

it("displays the empty state when the search keyword matches nothing", () => {
cy.findByRole("textbox", {
name: /cari kontak:/i,
}).type("aoeu{enter}");

cy.findByRole("heading", {
name: /fasilitas tidak ditemukan/i,
}).should("be.visible");
});
});

0 comments on commit 51fdfb4

Please sign in to comment.