From abbd76fbc0894c227b65c658572389a33ddcea79 Mon Sep 17 00:00:00 2001 From: JungLee-Dev <122341199+JungLee-Dev@users.noreply.github.com> Date: Thu, 2 Jan 2025 04:43:40 -0700 Subject: [PATCH] fix(curriculum): update tests in event hub lab (#57822) --- .../lab-event-hub/66ebd4ae2812430bb883c787.md | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/curriculum/challenges/english/25-front-end-development/lab-event-hub/66ebd4ae2812430bb883c787.md b/curriculum/challenges/english/25-front-end-development/lab-event-hub/66ebd4ae2812430bb883c787.md index 2e5af1de7ed..b981f5b9311 100644 --- a/curriculum/challenges/english/25-front-end-development/lab-event-hub/66ebd4ae2812430bb883c787.md +++ b/curriculum/challenges/english/25-front-end-development/lab-event-hub/66ebd4ae2812430bb883c787.md @@ -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--