@commercetools-frontend/cypress 22.41.0 → 22.42.0

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,6 +18,9 @@ var uuid = require('uuid');
18
18
  var ssr = require('@commercetools-frontend/application-shell/ssr');
19
19
  var constants = require('../../dist/constants-c657705e.cjs.dev.js');
20
20
  var _slicedToArray = require('@babel/runtime-corejs3/helpers/slicedToArray');
21
+ var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/map');
22
+ var _Array$from = require('@babel/runtime-corejs3/core-js-stable/array/from');
23
+ var _entriesInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/entries');
21
24
  var _reduceRightInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/reduce-right');
22
25
 
23
26
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
@@ -34,6 +37,9 @@ var _findInstanceProperty__default = /*#__PURE__*/_interopDefault(_findInstanceP
34
37
  var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
35
38
  var _URL__default = /*#__PURE__*/_interopDefault(_URL);
36
39
  var semver__default = /*#__PURE__*/_interopDefault(semver);
40
+ var _mapInstanceProperty__default = /*#__PURE__*/_interopDefault(_mapInstanceProperty);
41
+ var _Array$from__default = /*#__PURE__*/_interopDefault(_Array$from);
42
+ var _entriesInstanceProperty__default = /*#__PURE__*/_interopDefault(_entriesInstanceProperty);
37
43
  var _reduceRightInstanceProperty__default = /*#__PURE__*/_interopDefault(_reduceRightInstanceProperty);
38
44
 
39
45
  function ownKeys$1(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -303,7 +309,7 @@ function scrollIntoView(htmlElement) {
303
309
  // for cross origin domains .frameElement returns null so query using parentWindow
304
310
  // but when running using --disable-web-security it will return the frame element
305
311
  function getFrameElement(currentWindow) {
306
- var _context;
312
+ var _context, _context2;
307
313
  if (currentWindow.frameElement) {
308
314
  // accessible for same-origin iframes
309
315
  // or when running with --disable-web-security
@@ -311,8 +317,12 @@ function getFrameElement(currentWindow) {
311
317
  }
312
318
 
313
319
  // fallback to querying using the parent window, mainly to grab the AUT iframe
314
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
315
- return _findInstanceProperty__default["default"](_context = [...currentWindow.parent.document.querySelectorAll('iframe')]).call(_context, iframe => iframe.contentWindow === currentWindow);
320
+ const iframeElements = currentWindow.parent.document.querySelectorAll('iframe');
321
+ return _findInstanceProperty__default["default"](_context = _mapInstanceProperty__default["default"](_context2 = _Array$from__default["default"](_entriesInstanceProperty__default["default"](iframeElements).call(iframeElements))).call(_context2, _ref => {
322
+ let _ref2 = _slicedToArray(_ref, 2),
323
+ element = _ref2[1];
324
+ return element;
325
+ })).call(_context, element => element.contentWindow === currentWindow);
316
326
  }
317
327
  function getIframesPositionShift(element) {
318
328
  let currentWindow = element.ownerDocument.defaultView;
@@ -328,13 +338,16 @@ function getIframesPositionShift(element) {
328
338
  // eslint-disable-next-line prefer-const
329
339
  const iframes = [];
330
340
  while (currentWindow !== window.top) {
331
- iframes.push(getFrameElement(currentWindow));
341
+ const element = getFrameElement(currentWindow);
342
+ if (element) {
343
+ iframes.push(element);
344
+ }
332
345
  currentWindow = currentWindow.parent;
333
346
  }
334
- return _reduceRightInstanceProperty__default["default"](iframes).call(iframes, (_ref, frame) => {
335
- let frameX = _ref.frameX,
336
- frameY = _ref.frameY,
337
- frameScale = _ref.frameScale;
347
+ return _reduceRightInstanceProperty__default["default"](iframes).call(iframes, (_ref3, frame) => {
348
+ let frameX = _ref3.frameX,
349
+ frameY = _ref3.frameY,
350
+ frameScale = _ref3.frameScale;
338
351
  const _frame$getBoundingCli = frame.getBoundingClientRect(),
339
352
  x = _frame$getBoundingCli.x,
340
353
  y = _frame$getBoundingCli.y,
@@ -18,6 +18,9 @@ var uuid = require('uuid');
18
18
  var ssr = require('@commercetools-frontend/application-shell/ssr');
19
19
  var constants = require('../../dist/constants-8ad2a50e.cjs.prod.js');
20
20
  var _slicedToArray = require('@babel/runtime-corejs3/helpers/slicedToArray');
21
+ var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/map');
22
+ var _Array$from = require('@babel/runtime-corejs3/core-js-stable/array/from');
23
+ var _entriesInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/entries');
21
24
  var _reduceRightInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/reduce-right');
22
25
 
23
26
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
@@ -34,6 +37,9 @@ var _findInstanceProperty__default = /*#__PURE__*/_interopDefault(_findInstanceP
34
37
  var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
35
38
  var _URL__default = /*#__PURE__*/_interopDefault(_URL);
36
39
  var semver__default = /*#__PURE__*/_interopDefault(semver);
40
+ var _mapInstanceProperty__default = /*#__PURE__*/_interopDefault(_mapInstanceProperty);
41
+ var _Array$from__default = /*#__PURE__*/_interopDefault(_Array$from);
42
+ var _entriesInstanceProperty__default = /*#__PURE__*/_interopDefault(_entriesInstanceProperty);
37
43
  var _reduceRightInstanceProperty__default = /*#__PURE__*/_interopDefault(_reduceRightInstanceProperty);
38
44
 
39
45
  function ownKeys$1(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -303,7 +309,7 @@ function scrollIntoView(htmlElement) {
303
309
  // for cross origin domains .frameElement returns null so query using parentWindow
304
310
  // but when running using --disable-web-security it will return the frame element
305
311
  function getFrameElement(currentWindow) {
306
- var _context;
312
+ var _context, _context2;
307
313
  if (currentWindow.frameElement) {
308
314
  // accessible for same-origin iframes
309
315
  // or when running with --disable-web-security
@@ -311,8 +317,12 @@ function getFrameElement(currentWindow) {
311
317
  }
312
318
 
313
319
  // fallback to querying using the parent window, mainly to grab the AUT iframe
314
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
315
- return _findInstanceProperty__default["default"](_context = [...currentWindow.parent.document.querySelectorAll('iframe')]).call(_context, iframe => iframe.contentWindow === currentWindow);
320
+ const iframeElements = currentWindow.parent.document.querySelectorAll('iframe');
321
+ return _findInstanceProperty__default["default"](_context = _mapInstanceProperty__default["default"](_context2 = _Array$from__default["default"](_entriesInstanceProperty__default["default"](iframeElements).call(iframeElements))).call(_context2, _ref => {
322
+ let _ref2 = _slicedToArray(_ref, 2),
323
+ element = _ref2[1];
324
+ return element;
325
+ })).call(_context, element => element.contentWindow === currentWindow);
316
326
  }
317
327
  function getIframesPositionShift(element) {
318
328
  let currentWindow = element.ownerDocument.defaultView;
@@ -328,13 +338,16 @@ function getIframesPositionShift(element) {
328
338
  // eslint-disable-next-line prefer-const
329
339
  const iframes = [];
330
340
  while (currentWindow !== window.top) {
331
- iframes.push(getFrameElement(currentWindow));
341
+ const element = getFrameElement(currentWindow);
342
+ if (element) {
343
+ iframes.push(element);
344
+ }
332
345
  currentWindow = currentWindow.parent;
333
346
  }
334
- return _reduceRightInstanceProperty__default["default"](iframes).call(iframes, (_ref, frame) => {
335
- let frameX = _ref.frameX,
336
- frameY = _ref.frameY,
337
- frameScale = _ref.frameScale;
347
+ return _reduceRightInstanceProperty__default["default"](iframes).call(iframes, (_ref3, frame) => {
348
+ let frameX = _ref3.frameX,
349
+ frameY = _ref3.frameY,
350
+ frameScale = _ref3.frameScale;
338
351
  const _frame$getBoundingCli = frame.getBoundingClientRect(),
339
352
  x = _frame$getBoundingCli.x,
340
353
  y = _frame$getBoundingCli.y,
@@ -16,6 +16,9 @@ import { v4 } from 'uuid';
16
16
  import { buildOidcScope } from '@commercetools-frontend/application-shell/ssr';
17
17
  import { O as OIDC_RESPONSE_TYPES, S as STORAGE_KEYS } from '../../dist/constants-18b165fc.esm.js';
18
18
  import _slicedToArray from '@babel/runtime-corejs3/helpers/esm/slicedToArray';
19
+ import _mapInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/map';
20
+ import _Array$from from '@babel/runtime-corejs3/core-js-stable/array/from';
21
+ import _entriesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/entries';
19
22
  import _reduceRightInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/reduce-right';
20
23
 
21
24
  function ownKeys$1(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -285,7 +288,7 @@ function scrollIntoView(htmlElement) {
285
288
  // for cross origin domains .frameElement returns null so query using parentWindow
286
289
  // but when running using --disable-web-security it will return the frame element
287
290
  function getFrameElement(currentWindow) {
288
- var _context;
291
+ var _context, _context2;
289
292
  if (currentWindow.frameElement) {
290
293
  // accessible for same-origin iframes
291
294
  // or when running with --disable-web-security
@@ -293,8 +296,12 @@ function getFrameElement(currentWindow) {
293
296
  }
294
297
 
295
298
  // fallback to querying using the parent window, mainly to grab the AUT iframe
296
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
297
- return _findInstanceProperty(_context = [...currentWindow.parent.document.querySelectorAll('iframe')]).call(_context, iframe => iframe.contentWindow === currentWindow);
299
+ const iframeElements = currentWindow.parent.document.querySelectorAll('iframe');
300
+ return _findInstanceProperty(_context = _mapInstanceProperty(_context2 = _Array$from(_entriesInstanceProperty(iframeElements).call(iframeElements))).call(_context2, _ref => {
301
+ let _ref2 = _slicedToArray(_ref, 2),
302
+ element = _ref2[1];
303
+ return element;
304
+ })).call(_context, element => element.contentWindow === currentWindow);
298
305
  }
299
306
  function getIframesPositionShift(element) {
300
307
  let currentWindow = element.ownerDocument.defaultView;
@@ -310,13 +317,16 @@ function getIframesPositionShift(element) {
310
317
  // eslint-disable-next-line prefer-const
311
318
  const iframes = [];
312
319
  while (currentWindow !== window.top) {
313
- iframes.push(getFrameElement(currentWindow));
320
+ const element = getFrameElement(currentWindow);
321
+ if (element) {
322
+ iframes.push(element);
323
+ }
314
324
  currentWindow = currentWindow.parent;
315
325
  }
316
- return _reduceRightInstanceProperty(iframes).call(iframes, (_ref, frame) => {
317
- let frameX = _ref.frameX,
318
- frameY = _ref.frameY,
319
- frameScale = _ref.frameScale;
326
+ return _reduceRightInstanceProperty(iframes).call(iframes, (_ref3, frame) => {
327
+ let frameX = _ref3.frameX,
328
+ frameY = _ref3.frameY,
329
+ frameScale = _ref3.frameScale;
320
330
  const _frame$getBoundingCli = frame.getBoundingClientRect(),
321
331
  x = _frame$getBoundingCli.x,
322
332
  y = _frame$getBoundingCli.y,
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var constants = require('./constants-c657705e.cjs.dev.js');
6
6
 
7
7
  // NOTE: This string will be replaced on build time with the package version.
8
- var version = "22.41.0";
8
+ var version = "22.42.0";
9
9
 
10
10
  exports.OIDC_RESPONSE_TYPES = constants.OIDC_RESPONSE_TYPES;
11
11
  exports.STORAGE_KEYS = constants.STORAGE_KEYS;
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var constants = require('./constants-8ad2a50e.cjs.prod.js');
6
6
 
7
7
  // NOTE: This string will be replaced on build time with the package version.
8
- var version = "22.41.0";
8
+ var version = "22.42.0";
9
9
 
10
10
  exports.OIDC_RESPONSE_TYPES = constants.OIDC_RESPONSE_TYPES;
11
11
  exports.STORAGE_KEYS = constants.STORAGE_KEYS;
@@ -1,6 +1,6 @@
1
1
  export { O as OIDC_RESPONSE_TYPES, S as STORAGE_KEYS } from './constants-18b165fc.esm.js';
2
2
 
3
3
  // NOTE: This string will be replaced on build time with the package version.
4
- var version = "22.41.0";
4
+ var version = "22.42.0";
5
5
 
6
6
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/cypress",
3
- "version": "22.41.0",
3
+ "version": "22.42.0",
4
4
  "description": "Cypress commands and utilities for Custom Applications",
5
5
  "bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
6
6
  "repository": {
@@ -41,9 +41,9 @@
41
41
  "dependencies": {
42
42
  "@babel/runtime": "^7.22.15",
43
43
  "@babel/runtime-corejs3": "^7.22.15",
44
- "@commercetools-frontend/application-config": "22.41.0",
45
- "@commercetools-frontend/application-shell": "22.41.0",
46
- "@commercetools-frontend/constants": "22.41.0",
44
+ "@commercetools-frontend/application-config": "22.42.0",
45
+ "@commercetools-frontend/application-shell": "22.42.0",
46
+ "@commercetools-frontend/constants": "22.42.0",
47
47
  "@manypkg/get-packages": "1.1.3",
48
48
  "@types/semver": "^7.5.1",
49
49
  "semver": "7.6.2",