Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it("Then all required fields are shown in red, meaning error", () => {
helper.click(createImagePage.form.submitButton);
expect(
createImagePage.form.nameField.getCssValue("background-color")
).toEqual("rgb(255,0,0)");
expect(
createImagePage.form.descriptionField.getCssValue("background-color")
).toEqual("rgb(255,0,0)");
expect(
createImagePage.form.imageUrlField.getCssValue("background-color")
).toEqual("rgb(255,0,0)");
});
});
fillWithDataAndSubmit(data) {
helper.fillFieldWithText(this.nameField, data.name);
helper.fillFieldWithText(this.descriptionField, data.description);
helper.fillFieldWithText(this.imageUrlField, data.imageUrlValue);
helper.click(this.submitButton);
}
}
beforeEach(() => helper.click(createImagePage.header.heading));