Skip to content

Commit c860041

Browse files
authored
feat(curriculum): implement more specific tests for step one of the flexbox workshop (freeCodeCamp#65296)
1 parent f3f0cd0 commit c860041

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

curriculum/challenges/english/blocks/workshop-flexbox-photo-gallery/61537bb9b1a29430ac15ad38.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,21 @@ Start this project by linking your `styles.css` file to the page.
1212

1313
# --hints--
1414

15-
Your `link` element should have an `href` attribute with the value `styles.css`.
15+
You should have a `link` element within your `head` element.
1616

1717
```js
18-
assert.match(code, /<link[\s\S]*?href=('|"|`)(\.\/)?styles\.css\1/)
18+
assert.exists(document.querySelector("head>link"));
1919
```
2020

21+
Your `link` element should have `rel="stylesheet"` and `href="styles.css"`.
22+
23+
```js
24+
const link = document.querySelector("head>link");
25+
assert.equal(link?.getAttribute("rel"), "stylesheet");
26+
const href = link?.getAttribute("data-href");
27+
assert.oneOf(href, ["./styles.css", "styles.css"]);
28+
```
29+
2130
# --seed--
2231
2332
## --seed-contents--

0 commit comments

Comments
 (0)