djom202 / jobsity-test

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Jobsity Test

npm percy

Installing Dependencies

You'll need to install all dependencies into the project and to do that you just will need to use one of this commands:

npm install

or

yarn install

This command will install all dependencies needed as:

Note: At the moment when you installed Percy, it must downloaded the Chrome driver from BrowserStack, nevertheless if you don't see it or it cause any issue in runtime over the missing driver, you'll could use this command to solved it:

exports PERCY_POSTINSTALL_BROWSER=true

Now you could re-install the dependencies and the Chrome driver will be downloaded.

Running and configurate the Percy tests

You'll need to create a percy account here in order to get a PERCY_TOKEN, but don't worries, you can get access to Percy's core features which include unlimited users and 5000 screenshots/month FREE.

When you already got your PERCY_TOKEN, you'll can successfully run Percy, the PERCY_TOKEN environment variable must be set:

# Windows
$ set PERCY_TOKEN=<your token here>

# Unix
$ export PERCY_TOKEN=<your token here>

When running with npm run ppt (Pixel-Perfect Test), and your project's PERCY_TOKEN, a new Percy build will be created and snapshots will be uploaded to your project.

$ export PERCY_TOKEN=[your-project-token]
$ npm run ppt
[percy] Percy has started!
[percy] Created build #1: https://percy.io/[your-project]
[percy] Running "cypress run"
...
[percy] Snapshot taken "My app should look good"
[percy] Snapshot taken "Clicked button"
...
[percy] Stopping percy...
[percy] Finalized build #1: https://percy.io/[your-project]
[percy] Done!

Amazing!, You'll have run the base line from the master branch and now you'll be able to see them on your Percy dashboard. After that you'll need make some changes and seeing the snapshots and visual diffs in Percy.

Super fun! You've already ran a picel-perfect test on Percy

Running the Cypress tests

In order to run the cypress test suite, you'll need to run the next command:

npx cypress open

This command to allow you to open the Cypress Studio where you'll see the list of the test suite created to this test organized under the folder Features as follows:

  • Cart.feature
  • Contact.feature
  • Home.feature
  • Search.feature

After that you'll just need to do click over the test that you want to run and Cypress will open the Browser in order to run the suite selected before.

License

license

This project is licensed under the terms of the MIT license.

About

License:MIT License


Languages

Language:JavaScript 57.9%Language:Gherkin 42.1%