ScottLogic / finput

A vanilla-JS financial amount input control
http://scottlogic.github.io/finput
MIT License
22 stars 10 forks source link

chore: refactor specs to make it functions and expectations explicit #122

Closed msuperina closed 6 years ago

msuperina commented 6 years ago

Refactoring of how the custom commands are consumed by the test specs. Each spec need to get a driver, load it before all the tests and unload it after all the tests. customCommands now exports functions to be composed. A set of functions to run the expectation in the it code, and a set of helpers to automate the writing of the it functions.

Note: although all the specs need to get a driver, there is only one instance of driver shared by all the specs (tests are run in sequence). This can change - and it will be easy to change the code with this refactoring - but so far I have had timeout issues when creating many instances, and have not figured out what is the exact issue.

msuperina commented 6 years ago

@ryanggrey I just created a commit without the modifications to the travis config

msuperina commented 6 years ago

Closing for https://github.com/ScottLogic/finput/pull/124