fix(curriculum): element references in Storytelling App (#60369)

This commit is contained in:
Huyen Nguyen
2025-05-15 20:51:06 +07:00
committed by GitHub
parent a22577eaa6
commit ece81bdca2
5 changed files with 6 additions and 6 deletions

View File

@@ -7,7 +7,7 @@ dashedName: step-2
# --description--
Create a `main` element with a class of `story-container`. Inside the `story-container`, create a `div` with a class of `btn-container`.
Create a `main` element with a class of `story-container`. Inside the `.story-container` element, create a `div` with a class of `btn-container`.
# --hints--
@@ -17,7 +17,7 @@ You should have a `main` element with a class of `story-container`.
assert.exists(document.querySelector('main.story-container'));
```
Inside the `story-container` element, you should have a `div` with a class of `btn-container`.
Inside the `.story-container` element, you should have a `div` with a class of `btn-container`.
```js
assert.exists(document.querySelector('main.story-container div.btn-container'));

View File

@@ -11,7 +11,7 @@ Inside the `.btn-container` , create three buttons for each type of story. Give
# --hints--
Inside the `btn-container` div, you should have three buttons.
Inside the `.btn-container` element, you should have three buttons.
```js
assert.lengthOf(document.querySelectorAll('.btn-container > button') ,3);

View File

@@ -17,7 +17,7 @@ You should create a `script` element.
assert.lengthOf(document.querySelectorAll('script'), 3);
```
Your `script` element should have an `src` attribute set to `script.js`.
Your `script` element should have a `src` attribute set to `script.js`.
```js
const script = document.querySelector("script[data-src$='script.js']");

View File

@@ -17,7 +17,7 @@ You should have a `storyContainer` variable.
assert.isDefined(storyContainer);
```
You should select the `div` with the class `story-container` using the `querySelector` method and store it in the `storyContainer` variable.
You should select the `.story-container` element using the `querySelector` method and store it in the `storyContainer` variable.
```js
assert.deepEqual(storyContainer, document.querySelector(".story-container"));

View File

@@ -18,7 +18,7 @@ assert.isDefined(scaryStoryBtn);
assert.deepEqual(scaryStoryBtn, document.getElementById("scary-btn"));
```
You should select the `#funny-btn` button using the `getElementById` method and store it in the `funnyStoryBtn` variable.
You should select the `#funny-btn` button using the `getElementById` method and store it in the `funnyStoryBtn` variable.
```js
assert.isDefined(funnyStoryBtn);