forked from AdaGold/inspiration-board
-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ana Lisa Sutherland -- Octos C9 #29
Open
The-Beez-Kneez
wants to merge
16
commits into
Ada-C9:master
Choose a base branch
from
The-Beez-Kneez:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
5f77592
Currently able to display a hardcoded card. have not utilized exsisti…
The-Beez-Kneez 1ab0317
Beginning of NewCardForm, currently one input field only as I am not …
The-Beez-Kneez 582ba19
Form completed with static data, can now add a new card. However, car…
The-Beez-Kneez 88db62c
Added in styling corrections to form for New Card
The-Beez-Kneez 3643942
Tests in place and implemented for static data behavior
The-Beez-Kneez 56137a2
Further testing added for Callback fxn and form submit on NewCardForm
The-Beez-Kneez 48a924a
Installed axios
The-Beez-Kneez bec0d5d
Added in Status Componenet to handle errors and display them to the u…
The-Beez-Kneez ccdedf4
Fixed error for displaying new card,changed what was being passed upo…
The-Beez-Kneez a90b011
Promoted state of Status to App.js, created an event handler for stat…
The-Beez-Kneez 022ab30
Still working on POST portion of axios, currently need to go back and…
The-Beez-Kneez c9a1e2e
POST request code is correct, however due to lack of emoji a validati…
The-Beez-Kneez 66935cf
Delete button is currently up and running, but error is saying that w…
The-Beez-Kneez acbb982
Included emoji selection. Did not resolve issue with exsisting error.…
The-Beez-Kneez e6e4961
Fixed Adding New Card. Will now add and keep card in collection and n…
The-Beez-Kneez 6a75f79
Have implemented all functionality except for Delete. I have one erro…
The-Beez-Kneez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import React from 'react'; | ||
import Board from './Board'; | ||
import { mount } from 'enzyme'; | ||
|
||
describe('Board', () => { | ||
test('that it matches the snapshot with no cards', () => { | ||
// First Mount the Component in the testing DOM | ||
// Arrange | ||
const wrapper = mount( <Board data={[]} />); | ||
|
||
// Assert that it looks like the last snapshot | ||
expect(wrapper).toMatchSnapshot(); | ||
|
||
// Remove the component from the DOM (save memory and prevent side effects). | ||
wrapper.unmount(); | ||
}); | ||
|
||
test('that it matches the snapshot with cards', () => { | ||
// First Mount the Component in the testing DOM | ||
// Arrange | ||
const cardData = [ | ||
{ | ||
text: 'Inspirational Stuff' | ||
}, | ||
{ | ||
text: 'Calming Words' | ||
}, | ||
]; | ||
const wrapper = mount( <Board data={cardData} />); | ||
|
||
// Assert that it looks like the last snapshot | ||
expect(wrapper).toMatchSnapshot(); | ||
|
||
// Remove the component from the DOM (save memory and prevent side effects). | ||
wrapper.unmount(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import React from 'react'; | ||
import Card from './Card'; | ||
import { mount } from 'enzyme'; | ||
|
||
describe('Card', () => { | ||
test('that it matches an existing snapshot', () => { | ||
// First Mount the Component in the testing DOM | ||
// Arrange | ||
const wrapper = mount( <Card text='Inspirational Stuff' />); | ||
|
||
// Assert that it looks like the last snapshot | ||
expect(wrapper).toMatchSnapshot(); | ||
|
||
// Remove the component from the DOM (save memory and prevent side effects). | ||
wrapper.unmount(); | ||
}); | ||
|
||
test('that displays the text prop that is given', () => { | ||
// Arrange | ||
const wrapper = mount( <Card text='Something' />); | ||
const header = wrapper.find('h3'); | ||
// Assert: check that the h3 inner text is 'Something' | ||
|
||
expect(header.text()).toEqual('Something'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would probably be wise to put the string |
||
|
||
// Clean up, remove the component from the DOM | ||
wrapper.unmount(); | ||
}); | ||
}); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like you're missing a
/
in your URL before the ID. When I added that, this code worked fine.The way I found this was by noticing the error code - 404 indicates not found, which means either you have a bad card ID, or a bad URL format. I then looked in Chrome's network tab to see what you were actually sending, and noticed the missing
/
.