From 76c2ece683d3b8477a7918de57d0d56dc5e7bb37 Mon Sep 17 00:00:00 2001 From: cnesmithsalus <69365683+cnesmithsalus@users.noreply.github.com> Date: Thu, 26 Oct 2023 12:15:51 -0700 Subject: [PATCH] CE-181 (#174) Co-authored-by: afwilcox --- backend/db/migrations/R__Create-Test-Data.sql | 2 +- frontend/cypress/e2e/allegation-details-edit.cy.ts | 2 +- frontend/cypress/e2e/hwcr-details-edit.cy.ts | 13 +++++++------ frontend/cypress/support/commands.ts | 8 ++------ frontend/src/assets/sass/complaint.scss | 4 ++++ 5 files changed, 15 insertions(+), 14 deletions(-) diff --git a/backend/db/migrations/R__Create-Test-Data.sql b/backend/db/migrations/R__Create-Test-Data.sql index 20ffd7282..983be7b74 100644 --- a/backend/db/migrations/R__Create-Test-Data.sql +++ b/backend/db/migrations/R__Create-Test-Data.sql @@ -1275,7 +1275,7 @@ where t.complaint_identifier = '23-006888'; -- update the test records so that we can sort by them and find them via cypress tests update complaint set incident_reported_utc_timestmp = CURRENT_TIMESTAMP -where complaint_identifier in ('23-007890','23-006888','23-007023','23-000076'); +where complaint_identifier in ('23-007890','23-006888','23-007023','23-000076', '23-032528'); update complaint set caller_phone_1 = '+12505561234' where complaint_identifier = '23-000076'; diff --git a/frontend/cypress/e2e/allegation-details-edit.cy.ts b/frontend/cypress/e2e/allegation-details-edit.cy.ts index 37af12dae..87ac7b0e8 100644 --- a/frontend/cypress/e2e/allegation-details-edit.cy.ts +++ b/frontend/cypress/e2e/allegation-details-edit.cy.ts @@ -569,7 +569,7 @@ describe("Complaint Edit Page spec - Edit Allegation View", () => { }); it("it has a map on screen with no marker", function () { - cy.navigateToEditScreen(COMPLAINT_TYPES.ERS,"23-40004"); + cy.navigateToEditScreen(COMPLAINT_TYPES.ERS,"23-032528"); cy.verifyMapMarkerExists(false); cy.get(".comp-complaint-details-alert").should("exist"); }); diff --git a/frontend/cypress/e2e/hwcr-details-edit.cy.ts b/frontend/cypress/e2e/hwcr-details-edit.cy.ts index bdef92265..c4c20b101 100644 --- a/frontend/cypress/e2e/hwcr-details-edit.cy.ts +++ b/frontend/cypress/e2e/hwcr-details-edit.cy.ts @@ -217,9 +217,9 @@ describe("Complaint Edit Page spec - Edit View", () => { cy.get('span[id="comp-details-region"]').contains(editCallDetails.region); cy.get(".comp-attactant-badge").then(function ($defaultValue) { - expect($defaultValue.eq(0)).to.contain("Livestock"); - expect($defaultValue.eq(1)).to.contain("BBQ"); - expect($defaultValue.eq(2)).to.contain("Beehive"); + expect($defaultValue).to.contain("Livestock"); + expect($defaultValue).to.contain("BBQ"); + expect($defaultValue).to.contain("Beehive"); }); //end checking edit changes saved }); @@ -354,10 +354,11 @@ describe("Complaint Edit Page spec - Edit View", () => { originalCallDetails.region, ); + cy.get(".comp-attactant-badge").then(function ($defaultValue) { - expect($defaultValue.eq(0)).to.contain("Garbage"); - expect($defaultValue.eq(1)).to.contain("Freezer"); - expect($defaultValue.eq(2)).to.contain("Compost"); + expect($defaultValue).to.contain("Garbage"); + expect($defaultValue).to.contain("Freezer"); + expect($defaultValue).to.contain("Compost"); }); //end verifying changes are reverted }); diff --git a/frontend/cypress/support/commands.ts b/frontend/cypress/support/commands.ts index 2349f0d6e..aad5e844d 100644 --- a/frontend/cypress/support/commands.ts +++ b/frontend/cypress/support/commands.ts @@ -157,17 +157,13 @@ Cypress.Commands.add( //-- click on HWCR tab cy.get(`#${complaintType.toLowerCase()}-tab`).click({ force: true }); - // This doesn't always appear... commenting it out for now. I don't think it's required. - //cy.waitForSpinner(); - cy.get("#comp-zone-filter").should("exist").click({ force: true }); //clear zone filter so this complaint is in the list view cy.get("#comp-zone-filter").should("not.exist"); + cy.waitForSpinner(); cy.get("#comp-status-filter").should("exist").click({ force: true }); //clear status filter so this complaint is in the list view cy.get("#comp-status-filter").should("not.exist"); - - // This doesn't always appear... commenting it out for now. I don't think it's required. - // cy.waitForSpinner(); + cy.waitForSpinner(); //-- check to make sure there are items in the table cy.get("#complaint-list") diff --git a/frontend/src/assets/sass/complaint.scss b/frontend/src/assets/sass/complaint.scss index 4d0b965fd..cbad86fa9 100644 --- a/frontend/src/assets/sass/complaint.scss +++ b/frontend/src/assets/sass/complaint.scss @@ -15,6 +15,10 @@ } } +p { + white-space: pre-wrap; +} + .comp-complaint-breadcrumb { background-color: $bc-gov-primary-400; color: $white;