fix(curriculum): allow hex triplets for red and green colors to pass tests (#38523)

This commit is contained in:
Ashraf Nazar
2020-04-12 15:15:31 +01:00
committed by GitHub
parent 1d87dd82e3
commit 99c2f0d4f5

View File

@ -29,11 +29,11 @@ tests:
- text: Your <code>h1</code> element with the text <code>I am red!</code> should be given the <code>color</code> red.
testString: assert($('.red-text').css('color') === 'rgb(255, 0, 0)');
- text: The <code>hex code</code> for the color red should be used instead of the word <code>red</code>.
testString: assert(code.match(/\.red-text\s*?{\s*?color:\s*?#FF0000\s*?;\s*?}/gi));
testString: assert(code.match(/\.red-text\s*?{\s*?color:\s*?(#FF0000|#F00)\s*?;\s*?}/gi));
- text: Your <code>h1</code> element with the text <code>I am green!</code> should be given the <code>color</code> green.
testString: assert($('.green-text').css('color') === 'rgb(0, 255, 0)');
- text: The <code>hex code</code> for the color green should be used instead of the word <code>green</code>.
testString: assert(code.match(/\.green-text\s*?{\s*?color:\s*?#00FF00\s*?;\s*?}/gi));
testString: assert(code.match(/\.green-text\s*?{\s*?color:\s*?(#00FF00|#0F0)\s*?;\s*?}/gi));
- text: Your <code>h1</code> element with the text <code>I am dodger blue!</code> should be given the <code>color</code> dodger blue.
testString: assert($('.dodger-blue-text').css('color') === 'rgb(30, 144, 255)');
- text: The <code>hex code</code> for the color dodger blue should be used instead of the word <code>dodgerblue</code>.