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

Writing tests #204

Open
MazharulIslam-Naim opened this issue Apr 19, 2023 · 2 comments
Open

Writing tests #204

MazharulIslam-Naim opened this issue Apr 19, 2023 · 2 comments
Assignees

Comments

@MazharulIslam-Naim
Copy link
Member

MazharulIslam-Naim commented Apr 19, 2023

Using Percy and Cypress to write E2E tests to make sure the pages look the way their supposed to and user flow is correct. Then using react testing library to do unit tests for specific complex functionality.

@MazharulIslam-Naim MazharulIslam-Naim self-assigned this Apr 19, 2023
@MazharulIslam-Naim
Copy link
Member Author

MazharulIslam-Naim commented May 3, 2023

To get started with Percy use this link. This will let you create an account connected to the 8BY8 team on BrowserStack which has Percy included. To run Percy locally you need to go to the web-app project, then Project settings. There you will see Project token. In the command line run:

Windows (cmd)

$ set PERCY_TOKEN=your token here

Windows (powershell)

$Env:PERCY_TOKEN="your-projects-token"

Unix (mac or git bash)

$ export PERCY_TOKEN=your token here

Finally run npm run cypress:run to run visual tests.

Percy-Cypress Docs
Tutorial
For reference on using Percy UI checkout Demo Web Project in the list of projects.

@MazharulIslam-Naim
Copy link
Member Author

MazharulIslam-Naim commented May 3, 2023

Some reference pages for working with Cypress:
Introduction and Core Concepts
Tutorial using Next.js

Also, I'm going to be using MailSlurp to test email verification. Here is a guide on that:
Send and receive email in Cypress JS tests with MailSlurp

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

1 participant