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

Cypress testing & Error page component #32

Merged
merged 9 commits into from
Feb 9, 2024
Merged

Cypress testing & Error page component #32

merged 9 commits into from
Feb 9, 2024

Conversation

dsstevens
Copy link
Contributor

@dsstevens dsstevens commented Feb 9, 2024

What kind of change does this PR introduce?

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Refactor(DRY-ing up/ reorganizing code, etc.)
  • Small fix (Corrected a typo, removed a comment, etc.)

Issue/feature/bug description:

Most of our Cypress testing along with a simple error page component.

Checklist before requesting a review

  • I ran the code locally and verified that there are no visible errors.
  • I have performed a self-review of my code
  • I have refactored my code before this push
  • The commit message follows our guidelines
  • My code follows the code style of this project.

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.

Copy link

vercel bot commented Feb 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
laboulangerie ✅ Ready (Inspect) Visit Preview Feb 9, 2024 10:16pm

Copy link
Contributor

@coryrpow coryrpow left a 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');
Copy link
Contributor

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."
Copy link
Contributor

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";
Copy link
Contributor

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.

Copy link

@EricBelongea EricBelongea left a 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!

Comment on lines +10 to +27
"relationships": {
"breads": {
"data": [
{
"id": "13",
"type": "bread"
},
{
"id": "14",
"type": "bread"
},
{
"id": "15",
"type": "bread"
},
{
"id": "16",
"type": "bread"

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

Comment on lines +44 to +48
"relationships": {
"country": {
"data": {
"id": "3",
"type": "country"

Choose a reason for hiding this comment

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

We also removed this.

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

@coryrpow coryrpow merged commit 76d2fc8 into main Feb 9, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants