Skip to content

Commit

Permalink
Hotfix: Update e2e for rewrite frontend (#5246)
Browse files Browse the repository at this point in the history
* Update cypress specs for rewrite

* Remove dead projects from url lists

* Update spec regex
  • Loading branch information
EMcQ-BES authored Dec 6, 2023
1 parent be71542 commit a6f269c
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 131 deletions.
72 changes: 0 additions & 72 deletions packages/e2e/cypress/config/dashboardReportUrls/covidau.json

This file was deleted.

52 changes: 0 additions & 52 deletions packages/e2e/cypress/config/dashboardReportUrls/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,32 +161,6 @@
"orgUnit": "TO",
"dashboard": "PEHS"
},
{
"code": "COVID_Compose_Daily_Deaths_Vs_Cases",
"project": "covidau",
"orgUnit": "AU",
"dashboard": "COVID-19"
},
{
"code": "COVID_New_Cases_By_State",
"project": "covidau",
"orgUnit": "AU",
"dashboard": "COVID-19",
"startDate": "2021-05-30",
"endDate": "2021-05-30"
},
{
"code": "COVID_Total_Cases_By_State",
"project": "covidau",
"orgUnit": "AU",
"dashboard": "COVID-19"
},
{
"code": "COVID_Compose_Cumulative_Deaths_Vs_Cases",
"project": "covidau",
"orgUnit": "AU_Australian Capital Territory",
"dashboard": "COVID-19"
},
{
"code": "FETP_PG_graduate_by_district",
"project": "fetp",
Expand All @@ -205,12 +179,6 @@
"orgUnit": "FETP-DYO3",
"dashboard": "FETP"
},
{
"code": "LA_EOC_Total_Dengue_Cases_by_Week",
"project": "laos_eoc",
"orgUnit": "LA_Bokeo",
"dashboard": "Dengue"
},
{
"code": "LA_Laos_Schools_Resources_Percentage_Primary",
"project": "laos_schools",
Expand All @@ -223,26 +191,6 @@
"orgUnit": "LA",
"dashboard": "ICT Facilities"
},
{
"code": "Laos_EOC_Malaria_Critical_Item_Availability",
"project": "laos_eoc",
"orgUnit": "LA-BK AH Bokeo (Military)",
"dashboard": "Malaria"
},
{
"code": "Laos_EOC_Malaria_Critical_Item_Availability_Single_Value",
"project": "laos_eoc",
"orgUnit": "LA-BK AH Bokeo (Military)",
"dashboard": "Malaria",
"startDate": "2020-06-01",
"endDate": "2020-06-30"
},
{
"code": "Laos_EOC_Malaria_Stock_Availability_Facility",
"project": "laos_eoc",
"orgUnit": "LA-BK AH Bokeo (Military)",
"dashboard": "Malaria"
},
{
"code": "Laos_Schools_Age_Of_Computers_By_School_Type",
"project": "laos_schools",
Expand Down
5 changes: 0 additions & 5 deletions packages/e2e/cypress/config/mapOverlayUrls/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@
"project": "explore",
"orgUnit": "TO"
},
{
"id": "COVID_AU_State_Total_Number_Confirmed_Cases",
"project": "covidau",
"orgUnit": "AU"
},
{
"id": "COVID_Facility_Commodities_Soap",
"project": "explore",
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e/cypress/e2e/dashboardReports.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const urlToRouteRegex = url => {
throw new Error(`'${url}' is not a valid report url: it must contain a 'report' query param`);
}

return new RegExp(`report/.*\\?(.*&|)isExpanded=true&(.*&|)itemCode=${itemCode}(&|$)`);
return new RegExp(`(legacyDashboardReport|report)/.*\\?(.*&|)itemCode=${itemCode}(&|$)`);
};

describe('Dashboard reports', () => {
Expand Down
5 changes: 4 additions & 1 deletion packages/e2e/cypress/e2e/mapOverlays.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ const urlToRouteRegex = url => {
throw new Error(`'${url}' is not a valid report url: it must contain a 'report' query param`);
}

return new RegExp(`measureData\\?(.*&|)mapOverlayCode=${mapOverlayCode}(&|$)`);
// Allows responses for both versions of the frontend
return new RegExp(
`(measureData\\?(.*&|)mapOverlayCode=${mapOverlayCode}(&|$)|legacyMapOverlayReport/${mapOverlayCode})`,
);
};

describe('Map overlays', () => {
Expand Down

0 comments on commit a6f269c

Please sign in to comment.