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

Set up Cypress Test for Search page #3

Open
ElliotForWater opened this issue Feb 3, 2021 · 7 comments
Open

Set up Cypress Test for Search page #3

ElliotForWater opened this issue Feb 3, 2021 · 7 comments
Assignees

Comments

@ElliotForWater
Copy link
Collaborator

ElliotForWater commented Feb 3, 2021

We would like to start using End to End tests to ensure our application doesn't have unseen bugs.
We thought about Cypress since some of us have a good experience with it.

Before starting it, we would like to do a trial, create a MVP for the testing suits, to see how well it integrate with our system.
The idea would be to set up Cypress and have one or two test running.
And see what challenge we could face with it.

A good first test could be on the search page.

@ShubhamPalriwala
Copy link

Writing structural tests for our landing page would be a great way to start in my opinion.
This can be followed by functional testing of the search bar too!
I'd like to work on this issue, let me know if I can proceed further.

@gsambrotta
Copy link
Collaborator

Hey @ShubhamPalriwala Happy to see you are interested in this.
Would be very helpful for us.
I think it would make more sense to make a prototype of how we can set up Cypress.

The top priority to test is the search bar.
We would you start with structural test on the homepage? What would you like to test there?

@ShubhamPalriwala
Copy link

So, I recently wrote a test suite on the merriam-websiter website wherein I tested their searchBox which can be found here. Let me know if we can proceed with this for now.

@ShubhamPalriwala
Copy link

@gsambrotta Should I proceed with it with something similar to what I've mentioned above?

Awaiting your feedback

@gsambrotta
Copy link
Collaborator

@ShubhamPalriwala that test looks very similar to what can fit for us.
Yes please, feel free to proceed with the task.

I would be happy if you can share early PR, like a draft of your work in progress so we are sure you don't work for long time on something that might not be the best solution for Elliot for Water.

@ShubhamPalriwala
Copy link

Hey @gsambrotta, Can you mail me these 3 environment variables so that I start the development server as without them I cannot view the search results:

NEXT_PUBLIC_CONTENTFUL_GRAPHQL_URL=
NEXT_PUBLIC_CONTENTFUL_SPACE_ID=
NEXT_PUBLIC_CONTENTFUL_ACCESS_TOKEN=

@gsambrotta
Copy link
Collaborator

gsambrotta commented Jun 23, 2021

@ShubhamPalriwala sorry for some reason I don't get notifications from issues. I will try to keep acloser eye on this issue.
I created a sandbox environment for contributors without Contentful access.
Now you can simply create a MOCK_CONTENTFUL=TRUE var in your .env file as we do here:
https://github.com/ElliotForWater/elliotforwater.com/blob/develop/.env.development.example#L16

@gsambrotta gsambrotta added the hacktoberfest PR partecipating to https://hacktoberfest.digitalocean.com/ label Oct 4, 2021
@gsambrotta gsambrotta changed the title Set up Cypress Test suit Set up Cypress Test for Search page Oct 4, 2021
@gsambrotta gsambrotta removed the hacktoberfest PR partecipating to https://hacktoberfest.digitalocean.com/ label Aug 1, 2022
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

No branches or pull requests

2 participants