diff --git a/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e03d719d5ac4738993.md b/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e03d719d5ac4738993.md index f8c05c3d09a..c8735878ef1 100644 --- a/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e03d719d5ac4738993.md +++ b/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e03d719d5ac4738993.md @@ -17,14 +17,14 @@ You should set the `max-width` property to `500px`. ```js const hasMaxWidth = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style['max-width'] === '500px'); -assert(hasMaxWidth); +assert.isTrue(hasMaxWidth); ``` Your `.menu` element should have a `max-width` of `500px`. ```js const menuMaxWidth = new __helpers.CSSHelp(document).getStyle('.menu')?.getPropertyValue('max-width'); -assert(menuMaxWidth === '500px'); +assert.equal(menuMaxWidth, '500px'); ``` # --seed-- diff --git a/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e04559b939080db057.md b/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e04559b939080db057.md index 0630b734661..b4bdd400053 100644 --- a/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e04559b939080db057.md +++ b/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e04559b939080db057.md @@ -14,39 +14,39 @@ Since all `4` sides of the menu have the same internal spacing, remove the four You should remove the `padding-left` property. ```js -assert(!code.match(/padding-left/i)); +assert.notMatch(code, /padding-left/i); ``` You should remove the `padding-right` property. ```js -assert(!code.match(/padding-right/i)); +assert.notMatch(code, /padding-right/i); ``` You should remove the `padding-top` property. ```js -assert(!code.match(/padding-top/i)); +assert.notMatch(code, /padding-top/i); ``` You should remove the `padding-bottom` property. ```js -assert(!code.match(/padding-bottom/i)); +assert.notMatch(code, /padding-bottom/i); ``` You should set the `padding` property to `20px`. ```js const hasPadding = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style['padding'] === '20px'); -assert(hasPadding); +assert.isTrue(hasPadding); ``` Your `.menu` element should have a `padding` value of `20px`. ```js const menuPadding = new __helpers.CSSHelp(document).getStyle('.menu')?.getPropertyValue('padding'); -assert(menuPadding === '20px'); +assert.equal(menuPadding, '20px'); ``` # --seed-- diff --git a/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e050279c7a4a7101d3.md b/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e050279c7a4a7101d3.md index 0caf7454747..09b40ca0daa 100644 --- a/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e050279c7a4a7101d3.md +++ b/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e050279c7a4a7101d3.md @@ -15,37 +15,37 @@ You should not remove the `padding-left` or `padding-right` properties. ```js const paddingLeft = new __helpers.CSSHelp(document).getStyle('.menu')?.getPropertyValue('padding-left'); -assert(paddingLeft === '20px'); +assert.equal(paddingLeft, '20px'); const paddingRight = new __helpers.CSSHelp(document).getStyle('.menu')?.getPropertyValue('padding-right'); -assert(paddingRight === '20px'); +assert.equal(paddingRight, '20px'); ``` You should set the `padding-top` property to `20px`. ```js const hasPaddingTop = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style['padding-top'] === '20px'); -assert(hasPaddingTop); +assert.isTrue(hasPaddingTop); ``` You should set the `padding-bottom` property to `20px`. ```js const hasPaddingBottom = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style['padding-top'] === '20px'); -assert(hasPaddingBottom); +assert.isTrue(hasPaddingBottom); ``` Your `.menu` element should have a `padding-top` of `20px`. ```js const menuPaddingTop = new __helpers.CSSHelp(document).getStyle('.menu')?.getPropertyValue('padding-top'); -assert(menuPaddingTop === '20px'); +assert.equal(menuPaddingTop, '20px'); ``` Your `.menu` element should have a `padding-bottom` of `20px`. ```js const menuPaddingBottom = new __helpers.CSSHelp(document).getStyle('.menu')?.getPropertyValue('padding-bottom'); -assert(menuPaddingBottom === '20px'); +assert.equal(menuPaddingBottom, '20px'); ``` # --seed-- diff --git a/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e05473f91f948724ab.md b/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e05473f91f948724ab.md index afcc40cab21..dab7d0fdb7d 100644 --- a/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e05473f91f948724ab.md +++ b/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e05473f91f948724ab.md @@ -23,7 +23,7 @@ Your `body` should have a `font-family` of `sans-serif`. ```js const bodyFontFamily = new __helpers.CSSHelp(document).getStyle('body')?.getPropertyValue('font-family'); -assert(bodyFontFamily === 'sans-serif'); +assert.equal(bodyFontFamily, 'sans-serif'); ``` # --seed-- diff --git a/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e056bdde6ae6892ba2.md b/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e056bdde6ae6892ba2.md index 17c0abd2285..17b84c178c7 100644 --- a/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e056bdde6ae6892ba2.md +++ b/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e056bdde6ae6892ba2.md @@ -17,14 +17,14 @@ You should use an `h1, h2` selector. ```js const h1h2Selector = new __helpers.CSSHelp(document).getStyle('h1, h2'); -assert(h1h2Selector); +assert.exists(h1h2Selector); ``` You should set the `font-family` to `Impact`. ```js const hasFontFamily = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style['font-family'].toLowerCase() === 'impact'); -assert(hasFontFamily); +assert.isTrue(hasFontFamily); ``` Your `h1` element should have a `font-family` of `Impact`. diff --git a/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e06d34faac0447fc44.md b/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e06d34faac0447fc44.md index 58a98b47a18..b788ecfc400 100644 --- a/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e06d34faac0447fc44.md +++ b/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e06d34faac0447fc44.md @@ -15,21 +15,21 @@ You should have an `.established` selector. ```js const hasEstablished = new __helpers.CSSHelp(document).getStyle('.established'); -assert(hasEstablished); +assert.exists(hasEstablished); ``` You should set the `font-style` property to `italic`. ```js const hasFontStyle = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style['font-style'] === 'italic'); -assert(hasFontStyle); +assert.isTrue(hasFontStyle); ``` Your `.established` selector should set the `font-style` property to `italic`. ```js const establishedFontStyle = new __helpers.CSSHelp(document).getStyle('.established')?.getPropertyValue('font-style'); -assert(establishedFontStyle === 'italic'); +assert.equal(establishedFontStyle, 'italic'); ``` # --seed-- diff --git a/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e087d56ed3ffdc36be.md b/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e087d56ed3ffdc36be.md index 1178e8a69b8..1c659c78681 100644 --- a/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e087d56ed3ffdc36be.md +++ b/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e087d56ed3ffdc36be.md @@ -29,7 +29,7 @@ Your `established` class element should have italic text. const establishElement = document.querySelector('.established'); const establishedFont = window.getComputedStyle(establishElement)?.getPropertyValue('font-style'); -assert.equal(establishedFont,"italic"); +assert.equal(establishedFont, "italic"); ``` # --seed-- diff --git a/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e0a81099d9a697b550.md b/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e0a81099d9a697b550.md index ba94dba275e..0b62fd19bb8 100644 --- a/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e0a81099d9a697b550.md +++ b/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e0a81099d9a697b550.md @@ -16,39 +16,39 @@ Make sure that the link opens in a new tab by adding a `target` attribute with t You should not modify the existing `footer` element. ```js -assert(document.querySelectorAll("footer").length === 1); +assert.lengthOf(document.querySelectorAll("footer"), 1); ``` You should not modify the existing `address` element. ```js -assert(document.querySelectorAll("address").length === 1); +assert.lengthOf(document.querySelectorAll("address"), 1); ``` Your new `p` element should be nested within your `address` element. You should have exactly one `p` element. ```js -assert(document.querySelectorAll("footer > address > p").length === 1); -assert(document.querySelectorAll("footer p").length === 1); +assert.lengthOf(document.querySelectorAll("footer > address > p"), 1); +assert.lengthOf(document.querySelectorAll("footer p"), 1); ``` Your new `a` element should be nested within your new `p` element. You should have exactly one `a` element. ```js -assert(document.querySelectorAll("footer > address > p > a").length === 1); -assert(document.querySelectorAll("footer a").length === 1); +assert.lengthOf(document.querySelectorAll("footer > address > p > a"), 1); +assert.lengthOf(document.querySelectorAll("footer a"), 1); ``` Your new `a` element should have the text `Visit our website`. ```js -assert(document.querySelector("footer > address > p > a")?.innerText === "Visit our website"); +assert.equal(document.querySelector("footer > address > p > a")?.innerText, "Visit our website"); ``` Your new `a` element should link to `https://www.freecodecamp.org`. Remember that `a` elements use the `href` attribute to create a link. ```js -assert(document.querySelector("footer > address > p > a")?.href === "https://www.freecodecamp.org/"); +assert.equal(document.querySelector("footer > address > p > a")?.href, "https://www.freecodecamp.org/"); ``` Your new `a` element should have the `target` attribute set to `_blank`. diff --git a/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e0e9629bad967cd71e.md b/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e0e9629bad967cd71e.md index b0285488b3f..79810ee00e6 100644 --- a/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e0e9629bad967cd71e.md +++ b/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e0e9629bad967cd71e.md @@ -17,7 +17,7 @@ You should add `serif` as a fallback for the `Impact` font. ```js const fontFamily = new __helpers.CSSHelp(document).getStyle('h1, h2')?.getPropertyValue('font-family'); -assert(fontFamily === 'Impact, serif'); +assert.equal(fontFamily, 'Impact, serif'); ``` # --seed-- diff --git a/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e0eaa7da26e3d34d78.md b/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e0eaa7da26e3d34d78.md index ccc7adf4222..09d2e3790b3 100644 --- a/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e0eaa7da26e3d34d78.md +++ b/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e0eaa7da26e3d34d78.md @@ -17,28 +17,28 @@ You should set the `padding-left` property to `20px`. ```js const hasPaddingLeft = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style['padding-left'] === '20px'); -assert(hasPaddingLeft); +assert.isTrue(hasPaddingLeft); ``` You should set the `padding-right` property to `20px`. ```js const hasPaddingRight = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style['padding-right'] === '20px'); -assert(hasPaddingRight); +assert.isTrue(hasPaddingRight); ``` Your `.menu` element should have a `padding-left` of `20px`. ```js const menuPaddingLeft = new __helpers.CSSHelp(document).getStyle('.menu')?.getPropertyValue('padding-left'); -assert(menuPaddingLeft === '20px'); +assert.equal(menuPaddingLeft, '20px'); ``` Your `.menu` element should have a `padding-right` of `20px`. ```js const menuPaddingRight = new __helpers.CSSHelp(document).getStyle('.menu')?.getPropertyValue('padding-right'); -assert(menuPaddingRight === '20px'); +assert.equal(menuPaddingRight, '20px'); ``` # --seed-- diff --git a/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e0f8c230bdd2349716.md b/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e0f8c230bdd2349716.md index e92f564e5fb..7e2dff7075f 100644 --- a/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e0f8c230bdd2349716.md +++ b/curriculum/challenges/english/25-front-end-development/workshop-cafe-menu/5f3ef6e0f8c230bdd2349716.md @@ -16,29 +16,29 @@ Add two new type selectors (`h1` and `h2`). Use the `font-size` property for bot You should use an `h1` selector. ```js -const hasH1 = new __helpers.CSSHelp(document).getStyle('h1'); -assert(hasH1); +const h1Style = new __helpers.CSSHelp(document).getStyle('h1'); +assert.exists(h1Style); ``` You should use an `h2` selector. ```js -const hasH2 = new __helpers.CSSHelp(document).getStyle('h2'); -assert(hasH2); +const h2Style = new __helpers.CSSHelp(document).getStyle('h2'); +assert.exists(h2Style); ``` Your `h1` element should have a `font-size` of `40px`. ```js const h1FontSize = new __helpers.CSSHelp(document).getStyle('h1')?.getPropertyValue('font-size'); -assert(h1FontSize === '40px'); +assert.equal(h1FontSize, '40px'); ``` Your `h2` element should have a `font-size` of `30px`. ```js const h2FontSize = new __helpers.CSSHelp(document).getStyle('h2')?.getPropertyValue('font-size'); -assert(h2FontSize === '30px'); +assert.equal(h2FontSize, '30px'); ``` # --seed--