fix(curriculum):Incorrect answer passes test for Set the font-size for Multiple Heading Elements challenge. (#43297)

This commit is contained in:
srijit2002
2021-08-25 23:46:49 +05:30
committed by GitHub
parent cd005668b9
commit ab3e12935d

View File

@ -29,38 +29,43 @@ The `font-size` property is used to specify how large the text is in a given ele
Your code should set the `font-size` property for the `h1` tag to 68 pixels.
```js
assert($('h1').css('font-size') == '68px');
const fontSizeOfh1 = new __helpers.CSSHelp(document).getStyle('h1')?.getPropertyValue('font-size');
assert(fontSizeOfh1 === '68px');
```
Your code should set the `font-size` property for the `h2` tag to 52 pixels.
```js
assert($('h2').css('font-size') == '52px');
const fontSizeOfh2 = new __helpers.CSSHelp(document).getStyle('h2')?.getPropertyValue('font-size');
assert(fontSizeOfh2 === '52px');
```
Your code should set the `font-size` property for the `h3` tag to 40 pixels.
```js
assert($('h3').css('font-size') == '40px');
const fontSizeOfh3 = new __helpers.CSSHelp(document).getStyle('h3')?.getPropertyValue('font-size');
assert(fontSizeOfh3 === '40px');
```
Your code should set the `font-size` property for the `h4` tag to 32 pixels.
```js
assert($('h4').css('font-size') == '32px');
const fontSizeOfh4 = new __helpers.CSSHelp(document).getStyle('h4')?.getPropertyValue('font-size');
assert(fontSizeOfh4 === '32px');
```
Your code should set the `font-size` property for the `h5` tag to 21 pixels.
```js
assert($('h5').css('font-size') == '21px');
const fontSizeOfh5 = new __helpers.CSSHelp(document).getStyle('h5')?.getPropertyValue('font-size');
assert(fontSizeOfh5 === '21px');
```
Your code should set the `font-size` property for the `h6` tag to 14 pixels.
```js
const regex = /h6\s*\{\s*font-size\s*:\s*14px\s*(;\s*\}|\})/i;
assert.strictEqual(true, regex.test(code));
const fontSizeOfh6 = new __helpers.CSSHelp(document).getStyle('h6')?.getPropertyValue('font-size');
assert(fontSizeOfh6 === '14px');
```
# --seed--