From 42504c26e33fc9937d21768000f1cdeb5746a0ab Mon Sep 17 00:00:00 2001 From: Alec Li Date: Mon, 18 Dec 2023 22:02:34 -0800 Subject: [PATCH] Fix regex for datetime parsing --- cypress/e2e/course/coordinator-course.cy.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/e2e/course/coordinator-course.cy.ts b/cypress/e2e/course/coordinator-course.cy.ts index 579325e9..71609a24 100644 --- a/cypress/e2e/course/coordinator-course.cy.ts +++ b/cypress/e2e/course/coordinator-course.cy.ts @@ -34,7 +34,7 @@ const checkCardOrder = () => { .text() .trim() // replace all weird spaces; see https://jkorpela.fi/chars/spaces.html - .replace(/[\u00A0\u1680\u180E\u2000-\u200B\u202F\u205F\u3000\uFEFF]/, " "); + .replace(/[\u00A0\u1680\u180E\u2000-\u200B\u202F\u205F\u3000\uFEFF]/g, " "); // time of form [day] [start]-[end] [AM/PM] // or of form [day] [start] [AM/PM]-[end] [AM/PM] const matches = text.match(/\w+, (\d\d?:\d\d(?: AM| PM)?)\s*–\s*(\d\d?:\d\d (?:A|P)M)/g);