webdrivercss
webdrivercss copied to clipboard
Split webdrivercss into multiple packages
Webdrivercss currently does a lot of different things. It takes screenshots, calculates diffs, uploads to aplitools / api, has testing helpers for images within tolerances etc.
I believe these are all distinct functions that people might want to swap with other options and should be packages layered on top of webdrivercss.
Here is my proposal:
- Webdrivercss becomes just a plugin to webdriverio that captures and saves screenshots.
- A new package that compares the two images locally, creates a diff, and outputs a result object like we currently get as the result in the callback to webdrivercss.
- A package that can tar up a folder and upload it to aplitools / the webdrivercss-adminpanel
By splitting this up into multiple packages people can replace or swap the functionality that they want.
For example, I want to take screenshots, but I don't want to generate any diffs locally and I need to upload to a different server with different endpoints than webdrivercss-adminpanel. I've had to clear the image folder every time so that webdrivercss doesn't try to generate any diffs and write my own upload at the end.