Skip to content
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

Kat - Inspiration-Board - Octos #27

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open

Conversation

kseastman
Copy link

Inspiration Board

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
Explain the steps in creating a new Card from the form. Form input modifies the text and emoji entries for the form's state, form submit uses a submit handler that references a callback function to add the card. An axios request, including the card information, is posted to the API, and the collection of cards is modified to include the newly created card.
How did you learn how to use the API? Reading the API documentation, and exploring the results in console and PostMan.
What function did you use to place the GET request from the API to get the list of cards? Why use that function? I created a helper function that was responsible for both the board and the card list get requests. I then called that helper function from my componentDidMount and componentDidUpdate functions, because in the first case it prevents the page from displaying junk data or stalling out while the API request finishes. In the second, it allowed the boards to be re-rendered based on the current selection.
Explain the purpose of a Snapshot test. To compare the html of the snapshot against any subsequent changes. This allows us to refactor and verify that our changes haven't broken anything.
What purpose does Enzyme serve in testing a React app? Enzyme creates snapshots.
Summary deployed at: https://kseastman.github.io/inspiration-board/

@CheezItMan
Copy link

Inspiration Board

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene Good number of commits and good commit messages
Comprehension questions Check, Enzyme is used to render components shallowly, which makes Jest snapshot tests more usable. It also lets you select elements within a component for testing events.
General
Card Component renders the data provided as props Check
Board Component takes a URL and renders the list of Cards and passes in callback functions Check
NewCardform Component is a controlled form and uses a callback function to return entered data to the parent component Check
API
GET request made in componentDidMount Check
DELETE request made in callback function Check
POST request made in callback function passed to NewCardForm component. Check
Snapshot testing Check, plus good tests with mocking axios
Styling Very nicely done.
Overall Awesome work! You hit all the learning goals and a number of extras. Great work!

@@ -0,0 +1,3 @@
// ./__mocks__/axios.js
import mockAxios from 'jest-mock-axios';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Outstanding!

this.props.updateStatusCallback(error.message, 'error')
})

axios.get(BASE_URL)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do 2 API calls?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot to refactor after implementing the functionality to allow a user to change the inspiration board. I was following the whole "make it work, make it right, make it pretty" mantra. It works, but it is not right or pretty. :*(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants