2021-02-07 00:28:14 -08:00
|
|
|
// Give network requests a bit of breathing room!
|
|
|
|
const networkTimeout = { timeout: 6000 };
|
2021-02-04 23:34:43 -08:00
|
|
|
|
|
|
|
describe("ItemSearchPage", () => {
|
|
|
|
// NOTE: This test depends on specific search results on certain pages, and
|
|
|
|
// could break if a lot of matching items are added to the site!
|
|
|
|
it("Searches by keyword", () => {
|
|
|
|
cy.visit("/items/search");
|
|
|
|
|
|
|
|
// The first page should contain this item.
|
|
|
|
cy.get("[data-test-id=item-search-input]").type("winter");
|
|
|
|
cy.contains("A Warm Winters Night Background", networkTimeout).should(
|
|
|
|
"exist"
|
|
|
|
);
|
|
|
|
});
|
|
|
|
});
|