fix(curriculum): accept grouped selectors for hr/section width checks (#59280)

Co-authored-by: Anna <a.rcottrill521@gmail.com>
This commit is contained in:
jasneetsingh6114
2025-03-21 19:05:04 -04:00
committed by GitHub
parent 4161577bb5
commit bd8231572d
@@ -132,13 +132,23 @@ assert.isAtLeast(document.querySelectorAll('hr')?.length, 1);
The width of your `hr` elements should be set using a percent value.
```js
assert.isTrue(new __helpers.CSSHelp(document).getStyle('hr')?.width.endsWith('%'));
assert.isTrue([...new __helpers.CSSHelp(document).getCSSRules().values()].some(rule =>
rule.selectorText.split(',').some(selector =>
selector.trim() === 'hr' &&
rule.style.width?.endsWith('%')
)
));
```
The width of your `section` elements should be set using a percent value.
```js
assert.isTrue(new __helpers.CSSHelp(document).getStyle('section')?.width.endsWith('%'));
assert.isTrue([...new __helpers.CSSHelp(document).getCSSRules().values()].some(rule =>
rule.selectorText.split(',').some(selector =>
selector.trim() === 'section' &&
rule.style.width?.endsWith('%')
)
));
```
# --seed--