Cypress docs say it's unsafe to chain after clear. Also added force input to workaround bug with saying input field is disabled.

This commit is contained in:
Dillon Kearns 2023-05-25 09:39:09 -07:00
parent 556302d75d
commit f26066cf92

View File

@ -19,7 +19,8 @@ context("fetchers", () => {
});
function addItem(itemName) {
cy.get("input[name=name]").clear().type(itemName);
cy.get("input[name=name]").clear({ force: true });
cy.get("input[name=name]").type(itemName, { force: true });
cy.contains("Submit").click();
}