Skip to content

Week 3 Assignment#4

Open
tbreon wants to merge 1 commit into
modern-web-application-uw18:masterfrom
tbreon:master
Open

Week 3 Assignment#4
tbreon wants to merge 1 commit into
modern-web-application-uw18:masterfrom
tbreon:master

Conversation

@tbreon

@tbreon tbreon commented May 16, 2018

Copy link
Copy Markdown

No description provided.

describe("AddRental", () => {
it('Smoke test make sure the component rendors', () =>{
const div = document.createElement('div');
ReactDOM.render(<CartTotal/>, div);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice job with your tests. These two are failing though. You'll want to ensure that you pass in some "test" props to ensure the CartTotal component renders appropriately

Comment thread ecommerce-ui/src/App.css
padding: 0;
margin: 0;
list-style: none;
display: -webkit-box;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For future reference, create-react-app adds these prefixes automatically 😄. No need to add them, which is pretty cool. https://github.com/facebook/create-react-app#whats-included

/>
)
})
let shoppingCart = this.state.cart.map((cart, idx) => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Another alternative is to pass the entire cart as one prop, but this works as well.

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