|
1 | 1 | import { showTableAndWaitForData, verifyPaginationText } from "../helpers/dataGridHelpers";
|
2 |
| -import { createBorehole, createLithologyLayer, createStratigraphy, loginAsAdmin } from "../helpers/testHelpers.js"; |
| 2 | +import { |
| 3 | + createBorehole, |
| 4 | + createLithologyLayer, |
| 5 | + createStratigraphy, |
| 6 | + loginAsAdmin, |
| 7 | + returnToOverview, |
| 8 | + startBoreholeEditing, |
| 9 | +} from "../helpers/testHelpers.js"; |
3 | 10 |
|
4 | 11 | describe("Search filter tests", () => {
|
5 | 12 | it("has search filters", () => {
|
@@ -220,6 +227,24 @@ describe("Search filter tests", () => {
|
220 | 227 | verifyPaginationText("1–100 of 1630");
|
221 | 228 | });
|
222 | 229 |
|
| 230 | + it("filters boreholes by status", () => { |
| 231 | + createBorehole({ "extended.original_name": "Filter by status" }).as("borehole_id"); |
| 232 | + cy.get("@borehole_id").then(id => { |
| 233 | + loginAsAdmin(`/${id}/status`); |
| 234 | + startBoreholeEditing(); |
| 235 | + cy.get('[data-cy="workflow_submit"]').click(); |
| 236 | + cy.get('[data-cy="workflow_dialog_submit"]').click(); |
| 237 | + returnToOverview(); |
| 238 | + cy.get('[data-cy="show-filter-button"]').click(); |
| 239 | + cy.contains("Status").click(); |
| 240 | + cy.get('[data-cy="boreholes-number-preview"]').should("have.text", "1'627"); |
| 241 | + cy.get('[data-cy="statuseditor"]').click(); |
| 242 | + cy.get('[data-cy="boreholes-number-preview"]').should("have.text", "1'626"); |
| 243 | + cy.get('[data-cy="statuscontroller"]').click(); |
| 244 | + cy.get('[data-cy="boreholes-number-preview"]').should("have.text", "1"); |
| 245 | + }); |
| 246 | + }); |
| 247 | + |
223 | 248 | it("filters boreholes by color and uscs3", () => {
|
224 | 249 | loginAsAdmin();
|
225 | 250 | cy.get('[data-cy="show-filter-button"]').click();
|
|
0 commit comments