#MerpayTechFest
Shared Utilities
describe(“Form”, () => {
beforeEach(() => {
cy.mock(UserAPI.getUser, { email: ‘
[email protected]’ });
});
it(“should render the form properly”, () => {
cy.getByTestId(“testForm”)
.assertTextInput(“Email”, “
[email protected]”, { placeholder: “Email” })
.assertSelect(“True/False”, null, { values: [“True”, “False”] })
.updateTextInput(“Email”, “
[email protected]”);
});
});
We write custom utilities to make tests easier to read and write