fix(curriculum): inconsistent show rules captialization (#55617)

This commit is contained in:
Gagan Bhullar
2024-07-23 11:18:27 -06:00
committed by GitHub
parent b14d435a74
commit b6d184fc40
13 changed files with 31 additions and 31 deletions

View File

@@ -9,7 +9,7 @@ dashedName: step-2
When the user clicks on the `Show rules` button, the rules for the game should display on the screen. When they click on the button again, the rules should be hidden.
Use an event listener to invert the value of the `isModalShowing` variable, toggle the visibility of the `rulesContainer`, and change the text of the `rulesBtn` to `Show Rules` or `Hide Rules`.
Use an event listener to invert the value of the `isModalShowing` variable, toggle the visibility of the `rulesContainer`, and change the text of the `rulesBtn` to `Show rules` or `Hide rules`.
# --hints--
@@ -32,10 +32,10 @@ When your `rulesBtn` is clicked, your `rulesContainer` should be visible.
assert.isTrue(rulesContainer.checkVisibility());
```
When your `rulesBtn` is clicked, your `rulesBtn` should say `Hide Rules`.
When your `rulesBtn` is clicked, your `rulesBtn` should say `Hide rules`.
```js
assert.strictEqual(rulesBtn.innerText.trim(), "Hide Rules");
assert.strictEqual(rulesBtn.innerText.trim(), "Hide rules");
```
When your `rulesBtn` is clicked again, your `isModalShowing` should be `false`.
@@ -51,10 +51,10 @@ When your `rulesBtn` is clicked again, your `rulesContainer` should not be visib
assert.isFalse(rulesContainer.checkVisibility());
```
When your `rulesBtn` is clicked again, your `rulesBtn` should say `Show Rules`.
When your `rulesBtn` is clicked again, your `rulesBtn` should say `Show rules`.
```js
assert.strictEqual(rulesBtn.innerText.trim(), "Show Rules");
assert.strictEqual(rulesBtn.innerText.trim(), "Show rules");
```
# --seed--

View File

@@ -313,10 +313,10 @@ rulesBtn.addEventListener("click", () => {
isModalShowing = !isModalShowing;
if (isModalShowing) {
rulesBtn.textContent = "Hide Rules";
rulesBtn.textContent = "Hide rules";
rulesContainer.style.display = "block";
} else {
rulesBtn.textContent = "Show Rules";
rulesBtn.textContent = "Show rules";
rulesContainer.style.display = "none";
}
});

View File

@@ -316,10 +316,10 @@ rulesBtn.addEventListener("click", () => {
isModalShowing = !isModalShowing;
if (isModalShowing) {
rulesBtn.textContent = "Hide Rules";
rulesBtn.textContent = "Hide rules";
rulesContainer.style.display = "block";
} else {
rulesBtn.textContent = "Show Rules";
rulesBtn.textContent = "Show rules";
rulesContainer.style.display = "none";
}
});

View File

@@ -330,10 +330,10 @@ rulesBtn.addEventListener("click", () => {
isModalShowing = !isModalShowing;
if (isModalShowing) {
rulesBtn.textContent = "Hide Rules";
rulesBtn.textContent = "Hide rules";
rulesContainer.style.display = "block";
} else {
rulesBtn.textContent = "Show Rules";
rulesBtn.textContent = "Show rules";
rulesContainer.style.display = "none";
}
});

View File

@@ -332,10 +332,10 @@ rulesBtn.addEventListener("click", () => {
isModalShowing = !isModalShowing;
if (isModalShowing) {
rulesBtn.textContent = "Hide Rules";
rulesBtn.textContent = "Hide rules";
rulesContainer.style.display = "block";
} else {
rulesBtn.textContent = "Show Rules";
rulesBtn.textContent = "Show rules";
rulesContainer.style.display = "none";
}
});

View File

@@ -379,10 +379,10 @@ rulesBtn.addEventListener("click", () => {
isModalShowing = !isModalShowing;
if (isModalShowing) {
rulesBtn.textContent = "Hide Rules";
rulesBtn.textContent = "Hide rules";
rulesContainer.style.display = "block";
} else {
rulesBtn.textContent = "Show Rules";
rulesBtn.textContent = "Show rules";
rulesContainer.style.display = "none";
}
});

View File

@@ -387,10 +387,10 @@ rulesBtn.addEventListener("click", () => {
isModalShowing = !isModalShowing;
if (isModalShowing) {
rulesBtn.textContent = "Hide Rules";
rulesBtn.textContent = "Hide rules";
rulesContainer.style.display = "block";
} else {
rulesBtn.textContent = "Show Rules";
rulesBtn.textContent = "Show rules";
rulesContainer.style.display = "none";
}
});

View File

@@ -400,10 +400,10 @@ rulesBtn.addEventListener("click", () => {
isModalShowing = !isModalShowing;
if (isModalShowing) {
rulesBtn.textContent = "Hide Rules";
rulesBtn.textContent = "Hide rules";
rulesContainer.style.display = "block";
} else {
rulesBtn.textContent = "Show Rules";
rulesBtn.textContent = "Show rules";
rulesContainer.style.display = "none";
}
});

View File

@@ -415,10 +415,10 @@ rulesBtn.addEventListener("click", () => {
isModalShowing = !isModalShowing;
if (isModalShowing) {
rulesBtn.textContent = "Hide Rules";
rulesBtn.textContent = "Hide rules";
rulesContainer.style.display = "block";
} else {
rulesBtn.textContent = "Show Rules";
rulesBtn.textContent = "Show rules";
rulesContainer.style.display = "none";
}
});

View File

@@ -388,10 +388,10 @@ rulesBtn.addEventListener("click", () => {
isModalShowing = !isModalShowing;
if (isModalShowing) {
rulesBtn.textContent = "Hide Rules";
rulesBtn.textContent = "Hide rules";
rulesContainer.style.display = "block";
} else {
rulesBtn.textContent = "Show Rules";
rulesBtn.textContent = "Show rules";
rulesContainer.style.display = "none";
}
});

View File

@@ -455,10 +455,10 @@ rulesBtn.addEventListener("click", () => {
isModalShowing = !isModalShowing;
if (isModalShowing) {
rulesBtn.textContent = "Hide Rules";
rulesBtn.textContent = "Hide rules";
rulesContainer.style.display = "block";
} else {
rulesBtn.textContent = "Show Rules";
rulesBtn.textContent = "Show rules";
rulesContainer.style.display = "none";
}
});

View File

@@ -441,10 +441,10 @@ rulesBtn.addEventListener("click", () => {
isModalShowing = !isModalShowing;
if (isModalShowing) {
rulesBtn.textContent = "Hide Rules";
rulesBtn.textContent = "Hide rules";
rulesContainer.style.display = "block";
} else {
rulesBtn.textContent = "Show Rules";
rulesBtn.textContent = "Show rules";
rulesContainer.style.display = "none";
}
});

View File

@@ -459,10 +459,10 @@ rulesBtn.addEventListener("click", () => {
isModalShowing = !isModalShowing;
if (isModalShowing) {
rulesBtn.textContent = "Hide Rules";
rulesBtn.textContent = "Hide rules";
rulesContainer.style.display = "block";
} else {
rulesBtn.textContent = "Show Rules";
rulesBtn.textContent = "Show rules";
rulesContainer.style.display = "none";
}
});
@@ -904,10 +904,10 @@ rulesBtn.addEventListener("click", () => {
isModalShowing = !isModalShowing;
if (isModalShowing) {
rulesBtn.textContent = "Hide Rules";
rulesBtn.textContent = "Hide rules";
rulesContainer.style.display = "block";
} else {
rulesBtn.textContent = "Show Rules";
rulesBtn.textContent = "Show rules";
rulesContainer.style.display = "none";
}
});