fix(curriculum): typography step 43 tests pass in safari (#44984)

* meta tag accepts valid html

* Fix step 43 tests for safari

* Incorporating suggestions from PR

* incorporating suggestions from PR

* added fix for step17
This commit is contained in:
Steven
2022-02-10 18:43:24 -06:00
committed by GitHub
parent f4077cab7f
commit fdd20700da
3 changed files with 5 additions and 5 deletions

View File

@ -16,7 +16,7 @@ Inside the `head` element, nest a `meta` element with an attribute named `charse
You should have a `meta` tag.
```js
assert(code.match(/<meta\s.*>/i));
assert(code.match(/<meta.*?\/?>/is));
```
Your `meta` tag should have a `charset` attribute.

View File

@ -28,13 +28,13 @@ assert($('head').length === 1);
Your `link` element should be a self-closing element.
```js
assert(code.match(/<link[\w\W\s]+\/>/i));
assert(code.match(/<link[\w\W\s]+\/?>/i));
```
Your `link` element should be within your `head` element.
```js
assert(code.match(/<head>[\w\W\s]*<link[\w\W\s]*\/>[\w\W\s]*<\/head>/i))
assert(code.match(/<head>[\w\W\s]*<link[\w\W\s]*\/?>[\w\W\s]*<\/head>/i))
```
Your `link` element should have a `rel` attribute with the value `stylesheet`.

View File

@ -15,13 +15,13 @@ You should create a new `p` element below your element with the `Total Fat` text
```js
assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p');
assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.innerText.match(/Total Fat 8g[\s|\n]+10%/));
assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.innerText.match(/Total Fat 8g\s*10%/));
```
Your new `p` element should have the text `Saturated Fat 1g 5%`.
```js
assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText.match(/Saturated Fat 1g[\s|\n]+5%/));
assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText.match(/Saturated Fat 1g\s*5%/));
```
Your new `p` element should have a `span` element.