fix(curriculum): update tests in event hub lab (#57822)

This commit is contained in:
JungLee-Dev
2025-01-02 04:43:40 -07:00
committed by GitHub
parent e9a5358f80
commit abbd76fbc0

View File

@@ -92,7 +92,7 @@ const secondLink = document.querySelectorAll('header nav ul li a')[1];
assert.exists(secondLink);
```
The text of the first item in the unordered list should be `"Upcoming Events"`.
The text of the first item in the unordered list should be `Upcoming Events`.
```js
const firstLink = document.querySelectorAll('header nav>ul>li>a')[0];
@@ -107,6 +107,13 @@ const hrefAttribute = anchorElement?.getAttribute("href");
assert.strictEqual(hrefAttribute, "#upcoming-events");
```
The text of the second item in the unordered list should be `Past Events`.
```js
const secondLink = document.querySelectorAll('header nav>ul>li>a')[1];
assert.strictEqual(secondLink.innerText, "Past Events");
```
The second item in the unordered list should have the `href` set to `#past-events`.
```js
@@ -230,6 +237,22 @@ for (let img of imgElements) {
}
```
Each `h3` element should have the event title.
```js
const eventTitles = document.querySelectorAll('h3');
assert.isNotEmpty(eventTitles);
eventTitles.forEach((eventTitle => assert.isNotEmpty(eventTitle.innerText)));
```
Each `p` element shoud have the event description.
```js
const eventDescriptions = document.querySelectorAll('p');
assert.isNotEmpty(eventDescriptions);
eventDescriptions.forEach((eventDescription => assert.isNotEmpty(eventDescription.innerText)));
```
# --seed--
## --seed-contents--