Documentation part of the assignment detailing test plan creation, test case design, automation strategy, bug reporting, and performance testing strategy can be found here.
Run:
npm install
# or
yarn
Tests for the User Profile Page feature have been included in UserProfilePage.test.js
file. Since no implementation was required the component was stubbed inside of the test file and its usage was simulated using mock data and functions. To run tests use:
npm run test
# or
yarn run test
In order for the test to run properly I added a basic Posts
component in \src\app\Posts.jsx
, with a simple UI that allow the user to create new posts and add comments to them. The component is being called in posts.jsx
page located in the \pages
folder.
To access the page and component in browser run npm run dev
or yarn dev
and navigate to http://localhost:3000/posts
URL in your browser.
The Cypress script has been included in \cypress\e2e\Posts.cy.js
file. Before running the script make sure your app/server is running.
To run the script in terminal use:
npm run cypress:run
# or
yarn cypress:run
To run the script in browser:
- Run:
npm run cypress:open
# or
yarn cypress:open
- Select
E2E Testing
. - Select a browser.
- Click
Start E2E Testing in **selected browser**
button. - Select
E2E specs
tab if it isn't already selected. - Select
Posts.cy.js
spec. - Wait for the test to resolve.