fix(curriculum): make spaces optional in movie rating test (#60524)

Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>
This commit is contained in:
Hannah Le 2025-05-26 09:55:58 -07:00 committed by GitHub
parent 1b14282da0
commit 469f0c0f0b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -83,7 +83,7 @@ const spanEl = document.querySelector("main p:nth-of-type(2) span");
const fullRatingText = document.querySelector("main p:nth-of-type(2)")?.textContent.replace(/\s+/g, ' ').trim();
assert.match(spanEl?.innerText, /^[⭐☆]{10}$/);
assert.match(fullRatingText, /Movie Rating:?\s?[⭐☆]{10}\s+\(\d+(?:\.\d+)?\/10\)$/);
assert.match(fullRatingText, /Movie Rating:?\s*[⭐☆]{10}\s*\(\s*\d+(?:\.\d+)?\s*\/\s*10\s*\)$/);
```
The `span` element inside the rating paragraph should have an `aria-hidden` attribute set to `true`.