Socket
Socket
Sign inDemoInstall

expect-playwright

Package Overview
Dependencies
Maintainers
2
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

expect-playwright - npm Package Compare versions

Comparing version 0.7.1 to 0.7.2

14

lib/matchers/toHaveSelector/index.js

@@ -5,8 +5,10 @@ "use strict";

const toHaveSelector = async function (arg, selector, options = {}) {
const frame = await utils_1.getFrame(arg);
const pass = await frame
.waitForSelector(selector, {
state: this.isNot ? "hidden" : "visible",
...options,
})
const pass = await utils_1.getElementHandle([
arg,
selector,
{
state: this.isNot ? "hidden" : "visible",
...options,
},
], 0)
.then(() => !this.isNot)

@@ -13,0 +15,0 @@ .catch(() => this.isNot);

@@ -6,6 +6,9 @@ "use strict";

try {
const frame = (await utils_1.getFrame(arg));
await frame.waitForSelector(selector, { state: "attached", ...options });
const [elementHandle] = await utils_1.getElementHandle([arg, selector, options], 1);
await elementHandle.waitForSelector(selector, {
state: "attached",
...options,
});
/* istanbul ignore next */
const actualCount = await frame.$$eval(selector, (el) => el.length);
const actualCount = await elementHandle.$$eval(selector, (el) => el.length);
return {

@@ -12,0 +15,0 @@ pass: actualCount === expectedValue,

{
"name": "expect-playwright",
"version": "0.7.1",
"version": "0.7.2",
"main": "lib/index.js",

@@ -5,0 +5,0 @@ "types": "./global.d.ts",

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