part2-notes's People
Forkers
yaakovab exohumann connorkuljis eli5it double-t1 pragathiyp papersson yaroslav-re agung037 ramazanimwemedi klp1130 mitchjans jfletch1088 richardnguyen89 bharath740 stecrv adriennight arsagar1 kkiilas uvzoome polystate real-jame swipez1337 maariaw aliharati silverbits1001 beau-haldane dantec19 erictelkkala alkhawarismi totallycrow omid-web githaefrancis solaris2006 skafishka niklasvaluri jasminrdev h3rmuli laura-webber huyvin rakakroma bhirtzer babiri twinpeaksaurus suldat justinshane13 luisejaar nnanhkhoi alko5923 matthewchao duyen-codes gulammoyuddin josersleal mmetwally0 bayesss chelseapae oliviahorjamo mtuomiko adityackr trancaovy160924 apmurali oxana-sh iamkenny-dev rickyuomo brettbuhler iuhmirza zanecarey rrrussrrr 5iddesh eliasdev99 nathanselig riyaz28 didina44 emrecamasuvi prudence1234 zaidabouhal tim-c3 ngonium jaydesigns bambery romangdev m-zia rkoponen alok515 nikuprin mvdn28 torvicvasil1993 lorgik chrisjrobles csj2000 kiana-why diegogrand aremu-olusegun linhlngo rabuso henronengit frasemcl birenjung neverword meetguleriapart2-notes's Issues
In part3.1 setNotes(initialNotes) should be setNotes(initialNotes.data)
omit the id property
Branch part5-2 is missing services/login.js
The code preceding the link to branch part5-2 on the screenshot already uses services/login.js
, but that branch is lacking the file.
The services/login.js
appears first in the part5-3 branch f7e630d
e2e folder and file missing
The code we worked with cypress in this chapter is not in the branches.
Not working when I tried to clone it.
I tried cloning the branch and running npm install but notes do not save and I can't follow the training unless I do the entire react portion from scratch. Would like to get started from this branch.
part3-1. Scripts added to package.json on the frontend.
The material says we should add the following scripts to package.json on the backend:
"build:ui": "rm -rf build && cd ../part2-notes/ && npm run build && cp -r build ../notes-backend",
"deploy": "git push heroku main",
"deploy:full": "npm run build:ui && git add . && git commit -m uibuild && git push && npm run deploy",
"logs:prod": "heroku logs --tail"
They were added to the frontend package.json instead.
some part5 component tests appear to fail
npm --version
# Output
8.19.2
cat /etc/*release | grep PRETTY
# Output
PRETTY_NAME="Alpine Linux v3.17"
git clone https://github.com/fullstack-hy2020/part2-notes
cd part2-notes
git checkout part5-11
git rev-parse part5-11
# Output
44cb418875db7f41d7690f8cd99cd5d4c91d56fa
npm ci
CI=true npm run test -- --passWithNoTests
Output:
> [email protected] test
> react-scripts test --passWithNoTests
FAIL src/components/NoteForm.test.js
● <NoteForm /> updates parent state and calls onSubmit
expect(received).toHaveLength(expected)
Expected length: 1
Received length: 0
Received array: []
16 | userEvent.click(sendButton)
17 |
> 18 | expect(createNote.mock.calls).toHaveLength(1)
| ^
19 | expect(createNote.mock.calls[0][0].content).toBe('testing a form...' )
20 | })
at Object.toHaveLength (src/components/NoteForm.test.js:18:33)
FAIL src/components/Note.test.js
● clicking the button calls event handler once
expect(received).toHaveLength(expected)
Expected length: 1
Received length: 0
Received array: []
33 | userEvent.click(button)
34 |
> 35 | expect(mockHandler.mock.calls).toHaveLength(1)
| ^
36 | })
at Object.toHaveLength (src/components/Note.test.js:35:34)
FAIL src/components/Togglable.test.js
● <Togglable /> › after clicking the button, children are displayed
expect(element).not.toHaveStyle()
Compared values have no visual difference.
32 |
33 | const div = container.querySelector('.togglableContent')
> 34 | expect(div).not.toHaveStyle('display: none')
| ^
35 | })
36 |
37 | test('toggled content can be closed', () => {
at Object.toHaveStyle (src/components/Togglable.test.js:34:21)
Test Suites: 3 failed, 3 total
Tests: 3 failed, 4 passed, 7 total
Snapshots: 0 total
Time: 4.167 s
Ran all test suites.
Package.json scripts added to frontend instead of backend
The following lines have been added to the frontend package.json:
"build:ui": "rm -rf build && cd ../part2-notes/ && npm run build && cp -r build ../notes-backend",
"deploy": "git push heroku main",
"deploy:full": "npm run build:ui && git add . && git commit -m uibuild && git push && npm run deploy",
"logs:prod": "heroku logs --tail"
I believe they should have been added to the backend package.json instead.
Part 5 - The components children, aka. props.children
The fragment code present in src/App.js
:
{user &&
<div>
<p>{user.name} logged in</p>
<Togglable buttonLabel="new note">
<NoteForm createNote={addNote} />
</Togglable>
</div>
}
According to the material present in Part 5 - letter b - The components children, aka. props.children
, should be:
{user &&
<div>
<p>{user.name} logged in</p>
<Togglable buttonLabel="new note">
<NoteForm
onSubmit={addNote}
value={newNote}
handleChange={handleNoteChange}
/>
</Togglable>
</div>
}
Greetings and thanks for the incredible course!
Danilo
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.