From ab3e12935d7a8e9f7ca3d55dea0ee3feba3dfc5f Mon Sep 17 00:00:00 2001 From: srijit2002 <74085816+srijit2002@users.noreply.github.com> Date: Wed, 25 Aug 2021 23:46:49 +0530 Subject: [PATCH] fix(curriculum):Incorrect answer passes test for Set the font-size for Multiple Heading Elements challenge. (#43297) --- ...font-size-for-multiple-heading-elements.md | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/curriculum/challenges/english/01-responsive-web-design/applied-visual-design/set-the-font-size-for-multiple-heading-elements.md b/curriculum/challenges/english/01-responsive-web-design/applied-visual-design/set-the-font-size-for-multiple-heading-elements.md index 34ffb58433..15fe7ce6df 100644 --- a/curriculum/challenges/english/01-responsive-web-design/applied-visual-design/set-the-font-size-for-multiple-heading-elements.md +++ b/curriculum/challenges/english/01-responsive-web-design/applied-visual-design/set-the-font-size-for-multiple-heading-elements.md @@ -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--