mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(curriculum): fixed test to allow both inline styles and CSS classes for text color (#58555)
This commit is contained in:
+10
-1
@@ -65,7 +65,16 @@ const charCount = document.getElementById('char-count');
|
||||
textInput.value = "I am learning a new language and it is called c++.";
|
||||
textInput.dispatchEvent(new Event('input'));
|
||||
textInput.dispatchEvent(new Event('change'));
|
||||
assert.strictEqual(charCount.style.color, 'red');
|
||||
const computedStyle = window.getComputedStyle(charCount);
|
||||
assert.oneOf(computedStyle.color, [
|
||||
"red",
|
||||
"rgb(255, 0, 0)",
|
||||
"rgb(100%, 0%, 0%)",
|
||||
"rgba(255, 0, 0, 1)",
|
||||
"rgba(100%, 0%, 0%, 1)",
|
||||
"hsl(0, 100%, 50%)",
|
||||
"hsla(0, 100%, 50%, 1)"
|
||||
]);
|
||||
```
|
||||
|
||||
If character count is greater than or equal to `50`, the user shouldn't be able to enter more characters.
|
||||
|
||||
Reference in New Issue
Block a user