expect-puppeteer
Advanced tools
Comparing version 2.1.0 to 2.2.0
@@ -6,2 +6,21 @@ # Change Log | ||
<a name="2.2.0"></a> | ||
# [2.2.0](https://github.com/smooth-code/jest-puppeteer/tree/master/packages/expect-puppeteer/compare/v2.1.0...v2.2.0) (2018-03-17) | ||
**Note:** Version bump only for package expect-puppeteer | ||
<a name="2.1.0"></a> | ||
# [2.1.0](https://github.com/smooth-code/jest-puppeteer/tree/master/packages/puppeteer-expect/compare/v2.0.1...v2.1.0) (2018-03-16) | ||
### Features | ||
* add element handle support ([4d37d5b](https://github.com/smooth-code/jest-puppeteer/tree/master/packages/puppeteer-expect/commit/4d37d5b)) | ||
<a name="2.0.1"></a> | ||
@@ -8,0 +27,0 @@ ## [2.0.1](https://github.com/smooth-code/jest-puppeteer/tree/master/packages/puppeteer-expect/compare/v2.0.0...v2.0.1) (2018-03-08) |
{ | ||
"name": "expect-puppeteer", | ||
"description": "Assertion toolkit for Puppeteer.", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"main": "lib/index.js", | ||
"repository": "https://github.com/smooth-code/jest-puppeteer/tree/master/packages/puppeteer-expect", | ||
"repository": "https://github.com/smooth-code/jest-puppeteer/tree/master/packages/expect-puppeteer", | ||
"author": "Greg Bergé <berge.greg@gmail.com>", | ||
@@ -8,0 +8,0 @@ "license": "MIT", |
@@ -40,6 +40,24 @@ # expect-puppeteer | ||
Writing integration test is very hard especially in Single Page Application. Data are loaded asynchronously and it is difficult to know exactly when it will be displayed in the page. | ||
Writing integration test is very hard, especially when you are testing a Single Page Applications. Data are loaded asynchronously and it is difficult to know exactly when an element will be displayed in the page. | ||
Puppeteer API is great, all this methods are built with it but it is low level and not designed to test an application. This API is designed for integration testing and will wait element before running each action. | ||
[Puppeteer API](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md) is great, but it is low level and not designed for integration testing. | ||
This API is designed for integration testing: | ||
* It will wait for element before running an action | ||
* It adds additional feature like matching an element using text | ||
**Example** | ||
```js | ||
// Does not work if button is not in page | ||
await page.click('button') | ||
// Will try while 500ms to click on "button" | ||
await page.toClick('button') | ||
// Will match a button with a "My button" text inside | ||
await page.toClick('button', { text: 'My button' }) | ||
``` | ||
## API | ||
@@ -211,2 +229,2 @@ | ||
[page]: https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#class-page 'Page' | ||
[element-handle]: https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#class-elementhandle 'ElementHandle' | ||
[elementhandle]: https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#class-elementhandle 'ElementHandle' |
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
27950
229
0