This project is a companion project for the free email course on design testing available on tinnedfruit.com. It won't make much sense unless you have signed up for that.
Before you run this project, you'll need:
- A GitHub account - to fork and clone this repository
- Git - Because Git
- Node.JS and NPM - to install dependencies and run commands
By default, layout tests will run on Chrome and PhantomJS. You'll need to install WebDriver implementations for these to work, otherwise you will get errors when you run tests. Follow the installation instructions on the respective sites:
Alternatively, if you are using MacOS and have Homebrew installed, you can run brew install phantomjs chromedriver
from a terminal prompt.
You might also try running tests using Firefox by adding another check command in the suite.test
file. Unfortunately Firefox is tricky at the time of writing because Mozilla is in the process of separating the WebDriver implementation from the core Firefox download. Firefox version 48 and higher do not bundle a WebDriver.
Once you have the pre-requisites, follow these steps:
- Fork this repository to your own GitHub account.
- Clone the repository to your own computer.
- From a command prompt,
cd
into the project and runnpm install
to install the project dependencies
Here are the NPM scripts that can be run for this project:
npm run serve
- starts a web server on port 8080. It also opens the home page in a browser for you.npm run stylelint
- runs the stylelint CSS linter over all CSS files in thesrc/css
directory.npm test
- runs Galen Framework layout tests using thetest/suite.test
suite and thetest/feature.gspec
spec files. You'll need to have the web server running first (runnpm run serve
in another terminal window)npm run report
- opens the Galen test report fromtest/report/report.html
in a browser window. This will only work after a test run.
If you need any help with anything, raise an issue on GitHub or email me on [email protected].