mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-13 16:04:36 -04:00
fix(curriculum): use checkVisibility for visibility tests (#55407)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
@@ -16,7 +16,7 @@ Use an event listener to invert the value of the `isModalShowing` variable, togg
|
||||
Your `rulesContainer` should not be visible initially.
|
||||
|
||||
```js
|
||||
assert.strictEqual(rulesContainer.style.display, "");
|
||||
assert.isFalse(rulesContainer.checkVisibility());
|
||||
```
|
||||
|
||||
When your `rulesBtn` is clicked, your `isModalShowing` should be `true`.
|
||||
@@ -29,7 +29,7 @@ assert.isTrue(isModalShowing);
|
||||
When your `rulesBtn` is clicked, your `rulesContainer` should be visible.
|
||||
|
||||
```js
|
||||
assert.include(["block", "inline", "inherit", "initial"], rulesContainer.style.display);
|
||||
assert.isTrue(rulesContainer.checkVisibility());
|
||||
```
|
||||
|
||||
When your `rulesBtn` is clicked, your `rulesBtn` should say `Hide Rules`.
|
||||
@@ -48,7 +48,7 @@ assert.isFalse(isModalShowing);
|
||||
When your `rulesBtn` is clicked again, your `rulesContainer` should not be visible.
|
||||
|
||||
```js
|
||||
assert.include(["hidden", "none", ""], rulesContainer.style.display);
|
||||
assert.isFalse(rulesContainer.checkVisibility());
|
||||
```
|
||||
|
||||
When your `rulesBtn` is clicked again, your `rulesBtn` should say `Show Rules`.
|
||||
|
||||
Reference in New Issue
Block a user