mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-13 14:32:03 +00:00
fix(labs): translate the review validation messages and narrow a test lookup
This commit is contained in:
1 parent
eaced8226b
commit
1627aa6c57
6 files changed
+31
-1
No files matched your search
@@ -45,7 +45,7 @@ describe("<OcrRowEditor> required-field marking", () => {
|
||||
const html = render({ date: true });
|
||||
const invalid = html.match(/<input[^>]*aria-invalid="true"[^>]*>/g) ?? [];
|
||||
expect(invalid).toHaveLength(1);
|
||||
const describedBy = invalid[0].match(/aria-describedby="([^"]+)"/)?.[1];
|
||||
const describedBy = invalid[0]?.match(/aria-describedby="([^"]+)"/)?.[1];
|
||||
expect(describedBy).toBeTruthy();
|
||||
expect(html).toContain(`id="${describedBy}"`);
|
||||
expect(html).toContain("Add the sample date.");
|
||||
|
||||
Reference in new issue
Block a user