/e2e-hermione

Primary LanguageJavaScript

E2E test

Install Docker

Install

Standalone chrome

To debug local you can use standalone chrome

Download here

add line in .hermione.conf.js

gridUrl: 'http://localhost:9515'

Clone project

git clone git@github.com:frontend-science/e2e-hermione.git
cd e2e-hermione
npm install

To run standalone chrome

./docker-chrome.sh

To change environment

Type in console For OSX:

export NODE_ENV=development

For Windows:

SET NODE_ENV=development

To run all tests

npm test

To run in specified env (macOs)

NODE_ENV=production npm test

To run by sets

npm run admin
npm run client

To run separate tests

npm run admin tests/admin/mytest.js
npm run client tests/client/mytest.js
NODE_ENV=production hermione -c hermione.conf.js tests/admin/mytest.js

Project structure

    ┌ configs              // configuration for different envs
    │  ├ default.json      // applied always
    │  ├ development.json  // merging with default
    │  └ production.json
    │
    ├ debug                // tpm folder for debug screenshots (in .gitignore)
    │  ├ admin
    │  └ client
    │
    ├ pages                // PageObjects - selectors for different elems on pages
    │  ├ admin
    │  │  ├ adminPage1.js
    │  │  ├ adminPage2.js
    │  │  └ adminPage3.js
    │  └ client
    │
    ├ tests                // tests js files
    │  ├ admin
    │  │  ├ adminPage1.js
    │  │  ├ adminPage2.js
    │  │  └ adminPage3.js
    │  └ client
    │
    ├ .hermione.conf.js    // main test config
    ├ docker-***.sh        // sh files for quick run of dockerized browsers
    ├ package.json         // project deps, and npm run scripts
    └ README.md            // This documentation file

Docs