-
Notifications
You must be signed in to change notification settings - Fork 4
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
Cypress testing & Error page component #32
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
Awesome, this looks great and I feel more confident in looking at FE stuff over all. Glad we got a chance to review and walk through with almost everyone on the call 😄
}); | ||
|
||
it("should display the bread name and description", () => { | ||
cy.get('h2').contains('Pão de Queijo'); |
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.
Nice, I feel a lot more confident about looking at this testing after getting walked through cypress with Bobby. Very similar to capybara testing in BE.
"attributes": { | ||
"name": "Pão de Queijo", | ||
"description": "Pão de queijo is a famous Brazilian cheese bread made with cassava flour and cheese, resulting in a chewy and cheesy delight.", | ||
"recipe": "Ingredients: 500g tapioca flour 250ml milk 125g butter 10g salt 2 eggs 200g grated cheese Instructions: Boil milk with butter and salt. Pour over tapioca flour and mix. Let it cool, then add eggs and cheese. Form small balls and bake at 375°F (190°C) for 15-20 minutes." |
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.
This will change once we shift over to the NEW AND IMPROVED back end, but just commenting to try and triangulate what I know in here.
@@ -4,6 +4,7 @@ import Navbar from '../Navbar/Navbar'; | |||
import Main from '../Main/Main'; | |||
import BreadList from '../BreadList/BreadList'; | |||
import BreadDetail from '../BreadDetail/BreadDetail'; | |||
import Error from "../Error/Error"; |
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.
Ok and this is the error page handling stuff being imported to handle pages that shouldn't have routing to them.
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.
Great testing, thanks for sharing what FE, Cypress, testing looks like!
"relationships": { | ||
"breads": { | ||
"data": [ | ||
{ | ||
"id": "13", | ||
"type": "bread" | ||
}, | ||
{ | ||
"id": "14", | ||
"type": "bread" | ||
}, | ||
{ | ||
"id": "15", | ||
"type": "bread" | ||
}, | ||
{ | ||
"id": "16", | ||
"type": "bread" |
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.
We have hand-rolled and removed this from our Serialized JSON payload. Just getting rid of information that we don't need to send and stuff you don't need to see. #efficiency
"relationships": { | ||
"country": { | ||
"data": { | ||
"id": "3", | ||
"type": "country" |
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.
We also removed this.
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.
This is like a BE VCR cassette! Mocking data
What kind of change does this PR introduce?
Issue/feature/bug description:
Most of our Cypress testing along with a simple error page component.
Checklist before requesting a review
What’s next:
Need to merge this in as a quick merge to fork a copy for iteration 2 for the C# backend repo. Still need testing for the error page component.