mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-07 06:02:06 -04:00
chore(curriculum): update specific asserts in magazine workshop steps 10-11-12 (#61113)
Co-authored-by: Ilenia <26656284+ilenia-magoni@users.noreply.github.com>
This commit is contained in:
@@ -18,37 +18,37 @@ Soon the freeCodeCamp curriculum will be 100% project-driven learning. Instead o
|
||||
You should create a new `section` element.
|
||||
|
||||
```js
|
||||
assert(document.querySelectorAll('section')?.length === 2);
|
||||
assert.lengthOf(document.querySelectorAll('section'), 2);
|
||||
```
|
||||
|
||||
Your new `section` element should come after your `.heading` element.
|
||||
|
||||
```js
|
||||
assert(document.querySelectorAll('section')?.[1]?.previousElementSibling?.className === 'heading');
|
||||
assert.equal(document.querySelectorAll('section')?.[1]?.previousElementSibling?.className, 'heading');
|
||||
```
|
||||
|
||||
Your new `section` element should have the `class` set to `text`.
|
||||
|
||||
```js
|
||||
assert(document.querySelectorAll('section')?.[1]?.className === 'text');
|
||||
assert.equal(document.querySelectorAll('section')?.[1]?.className, 'text');
|
||||
```
|
||||
|
||||
You should create a new `p` element within your `.text` element.
|
||||
|
||||
```js
|
||||
assert(document.querySelector('.text')?.querySelectorAll('p')?.length === 1);
|
||||
assert.lengthOf(document.querySelector('.text')?.querySelectorAll('p'), 1);
|
||||
```
|
||||
|
||||
Your new `p` element should have the `class` set to `first-paragraph`.
|
||||
|
||||
```js
|
||||
assert(document.querySelector('.text p')?.className === 'first-paragraph');
|
||||
assert.equal(document.querySelector('.text p')?.className, 'first-paragraph');
|
||||
```
|
||||
|
||||
Your new `p` element should have the provided text.
|
||||
|
||||
```js
|
||||
assert(document.querySelector('.first-paragraph')?.innerText === 'Soon the freeCodeCamp curriculum will be 100% project-driven learning. Instead of a series of coding challenges, you\'ll learn through building projects - step by step. Before we get into the details, let me emphasize: we are not changing the certifications. All 6 certifications will still have the same 5 required projects. We are only changing the optional coding challenges.');
|
||||
assert.equal(document.querySelector('.first-paragraph')?.innerText, 'Soon the freeCodeCamp curriculum will be 100% project-driven learning. Instead of a series of coding challenges, you\'ll learn through building projects - step by step. Before we get into the details, let me emphasize: we are not changing the certifications. All 6 certifications will still have the same 5 required projects. We are only changing the optional coding challenges.');
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
@@ -18,13 +18,13 @@ After years - years - of pondering these two problems and how to solve them, I s
|
||||
You should create a second `p` element within your `.text` element.
|
||||
|
||||
```js
|
||||
assert(document.querySelectorAll('.text p')?.length === 2)
|
||||
assert.lengthOf(document.querySelectorAll('.text p'), 2);
|
||||
```
|
||||
|
||||
Your second `p` element should have the provided text.
|
||||
|
||||
```js
|
||||
assert(document.querySelectorAll('.text p')?.[1]?.innerText === 'After years - years - of pondering these two problems and how to solve them, I slipped, hit my head on the sink, and when I came to I had a revelation! A vision! A picture in my head! A picture of this! This is what makes time travel possible: the flux capacitor!')
|
||||
assert.equal(document.querySelectorAll('.text p')?.[1]?.innerText, 'After years - years - of pondering these two problems and how to solve them, I slipped, hit my head on the sink, and when I came to I had a revelation! A vision! A picture in my head! A picture of this! This is what makes time travel possible: the flux capacitor!');
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
@@ -18,13 +18,13 @@ It wasn't as dramatic as Doc's revelation in Back to the Future. It just occurre
|
||||
You should create a third `p` element in your `.text` element.
|
||||
|
||||
```js
|
||||
assert(document.querySelectorAll('.text p')?.length === 3);
|
||||
assert.lengthOf(document.querySelectorAll('.text p'), 3);
|
||||
```
|
||||
|
||||
Your third `p` element should have the provided text.
|
||||
|
||||
```js
|
||||
assert(document.querySelectorAll('.text p')?.[2]?.innerText === "It wasn't as dramatic as Doc's revelation in Back to the Future. It just occurred to me while I was going for a run. The revelation: the entire curriculum should be a series of projects. Instead of individual coding challenges, we'll just have projects, each with their own seamless series of tests. Each test gives you just enough information to figure out how to get it to pass. (And you can view hints if that isn't enough.)");
|
||||
assert.equal(document.querySelectorAll('.text p')?.[2]?.innerText, "It wasn't as dramatic as Doc's revelation in Back to the Future. It just occurred to me while I was going for a run. The revelation: the entire curriculum should be a series of projects. Instead of individual coding challenges, we'll just have projects, each with their own seamless series of tests. Each test gives you just enough information to figure out how to get it to pass. (And you can view hints if that isn't enough.)");
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
Reference in New Issue
Block a user