fix(curriculum): adjust editable regions in workshop-cat-photo-app (#65291)

Co-authored-by: majestic-owl448 <26656284+majestic-owl448@users.noreply.github.com>
This commit is contained in:
Rosa Cabrera
2026-01-30 09:56:07 -03:00
committed by GitHub
parent 680a8c2a47
commit e70c651d2c
30 changed files with 56 additions and 60 deletions
@@ -53,7 +53,7 @@ assert.equal(document.querySelector('h1')?.innerText?.trim().toLowerCase(), 'cat
<html>
<body>
--fcc-editable-region--
--fcc-editable-region--
</body>
</html>
@@ -77,8 +77,8 @@ assert.isBelow(collection.indexOf('H1'), collection.indexOf('H2'));
```html
<html>
<body>
--fcc-editable-region--
<h1>CatPhotoApp</h1>
--fcc-editable-region--
--fcc-editable-region--
</body>
@@ -57,8 +57,8 @@ assert.isBelow(collection.indexOf('H2'), collection.indexOf('P'));
<html>
<body>
<h1>CatPhotoApp</h1>
--fcc-editable-region--
<h2>Cat Photos</h2>
--fcc-editable-region--
--fcc-editable-region--
</body>
@@ -67,9 +67,8 @@ assert.match(code, /<!--\s*todo:\s+add\s+link\s+to\s+cat\s+photos\s*-->/i);
<h2>Cat Photos</h2>
--fcc-editable-region--
<p>Everyone loves cute cats online!</p>
--fcc-editable-region--
<p>Everyone loves cute cats online!</p>
</body>
</html>
```
@@ -80,7 +80,7 @@ assert.match(pNode?.textContent.toLowerCase(), /everyone loves cute cats online/
<html>
<body>
--fcc-editable-region--
<h1>CatPhotoApp</h1>
<h2>Cat Photos</h2>
<!-- TODO: Add link to cat photos -->
@@ -95,14 +95,14 @@ assert.match(code.toLowerCase(), /-->\s*\n\s{6}<p>/);
```html
<html>
<body>
--fcc-editable-region--
<main>
<h1>CatPhotoApp</h1>
<h2>Cat Photos</h2>
<!-- TODO: Add link to cat photos -->
<p>Everyone loves cute cats online!</p>
</main>
--fcc-editable-region--
<p>Everyone loves cute cats online!</p>
--fcc-editable-region--
</main>
</body>
</html>
```
@@ -51,8 +51,8 @@ assert.isBelow(collection.indexOf('P'), collection.indexOf('IMG'));
<h1>CatPhotoApp</h1>
<h2>Cat Photos</h2>
<!-- TODO: Add link to cat photos -->
--fcc-editable-region--
<p>Everyone loves cute cats online!</p>
--fcc-editable-region--
--fcc-editable-region--
</main>
@@ -74,8 +74,8 @@ assert.notMatch(
<h1>CatPhotoApp</h1>
<h2>Cat Photos</h2>
<!-- TODO: Add link to cat photos -->
--fcc-editable-region--
<p>Everyone loves cute cats online!</p>
--fcc-editable-region--
--fcc-editable-region--
<img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back.">
@@ -62,11 +62,11 @@ assert.equal(
<p>See more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>
<a href="https://freecatphotoapp.com"><img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."></a>
</section>
--fcc-editable-region--
<section>
</section>
--fcc-editable-region--
--fcc-editable-region--
</section>
</main>
</body>
</html>
@@ -76,12 +76,12 @@ assert.equal(
<p>See more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>
<a href="https://freecatphotoapp.com"><img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."></a>
</section>
--fcc-editable-region--
<section>
<h2>Cat Lists</h2>
</section>
--fcc-editable-region--
--fcc-editable-region--
</section>
</main>
</body>
</html>
@@ -49,9 +49,9 @@ assert.equal(secondSectionLastElemNode?.nodeName, 'UL');
<a href="https://freecatphotoapp.com"><img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."></a>
</section>
<section>
--fcc-editable-region--
<h2>Cat Lists</h2>
<h3>Things cats love:</h3>
--fcc-editable-region--
--fcc-editable-region--
</section>
@@ -74,11 +74,11 @@ assert.lengthOf(
<section>
<h2>Cat Lists</h2>
<h3>Things cats love:</h3>
--fcc-editable-region--
<ul>
</ul>
--fcc-editable-region--
--fcc-editable-region--
</ul>
</section>
</main>
</body>
@@ -76,12 +76,12 @@ assert.notMatch(code, /\<img\s+.+\s+src\s*=\s*https:\/\/cdn\.freecodecamp\.org\/
<section>
<h2>Cat Lists</h2>
<h3>Things cats love:</h3>
--fcc-editable-region--
<ul>
<li>catnip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
--fcc-editable-region--
--fcc-editable-region--
</section>
@@ -65,9 +65,9 @@ assert.equal(
<li>lasagna</li>
</ul>
--fcc-editable-region--
<img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/lasagna.jpg" alt="A slice of lasagna on a plate.">
--fcc-editable-region--
</section>
</main>
@@ -91,12 +91,12 @@ assert.match(
<li>laser pointers</li>
<li>lasagna</li>
</ul>
--fcc-editable-region--
<figure>
<img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/lasagna.jpg" alt="A slice of lasagna on a plate.">
</figure>
--fcc-editable-region--
--fcc-editable-region--
</figure>
</section>
</main>
</body>
@@ -66,11 +66,11 @@ assert.equal(secondSectionLastElemNode.previousElementSibling.nodeName, 'FIGURE'
<li>laser pointers</li>
<li>lasagna</li>
</ul>
--fcc-editable-region--
<figure>
<img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/lasagna.jpg" alt="A slice of lasagna on a plate.">
<figcaption>Cats <em>love</em> lasagna.</figcaption>
</figure>
--fcc-editable-region--
--fcc-editable-region--
</section>
@@ -90,8 +90,8 @@ assert.lengthOf([...document.querySelectorAll('ol')], 1);
<img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/lasagna.jpg" alt="A slice of lasagna on a plate.">
<figcaption>Cats <em>love</em> lasagna.</figcaption>
</figure>
--fcc-editable-region--
<h3>Top 3 things cats hate:</h3>
--fcc-editable-region--
--fcc-editable-region--
</section>
@@ -57,12 +57,12 @@ assert.equal(document.querySelectorAll('main > section')[1]?.lastElementChild.no
<figcaption>Cats <em>love</em> lasagna.</figcaption>
</figure>
<h3>Top 3 things cats hate:</h3>
--fcc-editable-region--
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
--fcc-editable-region--
--fcc-editable-region--
</section>
@@ -84,9 +84,7 @@ assert.match(
<figure>
<img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/cats.jpg" alt="Two tabby kittens sleeping together on a couch.">
--fcc-editable-region--
<figcaption>Cats hate other cats.</figcaption>
--fcc-editable-region--
</figure>
</section>
@@ -76,10 +76,10 @@ assert.equal(document.querySelector('main')?.nextElementSibling.nodeName, 'FOOTE
<figcaption>Cats <strong>hate</strong> other cats.</figcaption>
</figure>
</section>
--fcc-editable-region--
</main>
</body>
--fcc-editable-region--
--fcc-editable-region--
</body>
</html>
```
@@ -78,11 +78,11 @@ assert.match(extraSpacesRemoved, /^No Copyright - freeCodeCamp\.org$/i);
</figure>
</section>
</main>
--fcc-editable-region--
<footer>
</footer>
--fcc-editable-region--
--fcc-editable-region--
</footer>
</body>
</html>
```
@@ -46,11 +46,11 @@ assert.match(noSpaces, /\<\/head\>\<body\>/);
## --seed-contents--
```html
--fcc-editable-region--
<html>
<body>
--fcc-editable-region--
--fcc-editable-region--
<body>
<main>
<h1>CatPhotoApp</h1>
<section>
@@ -47,11 +47,11 @@ assert.equal(document.title?.toLowerCase(), 'catphotoapp');
```html
<html>
--fcc-editable-region--
<head>
</head>
--fcc-editable-region--
--fcc-editable-region--
</head>
<body>
<main>
<h1>CatPhotoApp</h1>
@@ -35,8 +35,8 @@ assert.match(noSpaces, /^<\!doctypehtml><html/i);
```html
--fcc-editable-region--
<html lang="en">
--fcc-editable-region--
<html lang="en">
<head>
<title>CatPhotoApp</title>
</head>
@@ -86,11 +86,11 @@ assert.notMatch(code, /\<img\s+.+\s+src\s*=\s*https:\/\/cdn\.freecodecamp\.org\/
<li>thunder</li>
<li>other cats</li>
</ol>
--fcc-editable-region--
<figure>
</figure>
--fcc-editable-region--
--fcc-editable-region--
</figure>
</section>
</main>
</body>
@@ -109,12 +109,12 @@ assert.match(
<li>thunder</li>
<li>other cats</li>
</ol>
--fcc-editable-region--
<figure>
<img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/cats.jpg" alt="Two tabby kittens sleeping together on a couch.">
</figure>
--fcc-editable-region--
--fcc-editable-region--
</figure>
</section>
</main>
</body>
@@ -71,17 +71,17 @@ assert.isFalse(includesH1);
```html
<html>
<body>
--fcc-editable-region--
<main>
<h1>CatPhotoApp</h1>
--fcc-editable-region--
<h2>Cat Photos</h2>
<p>Everyone loves <a href="https://cdn.freecodecamp.org/curriculum/cat-photo-app/running-cats.jpg">cute cats</a> online!</p>
<p>See more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>
<a href="https://freecatphotoapp.com"><img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."></a>
</main>
--fcc-editable-region--
</main>
</body>
</html>
```
@@ -70,13 +70,13 @@ assert.lengthOf(foundElems, 2);
<body>
<main>
<h1>CatPhotoApp</h1>
--fcc-editable-region--
<section>
<h2>Cat Photos</h2>
<p>Everyone loves <a href="https://cdn.freecodecamp.org/curriculum/cat-photo-app/running-cats.jpg">cute cats</a> online!</p>
<p>See more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>
<a href="https://freecatphotoapp.com"><img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."></a>
</section>
--fcc-editable-region--
--fcc-editable-region--
</main>
@@ -45,14 +45,13 @@ assert.notMatch(code, /<\/meta\s*>?/i);
```html
<!DOCTYPE html>
<html lang="en">
--fcc-editable-region--
<head>
--fcc-editable-region--
--fcc-editable-region--
<title>CatPhotoApp</title>
</head>
--fcc-editable-region--
<body>
<main>
<h1>CatPhotoApp</h1>
@@ -37,9 +37,9 @@ assert.notMatch(code, /Add\s*link\s*to\s*cat\s*photos/i)
<h2>Cat Photos</h2>
--fcc-editable-region--
<!-- TODO: Add link to cat photos -->
--fcc-editable-region--
<p>Everyone loves <a href="https://cdn.freecodecamp.org/curriculum/cat-photo-app/running-cats.jpg">cute cats</a> online!</p>
<p>See more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>
--fcc-editable-region--
<img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back.">
</main>
</body>