impress-2020/cypress/integration/ItemSearchPage.spec.js
Matchu 170544128e Reduce Cypress network timeouts
Now that we drastically sped up our local GraphQL requests, we can comfortably reduce these timeouts from 20sec to 6sec before deciding the test failed! What an exciting improvement :3
2021-02-07 00:28:14 -08:00

16 lines
564 B
JavaScript

// Give network requests a bit of breathing room!
const networkTimeout = { timeout: 6000 };
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"
);
});
});