Git Product home page Git Product logo

tests's Introduction

Mighty Citizen Testing Scripts

Setup

Clone this repo in your project git clone [email protected]:mightycitizen/tests.git

Remove the .git repo from the tests folder and install necessary node modules:

cd tests
rm -rf .git
npm install

The urls.js controls which pages and what site url to test against. All of the following testing suites allow for local urls to be tested.

Percy Visual Regression Testing

You'll need to get a percy token for this project first before you can run this - to get a token, go to your Percy account, find the project (or create the project), then go to project settings. You'll find a PERCY_TOKEN there. Before running any Percy commands, you'll need to run

EXPORT PERCY_TOKEN=[TOKEN HERE]

To run

npm run percy (runs using snapshots via Cypress)

Cypress Functional Testing

Tests are written in the cypress/integration folder

To run

npx cypress open

Axe Accessibility

Axe accessibility testing is run through Cypress - run npx cypress open and then choose the a11y.js script. Cypress will show which templates have errors. If you have the javascript console open, and click the error, it'll give you more details (the testing has to be finished or stopped in order to do this).

HTML Validation

To run

Run npm run validation in command line in this test folder. Results will output in the validator folder.

Alternate Cypress Validation

Validation testing can also be run through Cypress, which may be more accurate since it's run through browser emulation - run npx cypress open and then choose the validation.js script. Cypress will show which templates have errors. If you have the javascript console open, and click the error, it'll give you more details (the testing has to be finished or stopped in order to do this).

tests's People

Contributors

fernakr avatar

Stargazers

Keyth M Citizen  avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.