chore(curriculum): update two tests to use specific asserts (#60981)

This commit is contained in:
Anuj Nayak
2025-06-23 21:44:15 +05:30
committed by GitHub
parent 0691983b34
commit 170df37c8b
@@ -26,15 +26,26 @@ assert(document.querySelectorAll('i')?.length === 5);
Each `a` element should only have one `i` element.
```js
const aaaaa = [...document.querySelectorAll('.social-icons a')];
assert(aaaaa?.every(a => a?.children?.length === 1 && a?.children?.[0]?.localName === 'i'));
const aaaaa = document.querySelectorAll('.social-icons a');
assert.lengthOf(aaaaa, 5);
aaaaa?.forEach(
a => {
assert.lengthOf(a?.children, 1);
assert.equal(a?.children?.[0]?.localName, 'i');
}
);
```
Each `i` element should have a `class` attribute which includes `fab`.
```js
const iiiii = [...document.querySelectorAll('i')];
assert(iiiii?.every(i => i?.classList?.contains('fab')));
const iiiii = document.querySelectorAll('i');
assert.lengthOf(iiiii, 5);
iiiii?.forEach(
i => {
assert.isTrue(i?.classList?.contains('fab'));
}
);
```
The first `i` element should have a `class` attribute which includes `fa-facebook-f`.