Skip to content

Commit 7f15592

Browse files
Handle en-US formatted date string
1 parent c64dbef commit 7f15592

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

frontend/src/app/annotate/annotation-input/problem-details/problem-labels/manage-labels-modal/manage-labels-modal.component.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,8 @@ describe("ManageLabelsModalComponent", () => {
202202
const text = component.getAttachedByText(annotation);
203203

204204
expect(text).toContain("you");
205-
expect(text).toContain("15 March 2024");
205+
// Accept both US and non-US date formats (for GitHub Actions runners.)
206+
expect(text).toMatch(/(March 15, 2024|15 March 2024)/);
206207
});
207208

208209
it("should format attachment text for other user", () => {
@@ -216,7 +217,8 @@ describe("ManageLabelsModalComponent", () => {
216217
const text = component.getAttachedByText(annotation);
217218

218219
expect(text).toContain("Other User");
219-
expect(text).toContain("15 March 2024");
220+
// Accept both US and non-US date formats (for GitHub Actions runners.)
221+
expect(text).toMatch(/(March 15, 2024|15 March 2024)/);
220222
});
221223

222224
it("should handle unknown user when creating new annotations", fakeAsync(() => {

0 commit comments

Comments
 (0)