Skip to content

Commit bc38029

Browse files
Dom merge conflict edit (#21)
* move files out of tasks dir * move instruction out of tasks dir and make more specific * removing additional tasks and unnesting from tasks dir * Update dom-merge-conflict/buttons-and-counter/instructions.md Co-authored-by: Daniel Wagner-Hall <dawagner@gmail.com> --------- Co-authored-by: Daniel Wagner-Hall <dawagner@gmail.com>
1 parent ae7da7e commit bc38029

13 files changed

Lines changed: 52 additions & 720 deletions

File tree

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Buttons and Counter
2+
3+
This app currently features a button that increments a counter.
4+
5+
## Task for Person A
6+
7+
Create and switch to a new branch named `split-app-components`:
8+
9+
```
10+
git switch -c split-app-components
11+
```
12+
13+
### Task
14+
15+
Split the `header`, `main` into separate components from `app.js`.
16+
17+
- Separate the components into new functions that live in their own files.
18+
- Make sure to use those functions in `app.js` so the end result remains the same, and tests still run.
19+
- Remember - tests are your friend, run them before, during and after you've wrote some code. Use them to guide you.
20+
21+
### Tests
22+
23+
There are three tests that are _not_ skipped (lines 18 - 36 in `app.test.js`), use these tests to check your changes still let the app function as expected.
24+
25+
### Result
26+
27+
- You should end up with an `app.js` file, a `header.js` file, and a `main.js` file in your `src` directory.
28+
- All tests should pass.
29+
30+
## Task for Person B
31+
32+
Create and switch to a new branch named `add-decrement-button`:
33+
34+
```
35+
git switch -c add-decrement-button
36+
```
37+
38+
### Task
39+
40+
Implement a decrement button.
41+
42+
- Read the skipped tests (lines 38-53 in `app.test.js`) before you start. You will use these tests to guide you.
43+
- Write your code in `app.js`
44+
- Update the description of the app in the `header` element.
45+
46+
### Tests
47+
48+
Tests (lines 38-53 in `app.test.js`) are pre-written but skipped, un-skip them and run the tests before, during and after you write your code.
49+
50+
### Result
51+
52+
Your `app.js` file will now contain a button that decrements the counter and all the tests will run and pass.
File renamed without changes.

dom-merge-conflict/tasks/buttons-and-counter/test/app.test.js renamed to dom-merge-conflict/buttons-and-counter/test/app.test.js

File renamed without changes.

‎dom-merge-conflict/tasks/buttons-and-counter/instructions.md‎

Lines changed: 0 additions & 23 deletions
This file was deleted.

‎dom-merge-conflict/tasks/conditional-rendering/instructions.md‎

Lines changed: 0 additions & 32 deletions
This file was deleted.

‎dom-merge-conflict/tasks/conditional-rendering/src/profilePreview.js‎

Lines changed: 0 additions & 22 deletions
This file was deleted.

‎dom-merge-conflict/tasks/conditional-rendering/test/profilePreview.test.js‎

Lines changed: 0 additions & 95 deletions
This file was deleted.

‎dom-merge-conflict/tasks/optimistic-rendering/instructions.md‎

Lines changed: 0 additions & 23 deletions
This file was deleted.

‎dom-merge-conflict/tasks/optimistic-rendering/src/voter.js‎

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)