This patch introduces a custom jasmine matcher which compares
images to golden results. As a result, it becomes possible
to incorporate the goldentest.js into test.js.
This allows to write tests in a unified way.
Page.screenshot operates the global state of the page. In case of
multiple Page.screenshot() commands running in parallel with different
clipping rects, they interfere with each other.
This patch makes Page.screenshot() commands run sequencially
even though they were called in parallel.
Fixes#15.
This patch refactors Page.screenshot api, accoring to the discussion
in #5:
- Page.screenshot accepts single optional options object
- Page.saveScreenshot is removed
- Page.screenshot assumes 'png' screenshot if no type is set and no
'path' property is given
Fixes#5.
This patch introduces a goldentest.js. The tests inside
the file should rely on "golden" results rather then asserts.
For now, goldentest.js allows only image expectations. If the
actual result doesn't match the expected result, the two files
are created under `test/output` folder:
- The '-actual.png' contains the actual test result
- The '-diff.png' contains the diff between images
This patch introduces a Dialog class and a new 'dialog'
event instead of the 'alert', 'beforeunload', 'confirm' and
'prompt' events and 'Page.handleDialog' method.
Fixes#2.
This patch makes Page.evaluate await promise if one is
returned by the evaluated code.
This makes the Page.evaluateAsync unneeded, so the patch
removes it.
Fixes#11.
This patch:
- introduces StaticServer for the testing purposes
- switches tests from navigating to file:// to http://
- adds a test to cover Request.abort() functionality
References #1
This patch:
- introduces Request class.
- implements Page.setRequestInterceptor method. The method
allows to install a callback which will be called for every request
with a |Request| object as a single parameter. The callback is free
to override certain request's properties and then either continue or
abort it.
- implements request interception api for phantom-shim and unskips the
module/webpage/abort-network-request.js phantomjs test
References #1