From 87615d2a7bad452ce3e59a7db6e1813200458776 Mon Sep 17 00:00:00 2001 From: Randell Dawson <5313213+RandellDawson@users.noreply.github.com> Date: Wed, 24 Jul 2019 02:50:51 -0700 Subject: [PATCH] fix: removed assert msg argument (#36406) --- ...-a-negative-margin-to-an-element.english.md | 2 +- ...add-borders-around-your-elements.english.md | 10 +++++----- ...rgins-to-each-side-of-an-element.english.md | 8 ++++---- ...dding-to-each-side-of-an-element.english.md | 8 ++++---- ...unded-corners-with-border-radius.english.md | 4 ++-- .../adjust-the-margin-of-an-element.english.md | 2 +- ...adjust-the-padding-of-an-element.english.md | 2 +- ...fallback-value-to-a-css-variable.english.md | 4 ++-- ...e-a-variable-for-a-specific-area.english.md | 2 +- ...ange-the-font-size-of-an-element.english.md | 2 +- .../create-a-custom-css-variable.english.md | 2 +- ...ackground-color-to-a-div-element.english.md | 4 ++-- .../basic-css/import-a-google-font.english.md | 6 +++--- .../basic-css/inherit-css-variables.english.md | 2 +- ...rit-styles-from-the-body-element.english.md | 14 +++++++------- ...ular-images-with-a-border-radius.english.md | 4 ++-- ...-other-styles-by-using-important.english.md | 12 ++++++------ ...rations-by-styling-id-attributes.english.md | 14 +++++++------- ...-declarations-with-inline-styles.english.md | 10 +++++----- ...verride-styles-in-subsequent-css.english.md | 8 ++++---- ...rioritize-one-style-over-another.english.md | 6 +++--- ...et-the-font-family-of-an-element.english.md | 2 +- .../set-the-id-of-an-element.english.md | 2 +- .../basic-css/size-your-images.english.md | 4 ++-- ...specify-how-fonts-should-degrade.english.md | 10 +++++----- ...ltiple-elements-with-a-css-class.english.md | 10 +++++----- .../style-the-html-body-element.english.md | 6 +++--- ...d-absolute-versus-relative-units.english.md | 4 ++-- ...-a-css-class-to-style-an-element.english.md | 8 ++++---- .../use-a-custom-css-variable.english.md | 8 ++++---- ...media-query-to-change-a-variable.english.md | 4 ++-- .../use-abbreviated-hex-code.english.md | 16 ++++++++-------- ...id-attribute-to-style-an-element.english.md | 8 ++++---- ...bute-selectors-to-style-elements.english.md | 6 +++--- ...pecify-the-padding-of-an-element.english.md | 8 ++++---- ...-css-selectors-to-style-elements.english.md | 10 +++++----- ...-change-several-elements-at-once.english.md | 6 +++--- ...use-hex-code-for-specific-colors.english.md | 4 ++-- .../use-hex-code-to-mix-colors.english.md | 16 ++++++++-------- .../basic-css/use-rgb-to-mix-colors.english.md | 16 ++++++++-------- ...use-rgb-values-to-color-elements.english.md | 4 ++-- .../add-a-submit-button-to-a-form.english.md | 8 ++++---- ...uttons-and-checkboxes-by-default.english.md | 4 ++-- .../comment-out-html.english.md | 10 +++++----- ...create-a-bulleted-unordered-list.english.md | 10 +++++----- .../create-a-form-element.english.md | 6 +++--- .../create-a-set-of-checkboxes.english.md | 10 +++++----- .../create-a-set-of-radio-buttons.english.md | 14 +++++++------- .../create-a-text-field.english.md | 2 +- .../create-an-ordered-list.english.md | 18 +++++++++--------- ...-the-doctype-of-an-html-document.english.md | 6 +++--- ...ead-and-body-of-an-html-document.english.md | 14 +++++++------- .../delete-html-elements.english.md | 6 +++--- ...-the-blank-with-placeholder-text.english.md | 2 +- .../headline-with-the-h2-element.english.md | 8 ++++---- ...nform-with-the-paragraph-element.english.md | 8 ++++---- .../introduction-to-html5-elements.english.md | 14 +++++++------- ...ernal-pages-with-anchor-elements.english.md | 6 +++--- ...s-of-a-page-with-anchor-elements.english.md | 12 ++++++------ ...dead-links-using-the-hash-symbol.english.md | 2 +- ...nchor-element-within-a-paragraph.english.md | 16 ++++++++-------- ...ents-within-a-single-div-element.english.md | 8 ++++---- .../say-hello-to-html-elements.english.md | 2 +- .../turn-an-image-into-a-link.english.md | 6 +++--- .../uncomment-html.english.md | 6 +++--- .../use-html5-to-require-a-field.english.md | 2 +- 66 files changed, 239 insertions(+), 239 deletions(-) diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-css/add-a-negative-margin-to-an-element.english.md b/curriculum/challenges/english/01-responsive-web-design/basic-css/add-a-negative-margin-to-an-element.english.md index f230b3526d..de7311952f 100644 --- a/curriculum/challenges/english/01-responsive-web-design/basic-css/add-a-negative-margin-to-an-element.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/basic-css/add-a-negative-margin-to-an-element.english.md @@ -23,7 +23,7 @@ Change the margin of the blue box to -15px, so it fill ```yml tests: - text: Your blue-box class should give elements -15px of margin. - testString: assert($(".blue-box").css("margin-top") === "-15px", 'Your blue-box class should give elements -15px of margin.'); + testString: assert($(".blue-box").css("margin-top") === "-15px"); ``` diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-css/add-borders-around-your-elements.english.md b/curriculum/challenges/english/01-responsive-web-design/basic-css/add-borders-around-your-elements.english.md index c6c3a56afc..87dd565b95 100644 --- a/curriculum/challenges/english/01-responsive-web-design/basic-css/add-borders-around-your-elements.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/basic-css/add-borders-around-your-elements.english.md @@ -35,15 +35,15 @@ Remember that you can apply multiple classes to an element using its class ```yml tests: - text: Your img element should have the class smaller-image. - testString: assert($("img").hasClass("smaller-image"), 'Your img element should have the class smaller-image.'); + testString: assert($("img").hasClass("smaller-image")); - text: Your img element should have the class thick-green-border. - testString: assert($("img").hasClass("thick-green-border"), 'Your img element should have the class thick-green-border.'); + testString: assert($("img").hasClass("thick-green-border")); - text: Give your image a border width of 10px. - testString: assert($("img").hasClass("thick-green-border") && parseInt($("img").css("border-top-width"), 10) >= 8 && parseInt($("img").css("border-top-width"), 10) <= 12, 'Give your image a border width of 10px.'); + testString: assert($("img").hasClass("thick-green-border") && parseInt($("img").css("border-top-width"), 10) >= 8 && parseInt($("img").css("border-top-width"), 10) <= 12); - text: Give your image a border style of solid. - testString: assert($("img").css("border-right-style") === "solid", 'Give your image a border style of solid.'); + testString: assert($("img").css("border-right-style") === "solid"); - text: The border around your img element should be green. - testString: assert($("img").css("border-left-color") === "rgb(0, 128, 0)", 'The border around your img element should be green.'); + testString: assert($("img").css("border-left-color") === "rgb(0, 128, 0)"); ``` diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-css/add-different-margins-to-each-side-of-an-element.english.md b/curriculum/challenges/english/01-responsive-web-design/basic-css/add-different-margins-to-each-side-of-an-element.english.md index 4861d14e80..147293a3bb 100644 --- a/curriculum/challenges/english/01-responsive-web-design/basic-css/add-different-margins-to-each-side-of-an-element.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/basic-css/add-different-margins-to-each-side-of-an-element.english.md @@ -22,13 +22,13 @@ Give the blue box a margin of 40px on its top and left ```yml tests: - text: Your blue-box class should give the top of elements 40px of margin. - testString: assert($(".blue-box").css("margin-top") === "40px", 'Your blue-box class should give the top of elements 40px of margin.'); + testString: assert($(".blue-box").css("margin-top") === "40px"); - text: Your blue-box class should give the right of elements 20px of margin. - testString: assert($(".blue-box").css("margin-right") === "20px", 'Your blue-box class should give the right of elements 20px of margin.'); + testString: assert($(".blue-box").css("margin-right") === "20px"); - text: Your blue-box class should give the bottom of elements 20px of margin. - testString: assert($(".blue-box").css("margin-bottom") === "20px", 'Your blue-box class should give the bottom of elements 20px of margin.'); + testString: assert($(".blue-box").css("margin-bottom") === "20px"); - text: Your blue-box class should give the left of elements 40px of margin. - testString: assert($(".blue-box").css("margin-left") === "40px", 'Your blue-box class should give the left of elements 40px of margin.'); + testString: assert($(".blue-box").css("margin-left") === "40px"); ``` diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-css/add-different-padding-to-each-side-of-an-element.english.md b/curriculum/challenges/english/01-responsive-web-design/basic-css/add-different-padding-to-each-side-of-an-element.english.md index 1840f628f8..a1af1d8abe 100644 --- a/curriculum/challenges/english/01-responsive-web-design/basic-css/add-different-padding-to-each-side-of-an-element.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/basic-css/add-different-padding-to-each-side-of-an-element.english.md @@ -22,13 +22,13 @@ Give the blue box a padding of 40px on its top and lef ```yml tests: - text: Your blue-box class should give the top of the elements 40px of padding. - testString: assert($(".blue-box").css("padding-top") === "40px", 'Your blue-box class should give the top of the elements 40px of padding.'); + testString: assert($(".blue-box").css("padding-top") === "40px"); - text: Your blue-box class should give the right of the elements 20px of padding. - testString: assert($(".blue-box").css("padding-right") === "20px", 'Your blue-box class should give the right of the elements 20px of padding.'); + testString: assert($(".blue-box").css("padding-right") === "20px"); - text: Your blue-box class should give the bottom of the elements 20px of padding. - testString: assert($(".blue-box").css("padding-bottom") === "20px", 'Your blue-box class should give the bottom of the elements 20px of padding.'); + testString: assert($(".blue-box").css("padding-bottom") === "20px"); - text: Your blue-box class should give the left of the elements 40px of padding. - testString: assert($(".blue-box").css("padding-left") === "40px", 'Your blue-box class should give the left of the elements 40px of padding.'); + testString: assert($(".blue-box").css("padding-left") === "40px"); ``` diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-css/add-rounded-corners-with-border-radius.english.md b/curriculum/challenges/english/01-responsive-web-design/basic-css/add-rounded-corners-with-border-radius.english.md index f4a32386de..e559b70f40 100644 --- a/curriculum/challenges/english/01-responsive-web-design/basic-css/add-rounded-corners-with-border-radius.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/basic-css/add-rounded-corners-with-border-radius.english.md @@ -22,9 +22,9 @@ You can specify a border-radius with pixels. Give your cat photo a ```yml tests: - text: Your image element should have the class "thick-green-border". - testString: assert($("img").hasClass("thick-green-border"), 'Your image element should have the class "thick-green-border".'); + testString: assert($("img").hasClass("thick-green-border")); - text: Your image should have a border radius of 10px - testString: assert($("img").css("border-top-left-radius") === '10px' && $("img").css("border-top-right-radius") === '10px' && $("img").css("border-bottom-left-radius") === '10px' && $("img").css("border-bottom-right-radius") === '10px', 'Your image should have a border radius of 10px'); + testString: assert($("img").css("border-top-left-radius") === '10px' && $("img").css("border-top-right-radius") === '10px' && $("img").css("border-bottom-left-radius") === '10px' && $("img").css("border-bottom-right-radius") === '10px'); ``` diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-css/adjust-the-margin-of-an-element.english.md b/curriculum/challenges/english/01-responsive-web-design/basic-css/adjust-the-margin-of-an-element.english.md index 94ecd7dd16..f20da2a039 100644 --- a/curriculum/challenges/english/01-responsive-web-design/basic-css/adjust-the-margin-of-an-element.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/basic-css/adjust-the-margin-of-an-element.english.md @@ -23,7 +23,7 @@ Change the margin of the blue box to match that of the red box. ```yml tests: - text: Your blue-box class should give elements 20px of margin. - testString: assert($(".blue-box").css("margin-top") === "20px", 'Your blue-box class should give elements 20px of margin.'); + testString: assert($(".blue-box").css("margin-top") === "20px"); ``` diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-css/adjust-the-padding-of-an-element.english.md b/curriculum/challenges/english/01-responsive-web-design/basic-css/adjust-the-padding-of-an-element.english.md index 65c375c8ee..be05dfafa6 100644 --- a/curriculum/challenges/english/01-responsive-web-design/basic-css/adjust-the-padding-of-an-element.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/basic-css/adjust-the-padding-of-an-element.english.md @@ -26,7 +26,7 @@ Change the padding of your blue box to match that of your red box. ```yml tests: - text: Your blue-box class should give elements 20px of padding. - testString: assert($(".blue-box").css("padding-top") === "20px", 'Your blue-box class should give elements 20px of padding.'); + testString: assert($(".blue-box").css("padding-top") === "20px"); ``` diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-css/attach-a-fallback-value-to-a-css-variable.english.md b/curriculum/challenges/english/01-responsive-web-design/basic-css/attach-a-fallback-value-to-a-css-variable.english.md index b3eb6df65a..4be293f2fd 100644 --- a/curriculum/challenges/english/01-responsive-web-design/basic-css/attach-a-fallback-value-to-a-css-variable.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/basic-css/attach-a-fallback-value-to-a-css-variable.english.md @@ -30,9 +30,9 @@ It looks like there is a problem with the variables supplied to the .pengu ```yml tests: - text: Apply the fallback value of black to the background property of the penguin-top class. - testString: assert(code.match(/.penguin-top\s*?{[\s\S]*background\s*?:\s*?var\(\s*?--pengiun-skin\s*?,\s*?black\s*?\)\s*?;[\s\S]*}[\s\S]*.penguin-bottom\s{/gi), 'Apply the fallback value of black to the background property of the penguin-top class.'); + testString: assert(code.match(/.penguin-top\s*?{[\s\S]*background\s*?:\s*?var\(\s*?--pengiun-skin\s*?,\s*?black\s*?\)\s*?;[\s\S]*}[\s\S]*.penguin-bottom\s{/gi)); - text: Apply the fallback value of black to the background property of the penguin-bottom class. - testString: assert(code.match(/.penguin-bottom\s*?{[\s\S]*background\s*?:\s*?var\(\s*?--pengiun-skin\s*?,\s*?black\s*?\)\s*?;[\s\S]*}/gi), 'Apply the fallback value of black to the background property of the penguin-bottom class.'); + testString: assert(code.match(/.penguin-bottom\s*?{[\s\S]*background\s*?:\s*?var\(\s*?--pengiun-skin\s*?,\s*?black\s*?\)\s*?;[\s\S]*}/gi)); ``` diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-css/change-a-variable-for-a-specific-area.english.md b/curriculum/challenges/english/01-responsive-web-design/basic-css/change-a-variable-for-a-specific-area.english.md index 595fd6c886..b498e2598d 100644 --- a/curriculum/challenges/english/01-responsive-web-design/basic-css/change-a-variable-for-a-specific-area.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/basic-css/change-a-variable-for-a-specific-area.english.md @@ -22,7 +22,7 @@ Change the value of --penguin-belly to white in the penguin class should reassign the --penguin-belly variable to white. - testString: assert(code.match(/.penguin\s*?{[\s\S]*--penguin-belly\s*?:\s*?white\s*?;[\s\S]*}/gi), 'The penguin class should reassign the --penguin-belly variable to white.'); + testString: assert(code.match(/.penguin\s*?{[\s\S]*--penguin-belly\s*?:\s*?white\s*?;[\s\S]*}/gi)); ``` diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-css/change-the-font-size-of-an-element.english.md b/curriculum/challenges/english/01-responsive-web-design/basic-css/change-the-font-size-of-an-element.english.md index f0a0369935..e97c47c274 100644 --- a/curriculum/challenges/english/01-responsive-web-design/basic-css/change-the-font-size-of-an-element.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/basic-css/change-the-font-size-of-an-element.english.md @@ -28,7 +28,7 @@ Inside the same <style> tag that contains your red-te ```yml tests: - text: Between the style tags, give the p elements font-size of 16px. Browser and Text zoom should be at 100%. - testString: assert(code.match(/p\s*{\s*font-size\s*:\s*16\s*px\s*;\s*}/i), 'Between the style tags, give the p elements font-size of 16px. Browser and Text zoom should be at 100%.'); + testString: assert(code.match(/p\s*{\s*font-size\s*:\s*16\s*px\s*;\s*}/i)); ``` diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-css/create-a-custom-css-variable.english.md b/curriculum/challenges/english/01-responsive-web-design/basic-css/create-a-custom-css-variable.english.md index 28879c9fb8..5dbca8009d 100644 --- a/curriculum/challenges/english/01-responsive-web-design/basic-css/create-a-custom-css-variable.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/basic-css/create-a-custom-css-variable.english.md @@ -28,7 +28,7 @@ In the penguin class, create a variable name --penguin-skinpenguin class should declare the --penguin-skin variable and assign it to gray. - testString: assert(code.match(/.penguin\s*?{[\s\S]*--penguin-skin\s*?:\s*?gray\s*?;[\s\S]*}/gi), 'penguin class should declare the --penguin-skin variable and assign it to gray.'); + testString: assert(code.match(/.penguin\s*?{[\s\S]*--penguin-skin\s*?:\s*?gray\s*?;[\s\S]*}/gi)); ``` diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-css/give-a-background-color-to-a-div-element.english.md b/curriculum/challenges/english/01-responsive-web-design/basic-css/give-a-background-color-to-a-div-element.english.md index 133cab49d5..eb6c2088e4 100644 --- a/curriculum/challenges/english/01-responsive-web-design/basic-css/give-a-background-color-to-a-div-element.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/basic-css/give-a-background-color-to-a-div-element.english.md @@ -29,9 +29,9 @@ Create a class called silver-background with the background-c ```yml tests: - text: Give your div element the class silver-background. - testString: assert($("div").hasClass("silver-background"), 'Give your div element the class silver-background.'); + testString: assert($("div").hasClass("silver-background")); - text: Your div element should have a silver background. - testString: assert($("div").css("background-color") === "rgb(192, 192, 192)", 'Your div element should have a silver background.'); + testString: assert($("div").css("background-color") === "rgb(192, 192, 192)"); - text: Define a class named silver-background within the style element and assign the value of silver to the background-color property. testString: assert(code.match(/\.silver-background\s*{\s*background-color:\s*silver;\s*}/), "Define a class named silver-background within the style element and assign the value of silver to the background-color property."); diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-css/import-a-google-font.english.md b/curriculum/challenges/english/01-responsive-web-design/basic-css/import-a-google-font.english.md index 65ae860e12..3c26174d95 100644 --- a/curriculum/challenges/english/01-responsive-web-design/basic-css/import-a-google-font.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/basic-css/import-a-google-font.english.md @@ -28,13 +28,13 @@ Create a font-family CSS rule that uses the Lobster fo ```yml tests: - text: Import the Lobster font. - testString: assert(new RegExp("googleapis", "gi").test(code), 'Import the Lobster font.'); + testString: assert(new RegExp("googleapis", "gi").test(code)); - text: Your h2 element should use the font Lobster. - testString: assert($("h2").css("font-family").match(/lobster/i), 'Your h2 element should use the font Lobster.'); + testString: assert($("h2").css("font-family").match(/lobster/i)); - text: Use an h2 CSS selector to change the font. testString: 'assert(/\s*h2\s*\{\s*font-family\:\s*(\"|")?Lobster(\"|")?(.{0,})\s*;\s*\}/gi.test(code), "Use an h2 CSS selector to change the font.");' - text: Your p element should still use the font monospace. - testString: assert($("p").css("font-family").match(/monospace/i), 'Your p element should still use the font monospace.'); + testString: assert($("p").css("font-family").match(/monospace/i)); ``` diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-css/inherit-css-variables.english.md b/curriculum/challenges/english/01-responsive-web-design/basic-css/inherit-css-variables.english.md index 1fbf7f7036..5ec4cbab00 100644 --- a/curriculum/challenges/english/01-responsive-web-design/basic-css/inherit-css-variables.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/basic-css/inherit-css-variables.english.md @@ -23,7 +23,7 @@ Define a variable named --penguin-belly in the :root s ```yml tests: - text: Declare the --penguin-belly variable in the :root and assign it to pink. - testString: assert(code.match(/:root\s*?{[\s\S]*--penguin-belly\s*?:\s*?pink\s*?;[\s\S]*}/gi), 'Declare the --penguin-belly variable in the :root and assign it to pink.'); + testString: assert(code.match(/:root\s*?{[\s\S]*--penguin-belly\s*?:\s*?pink\s*?;[\s\S]*}/gi)); ``` diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-css/inherit-styles-from-the-body-element.english.md b/curriculum/challenges/english/01-responsive-web-design/basic-css/inherit-styles-from-the-body-element.english.md index a571b33dab..95c0e69c8e 100644 --- a/curriculum/challenges/english/01-responsive-web-design/basic-css/inherit-styles-from-the-body-element.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/basic-css/inherit-styles-from-the-body-element.english.md @@ -24,19 +24,19 @@ Finally, give your body element the font-family of monospace< ```yml tests: - text: Create an h1 element. - testString: assert(($("h1").length > 0), 'Create an h1 element.'); + testString: assert(($("h1").length > 0)); - text: Your h1 element should have the text Hello World. - testString: assert(($("h1").length > 0 && $("h1").text().match(/hello world/i)), 'Your h1 element should have the text Hello World.'); + testString: assert(($("h1").length > 0 && $("h1").text().match(/hello world/i))); - text: Make sure your h1 element has a closing tag. - testString: assert(code.match(/<\/h1>/g) && code.match(/

/g).length === code.match(/

h1 element has a closing tag.'); + testString: assert(code.match(/<\/h1>/g) && code.match(/

/g).length === code.match(/

body element the color property of green. - testString: assert(($("body").css("color") === "rgb(0, 128, 0)"), 'Give your body element the color property of green.'); + testString: assert(($("body").css("color") === "rgb(0, 128, 0)")); - text: Give your body element the font-family property of monospace. - testString: assert(($("body").css("font-family").match(/monospace/i)), 'Give your body element the font-family property of monospace.'); + testString: assert(($("body").css("font-family").match(/monospace/i))); - text: Your h1 element should inherit the font monospace from your body element. - testString: assert(($("h1").length > 0 && $("h1").css("font-family").match(/monospace/i)), 'Your h1 element should inherit the font monospace from your body element.'); + testString: assert(($("h1").length > 0 && $("h1").css("font-family").match(/monospace/i))); - text: Your h1 element should inherit the color green from your body element. - testString: assert(($("h1").length > 0 && $("h1").css("color") === "rgb(0, 128, 0)"), 'Your h1 element should inherit the color green from your body element.'); + testString: assert(($("h1").length > 0 && $("h1").css("color") === "rgb(0, 128, 0)")); ``` diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-css/make-circular-images-with-a-border-radius.english.md b/curriculum/challenges/english/01-responsive-web-design/basic-css/make-circular-images-with-a-border-radius.english.md index 9fe13c32b1..45b589ed4d 100644 --- a/curriculum/challenges/english/01-responsive-web-design/basic-css/make-circular-images-with-a-border-radius.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/basic-css/make-circular-images-with-a-border-radius.english.md @@ -21,9 +21,9 @@ Give your cat photo a border-radius of 50%. ```yml tests: - text: Your image should have a border radius of 50%, making it perfectly circular. - testString: assert(parseInt($("img").css("border-top-left-radius")) > 48, 'Your image should have a border radius of 50%, making it perfectly circular.'); + testString: assert(parseInt($("img").css("border-top-left-radius")) > 48); - text: Be sure to use a percentage value of 50%. - testString: assert(code.match(/50%/g), 'Be sure to use a percentage value of 50%.'); + testString: assert(code.match(/50%/g)); ``` diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-css/override-all-other-styles-by-using-important.english.md b/curriculum/challenges/english/01-responsive-web-design/basic-css/override-all-other-styles-by-using-important.english.md index af602690a7..daf55d476a 100644 --- a/curriculum/challenges/english/01-responsive-web-design/basic-css/override-all-other-styles-by-using-important.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/basic-css/override-all-other-styles-by-using-important.english.md @@ -26,17 +26,17 @@ An example of how to do this is: ```yml tests: - text: Your h1 element should have the class pink-text. - testString: assert($("h1").hasClass("pink-text"), 'Your h1 element should have the class pink-text.'); + testString: assert($("h1").hasClass("pink-text")); - text: Your h1 element should have the class blue-text. - testString: assert($("h1").hasClass("blue-text"), 'Your h1 element should have the class blue-text.'); + testString: assert($("h1").hasClass("blue-text")); - text: Your h1 element should have the id of orange-text. - testString: assert($("h1").attr("id") === "orange-text", 'Your h1 element should have the id of orange-text.'); + testString: assert($("h1").attr("id") === "orange-text"); - text: Your h1 element should have the inline style of color: white. - testString: assert(code.match(/h1 element should have the inline style of color: white.'); + testString: assert(code.match(/pink-text class declaration should have the !important keyword to override all other declarations. - testString: assert(code.match(/\.pink-text\s*?\{[\s\S]*?color:.*pink.*!important\s*;?[^\.]*\}/g), 'Your pink-text class declaration should have the !important keyword to override all other declarations.'); + testString: assert(code.match(/\.pink-text\s*?\{[\s\S]*?color:.*pink.*!important\s*;?[^\.]*\}/g)); - text: Your h1 element should be pink. - testString: assert($("h1").css("color") === "rgb(255, 192, 203)", 'Your h1 element should be pink.'); + testString: assert($("h1").css("color") === "rgb(255, 192, 203)"); ``` diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-css/override-class-declarations-by-styling-id-attributes.english.md b/curriculum/challenges/english/01-responsive-web-design/basic-css/override-class-declarations-by-styling-id-attributes.english.md index d65f30c8e8..fbf2e0959f 100644 --- a/curriculum/challenges/english/01-responsive-web-design/basic-css/override-class-declarations-by-styling-id-attributes.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/basic-css/override-class-declarations-by-styling-id-attributes.english.md @@ -34,19 +34,19 @@ Create a CSS declaration for your orange-text id in your styl ```yml tests: - text: Your h1 element should have the class pink-text. - testString: assert($("h1").hasClass("pink-text"), 'Your h1 element should have the class pink-text.'); + testString: assert($("h1").hasClass("pink-text")); - text: Your h1 element should have the class blue-text. - testString: assert($("h1").hasClass("blue-text"), 'Your h1 element should have the class blue-text.'); + testString: assert($("h1").hasClass("blue-text")); - text: Give your h1 element the id of orange-text. - testString: assert($("h1").attr("id") === "orange-text", 'Give your h1 element the id of orange-text.'); + testString: assert($("h1").attr("id") === "orange-text"); - text: There should be only one h1 element. - testString: assert(($("h1").length === 1), 'There should be only one h1 element.'); + testString: assert(($("h1").length === 1)); - text: Create a CSS declaration for your orange-text id - testString: assert(code.match(/#orange-text\s*{/gi), 'Create a CSS declaration for your orange-text id'); + testString: assert(code.match(/#orange-text\s*{/gi)); - text: Do not give your h1 any style attributes. - testString: assert(!code.match(//gi), 'Do not give your h1 any style attributes.'); + testString: assert(!code.match(//gi)); - text: Your h1 element should be orange. - testString: assert($("h1").css("color") === "rgb(255, 165, 0)", 'Your h1 element should be orange.'); + testString: assert($("h1").css("color") === "rgb(255, 165, 0)"); ``` diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-css/override-class-declarations-with-inline-styles.english.md b/curriculum/challenges/english/01-responsive-web-design/basic-css/override-class-declarations-with-inline-styles.english.md index 8967bea4aa..9d48eb4ebe 100644 --- a/curriculum/challenges/english/01-responsive-web-design/basic-css/override-class-declarations-with-inline-styles.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/basic-css/override-class-declarations-with-inline-styles.english.md @@ -24,15 +24,15 @@ Leave the blue-text and pink-text classes on your h1 element should have the class pink-text. - testString: assert($("h1").hasClass("pink-text"), 'Your h1 element should have the class pink-text.'); + testString: assert($("h1").hasClass("pink-text")); - text: Your h1 element should have the class blue-text. - testString: assert($("h1").hasClass("blue-text"), 'Your h1 element should have the class blue-text.'); + testString: assert($("h1").hasClass("blue-text")); - text: Your h1 element should have the id of orange-text. - testString: assert($("h1").attr("id") === "orange-text", 'Your h1 element should have the id of orange-text.'); + testString: assert($("h1").attr("id") === "orange-text"); - text: Give your h1 element an inline style. - testString: assert(document.querySelector('h1[style]'), 'Give your h1 element an inline style.'); + testString: assert(document.querySelector('h1[style]')); - text: Your h1 element should be white. - testString: assert($("h1").css("color") === "rgb(255, 255, 255)", 'Your h1 element should be white.'); + testString: assert($("h1").css("color") === "rgb(255, 255, 255)"); ``` diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-css/override-styles-in-subsequent-css.english.md b/curriculum/challenges/english/01-responsive-web-design/basic-css/override-styles-in-subsequent-css.english.md index 1e46d3a104..cffddd15e6 100644 --- a/curriculum/challenges/english/01-responsive-web-design/basic-css/override-styles-in-subsequent-css.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/basic-css/override-styles-in-subsequent-css.english.md @@ -27,13 +27,13 @@ However, the order of the class declarations in the <styl ```yml tests: - text: Your h1 element should have the class pink-text. - testString: assert($("h1").hasClass("pink-text"), 'Your h1 element should have the class pink-text.'); + testString: assert($("h1").hasClass("pink-text")); - text: Your h1 element should have the class blue-text. - testString: assert($("h1").hasClass("blue-text"), 'Your h1 element should have the class blue-text.'); + testString: assert($("h1").hasClass("blue-text")); - text: Both blue-text and pink-text should belong to the same h1 element. - testString: assert($(".pink-text").hasClass("blue-text"), 'Both blue-text and pink-text should belong to the same h1 element.'); + testString: assert($(".pink-text").hasClass("blue-text")); - text: Your h1 element should be blue. - testString: assert($("h1").css("color") === "rgb(0, 0, 255)", 'Your h1 element should be blue.'); + testString: assert($("h1").css("color") === "rgb(0, 0, 255)"); ``` diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-css/prioritize-one-style-over-another.english.md b/curriculum/challenges/english/01-responsive-web-design/basic-css/prioritize-one-style-over-another.english.md index 867d3404dd..72e046541f 100644 --- a/curriculum/challenges/english/01-responsive-web-design/basic-css/prioritize-one-style-over-another.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/basic-css/prioritize-one-style-over-another.english.md @@ -24,11 +24,11 @@ Give your h1 element the class of pink-text. ```yml tests: - text: Your h1 element should have the class pink-text. - testString: assert($("h1").hasClass("pink-text"), 'Your h1 element should have the class pink-text.'); + testString: assert($("h1").hasClass("pink-text")); - text: Your <style> should have a pink-text CSS class that changes the color. - testString: assert(code.match(/\.pink-text\s*\{\s*color\s*:\s*.+\s*;\s*\}/g), 'Your <style> should have a pink-text CSS class that changes the color.'); + testString: assert(code.match(/\.pink-text\s*\{\s*color\s*:\s*.+\s*;\s*\}/g)); - text: Your h1 element should be pink. - testString: assert($("h1").css("color") === "rgb(255, 192, 203)", 'Your h1 element should be pink.'); + testString: assert($("h1").css("color") === "rgb(255, 192, 203)"); ``` diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-css/set-the-font-family-of-an-element.english.md b/curriculum/challenges/english/01-responsive-web-design/basic-css/set-the-font-family-of-an-element.english.md index 8b058e0ef7..f05d0ae42e 100644 --- a/curriculum/challenges/english/01-responsive-web-design/basic-css/set-the-font-family-of-an-element.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/basic-css/set-the-font-family-of-an-element.english.md @@ -29,7 +29,7 @@ Make all of your p elements use the monospace font. ```yml tests: - text: Your p elements should use the font monospace. - testString: assert($("p").not(".red-text").css("font-family").match(/monospace/i), 'Your p elements should use the font monospace.'); + testString: assert($("p").not(".red-text").css("font-family").match(/monospace/i)); ``` diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-css/set-the-id-of-an-element.english.md b/curriculum/challenges/english/01-responsive-web-design/basic-css/set-the-id-of-an-element.english.md index ba4e75fd3b..dd1d3c6d0c 100644 --- a/curriculum/challenges/english/01-responsive-web-design/basic-css/set-the-id-of-an-element.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/basic-css/set-the-id-of-an-element.english.md @@ -25,7 +25,7 @@ Give your form element the id cat-photo-form. ```yml tests: - text: Give your form element the id of cat-photo-form. - testString: assert($("form").attr("id") === "cat-photo-form", 'Give your form element the id of cat-photo-form.'); + testString: assert($("form").attr("id") === "cat-photo-form"); ``` diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-css/size-your-images.english.md b/curriculum/challenges/english/01-responsive-web-design/basic-css/size-your-images.english.md index 54e0a90c04..5c7d498d84 100644 --- a/curriculum/challenges/english/01-responsive-web-design/basic-css/size-your-images.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/basic-css/size-your-images.english.md @@ -32,9 +32,9 @@ Create a class called smaller-image and use it to resize the image ```yml tests: - text: Your img element should have the class smaller-image. - testString: assert($("img[src='https://bit.ly/fcc-relaxing-cat']").attr('class') === "smaller-image", 'Your img element should have the class smaller-image.'); + testString: assert($("img[src='https://bit.ly/fcc-relaxing-cat']").attr('class') === "smaller-image"); - text: Your image should be 100 pixels wide. Browser zoom should be at 100%. - testString: assert($("img").width() === 100, 'Your image should be 100 pixels wide. Browser zoom should be at 100%.'); + testString: assert($("img").width() === 100); ``` diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-css/specify-how-fonts-should-degrade.english.md b/curriculum/challenges/english/01-responsive-web-design/basic-css/specify-how-fonts-should-degrade.english.md index e1b9f0243b..c1f3bc0746 100644 --- a/curriculum/challenges/english/01-responsive-web-design/basic-css/specify-how-fonts-should-degrade.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/basic-css/specify-how-fonts-should-degrade.english.md @@ -33,13 +33,13 @@ In the last challenge, you imported the Lobster font using the Lobster. - testString: assert($("h2").css("font-family").match(/^"?lobster/i), 'Your h2 element should use the font Lobster.'); + testString: assert($("h2").css("font-family").match(/^"?lobster/i)); - text: Your h2 element should degrade to the font monospace when Lobster is not available. - testString: assert(/\s*h2\s*\{\s*font-family\:\s*(\'|")?Lobster(\'|")?,\s*monospace\s*;\s*\}/gi.test(code), 'Your h2 element should degrade to the font monospace when Lobster is not available.'); - - text: Comment out your call to Google for the Lobster font by putting <!-- in front of it. - testString: assert(new RegExp("", "gi").test(code), 'Be sure to close your comment by adding -->!.'); + testString: assert(new RegExp("[^fc]-->", "gi").test(code)); ``` diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-css/style-multiple-elements-with-a-css-class.english.md b/curriculum/challenges/english/01-responsive-web-design/basic-css/style-multiple-elements-with-a-css-class.english.md index aafd9c643d..ef0fa6138d 100644 --- a/curriculum/challenges/english/01-responsive-web-design/basic-css/style-multiple-elements-with-a-css-class.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/basic-css/style-multiple-elements-with-a-css-class.english.md @@ -21,15 +21,15 @@ Classes allow you to use the same CSS styles on multiple HTML elements. You can ```yml tests: - text: Your h2 element should be red. - testString: assert($("h2").css("color") === "rgb(255, 0, 0)", 'Your h2 element should be red.'); + testString: assert($("h2").css("color") === "rgb(255, 0, 0)"); - text: Your h2 element should have the class red-text. - testString: assert($("h2").hasClass("red-text"), 'Your h2 element should have the class red-text.'); + testString: assert($("h2").hasClass("red-text")); - text: Your first p element should be red. - testString: assert($("p:eq(0)").css("color") === "rgb(255, 0, 0)", 'Your first p element should be red.'); + testString: assert($("p:eq(0)").css("color") === "rgb(255, 0, 0)"); - text: Your second and third p elements should not be red. - testString: assert(!($("p:eq(1)").css("color") === "rgb(255, 0, 0)") && !($("p:eq(2)").css("color") === "rgb(255, 0, 0)"), 'Your second and third p elements should not be red.'); + testString: assert(!($("p:eq(1)").css("color") === "rgb(255, 0, 0)") && !($("p:eq(2)").css("color") === "rgb(255, 0, 0)")); - text: Your first p element should have the class red-text. - testString: assert($("p:eq(0)").hasClass("red-text"), 'Your first p element should have the class red-text.'); + testString: assert($("p:eq(0)").hasClass("red-text")); ``` diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-css/style-the-html-body-element.english.md b/curriculum/challenges/english/01-responsive-web-design/basic-css/style-the-html-body-element.english.md index 019fe1a473..aec41aaee2 100644 --- a/curriculum/challenges/english/01-responsive-web-design/basic-css/style-the-html-body-element.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/basic-css/style-the-html-body-element.english.md @@ -30,11 +30,11 @@ body { ```yml tests: - text: Give your body element the background-color of black. - testString: assert($("body").css("background-color") === "rgb(0, 0, 0)", 'Give your body element the background-color of black.'); + testString: assert($("body").css("background-color") === "rgb(0, 0, 0)"); - text: Make sure your CSS rule is properly formatted with both opening and closing curly brackets. - testString: assert(code.match(/