File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
curriculum/challenges/english/25-front-end-development/lab-real-time-counter Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,16 @@ const charCount = document.getElementById('char-count');
65
65
textInput .value = " I am learning a new language and it is called c++." ;
66
66
textInput .dispatchEvent (new Event (' input' ));
67
67
textInput .dispatchEvent (new Event (' change' ));
68
- assert .strictEqual (charCount .style .color , ' red' );
68
+ const computedStyle = window .getComputedStyle (charCount);
69
+ assert .oneOf (computedStyle .color , [
70
+ " red" ,
71
+ " rgb(255, 0, 0)" ,
72
+ " rgb(100%, 0%, 0%)" ,
73
+ " rgba(255, 0, 0, 1)" ,
74
+ " rgba(100%, 0%, 0%, 1)" ,
75
+ " hsl(0, 100%, 50%)" ,
76
+ " hsla(0, 100%, 50%, 1)"
77
+ ]);
69
78
` ` `
70
79
71
80
If character count is greater than or equal to ` 50 ` , the user shouldn't be able to enter more characters.
You can’t perform that action at this time.
0 commit comments