storybook-addon-playwright 4.19.2 → 4.20.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -18,7 +18,7 @@
18
18
  "type": "shell",
19
19
  "command": "npm run start:storybook",
20
20
  "presentation": {
21
- "reveal": "silent",
21
+ "reveal": "always",
22
22
  "revealProblems": "onProblem",
23
23
  "close": true
24
24
  },
@@ -2,15 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.clearInput = void 0;
4
4
  const tslib_1 = require("tslib");
5
- function clearInput(selector, options) {
5
+ function clearInput(selector, options = {}) {
6
6
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
7
+ const { blur, timeout } = options;
7
8
  yield this.fill(selector, '');
8
- if (!options)
9
- return;
10
- if (options.blur) {
9
+ if (blur) {
11
10
  yield this.$eval(selector, (e) => e.blur());
12
11
  }
13
- if (options.timeout) {
12
+ if (timeout) {
14
13
  yield this.waitForTimeout(options.timeout);
15
14
  }
16
15
  });
@@ -1 +1 @@
1
- {"version":3,"file":"clear-input.js","sourceRoot":"","sources":["../../src/page-extra/clear-input.ts"],"names":[],"mappings":";;;;AAGA,SAAsB,UAAU,CAE9B,QAAgB,EAChB,OAA2B;;QAE3B,MAAM,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QAC9B,IAAI,CAAC,OAAO;YAAE,OAAO;QACrB,IAAI,OAAO,CAAC,IAAI,EAAE;YAChB,MAAM,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;SAC7C;QACD,IAAI,OAAO,CAAC,OAAO,EAAE;YACnB,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;SAC5C;IACH,CAAC;CAAA;AAbD,gCAaC"}
1
+ {"version":3,"file":"clear-input.js","sourceRoot":"","sources":["../../src/page-extra/clear-input.ts"],"names":[],"mappings":";;;;AAGA,SAAsB,UAAU,CAE9B,QAAgB,EAChB,UAA6B,EAAE;;QAE/B,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;QAElC,MAAM,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QAE9B,IAAI,IAAI,EAAE;YACR,MAAM,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;SAC7C;QAED,IAAI,OAAO,EAAE;YACX,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;SAC5C;IACH,CAAC;CAAA;AAhBD,gCAgBC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "storybook-addon-playwright",
3
- "version": "4.19.2",
3
+ "version": "4.20.1",
4
4
  "description": "An addon to visually test the stories in the multiple browsers within storybook environment",
5
5
  "author": "m.doaie <mdoaie@yahoo.co.uk>",
6
6
  "engines": {