fix(curriculum) : modified the tests in the responsive web design curriculum Step - 12 (#52100)

This commit is contained in:
Yash Anil Ambekar
2023-10-28 00:51:45 +05:30
committed by GitHub
parent 436247916d
commit 9ef0f77659

View File

@@ -36,10 +36,17 @@ assert(
The link's text should be `cat photos`. You have either omitted the text or have a typo.
```js
const nestedAnchor = document.querySelector(`p > a`);
assert(
nestedAnchor.innerText.toLowerCase().replace(/\s+/g, ' ') === 'cat photos'
);
const nestedAnchor = document.querySelector('p > a');
const innerContent = nestedAnchor.innerHTML;
assert.isTrue(innerContent.trim() === 'cat photos');
```
The text inside your anchor element has extra leading or trailing whitespace. The only space in the anchor text should be between the word `cat` and the word `photos`.
```js
const nestedAnchor = document.querySelector('p > a');
const innerContent = nestedAnchor.innerHTML;
assert.isNotTrue(/^\s+|\s+$/.test(innerContent));
```
After nesting the anchor (`a`) element, the only `p` element content visible in the browser should be `See more cat photos in our gallery.` Double check the text, spacing, or punctuation of both the `p` and nested anchor element.