Skip to content

Commit

Permalink
Add cypress test
Browse files Browse the repository at this point in the history
  • Loading branch information
MiraGeowerkstatt committed Jan 30, 2025
1 parent f6a2a8a commit 954eca6
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions src/client/cypress/e2e/detailPage/boreholeform.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,38 @@ describe("Test for the borehole form.", () => {
});
});

it("verifies textfield border color for editing enabled or disabled", () => {
createBorehole({ "extended.original_name": "AAA_EEL", "custom.alternate_name": "AAA_EEL" }).as("borehole_id");
cy.get("@borehole_id").then(id => {
goToRouteAndAcceptTerms(`/${id}/borehole`);
cy.get('[data-cy="topBedrockWeatheredMd-formInput"] fieldset').should(
"have.css",
"border-color",
"rgb(223, 228, 233)",
); //#DFE4E9

cy.get('[data-cy="top_bedrock_weathered_tvd-formInput"] fieldset').should(
"have.css",
"border-color",
"rgb(223, 228, 233)",
); // #DFE4E9

startBoreholeEditing();

cy.get('[data-cy="topBedrockWeatheredMd-formInput"] fieldset').should(
"have.css",
"border-color",
"rgb(89, 105, 120)",
); // #596978

cy.get('[data-cy="top_bedrock_weathered_tvd-formInput"] fieldset').should(
"have.css",
"border-color",
"rgb(223, 228, 233)",
); // #DFE4E9 is not editable and should not change color
});
});

it("stops editing when going back to overview", () => {
createBorehole({ "extended.original_name": "AAA_HIPPOPOTHAMUS", "custom.alternate_name": "AAA_HIPPOPOTHAMUS" }).as(
"borehole_id",
Expand Down

0 comments on commit 954eca6

Please sign in to comment.