New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

expect-puppeteer

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

expect-puppeteer - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

19

CHANGELOG.md

@@ -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)

4

package.json
{
"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'
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc