@commercetools-frontend/cypress 22.14.3 → 22.15.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.
@@ -1,6 +1,5 @@
1
1
  'use strict';
2
2
 
3
- var _findInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/find');
4
3
  var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
5
4
  var _Object$getOwnPropertySymbols = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
6
5
  var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
@@ -11,6 +10,8 @@ var _Object$defineProperties = require('@babel/runtime-corejs3/core-js-stable/ob
11
10
  var _Object$defineProperty = require('@babel/runtime-corejs3/core-js-stable/object/define-property');
12
11
  var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
13
12
  var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
13
+ var _findInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/find');
14
+ var constants$1 = require('@commercetools-frontend/constants');
14
15
  var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/stringify');
15
16
  var _URL = require('@babel/runtime-corejs3/core-js-stable/url');
16
17
  var semver = require('semver');
@@ -22,7 +23,6 @@ var _reduceRightInstanceProperty = require('@babel/runtime-corejs3/core-js-stabl
22
23
 
23
24
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
24
25
 
25
- var _findInstanceProperty__default = /*#__PURE__*/_interopDefault(_findInstanceProperty);
26
26
  var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
27
27
  var _Object$getOwnPropertySymbols__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertySymbols);
28
28
  var _filterInstanceProperty__default = /*#__PURE__*/_interopDefault(_filterInstanceProperty);
@@ -32,13 +32,14 @@ var _Object$getOwnPropertyDescriptors__default = /*#__PURE__*/_interopDefault(_O
32
32
  var _Object$defineProperties__default = /*#__PURE__*/_interopDefault(_Object$defineProperties);
33
33
  var _Object$defineProperty__default = /*#__PURE__*/_interopDefault(_Object$defineProperty);
34
34
  var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
35
+ var _findInstanceProperty__default = /*#__PURE__*/_interopDefault(_findInstanceProperty);
35
36
  var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
36
37
  var _URL__default = /*#__PURE__*/_interopDefault(_URL);
37
38
  var semver__default = /*#__PURE__*/_interopDefault(semver);
38
39
  var _reduceRightInstanceProperty__default = /*#__PURE__*/_interopDefault(_reduceRightInstanceProperty);
39
40
 
40
- function ownKeys(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; }
41
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context5, _context6; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context5 = ownKeys(Object(t), !0)).call(_context5, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context6 = ownKeys(Object(t))).call(_context6, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
41
+ 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; }
42
+ function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var _context5, _context6; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context5 = ownKeys$1(Object(t), !0)).call(_context5, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context6 = ownKeys$1(Object(t))).call(_context6, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
42
43
 
43
44
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
44
45
 
@@ -161,7 +162,7 @@ function loginByOidc(commandOptions) {
161
162
  const requestOptions = {
162
163
  method: 'POST',
163
164
  url: "".concat(appConfig.mcApiUrl, "/tokens"),
164
- body: _objectSpread(_objectSpread({}, userCredentials), {}, {
165
+ body: _objectSpread$1(_objectSpread$1({}, userCredentials), {}, {
165
166
  client_id: applicationId,
166
167
  response_type: constants.OIDC_RESPONSE_TYPES.ID_TOKEN,
167
168
  scope: sessionScope,
@@ -436,6 +437,9 @@ subject) {
436
437
  return subject;
437
438
  }
438
439
 
440
+ function ownKeys(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; }
441
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
442
+
439
443
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
440
444
 
441
445
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -450,6 +454,17 @@ Cypress.Commands.add('loginToMerchantCenter', commandOptions => {
450
454
  loginByForm(commandOptions);
451
455
  }
452
456
  });
457
+ Cypress.Commands.add('loginToMerchantCenterForCustomView', commandOptions => {
458
+ var _context;
459
+ Cypress.log({
460
+ name: 'loginToMerchantCenterForCustomView'
461
+ });
462
+ const projectKey = Cypress.env('PROJECT_KEY');
463
+ loginByOidc(_objectSpread(_objectSpread({}, commandOptions), {}, {
464
+ entryPointUriPath: constants$1.CUSTOM_VIEW_HOST_ENTRY_POINT_URI_PATH,
465
+ initialRoute: _concatInstanceProperty__default["default"](_context = "/".concat(projectKey, "/")).call(_context, constants$1.CUSTOM_VIEW_HOST_ENTRY_POINT_URI_PATH)
466
+ }));
467
+ });
453
468
  Cypress.Commands.add('loginByOidc', commandOptions => {
454
469
  Cypress.log({
455
470
  name: 'loginByOidc'
@@ -474,7 +489,7 @@ Cypress.Commands.add('getIframeBody', {
474
489
  $iframe => {
475
490
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
476
491
  return new Cypress.Promise(resolve => {
477
- var _context;
478
- resolve(_findInstanceProperty__default["default"](_context = $iframe.contents()).call(_context, 'body'));
492
+ var _context2;
493
+ resolve(_findInstanceProperty__default["default"](_context2 = $iframe.contents()).call(_context2, 'body'));
479
494
  });
480
495
  });
@@ -1,6 +1,5 @@
1
1
  'use strict';
2
2
 
3
- var _findInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/find');
4
3
  var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
5
4
  var _Object$getOwnPropertySymbols = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
6
5
  var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
@@ -11,6 +10,8 @@ var _Object$defineProperties = require('@babel/runtime-corejs3/core-js-stable/ob
11
10
  var _Object$defineProperty = require('@babel/runtime-corejs3/core-js-stable/object/define-property');
12
11
  var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
13
12
  var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
13
+ var _findInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/find');
14
+ var constants$1 = require('@commercetools-frontend/constants');
14
15
  var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/stringify');
15
16
  var _URL = require('@babel/runtime-corejs3/core-js-stable/url');
16
17
  var semver = require('semver');
@@ -22,7 +23,6 @@ var _reduceRightInstanceProperty = require('@babel/runtime-corejs3/core-js-stabl
22
23
 
23
24
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
24
25
 
25
- var _findInstanceProperty__default = /*#__PURE__*/_interopDefault(_findInstanceProperty);
26
26
  var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
27
27
  var _Object$getOwnPropertySymbols__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertySymbols);
28
28
  var _filterInstanceProperty__default = /*#__PURE__*/_interopDefault(_filterInstanceProperty);
@@ -32,13 +32,14 @@ var _Object$getOwnPropertyDescriptors__default = /*#__PURE__*/_interopDefault(_O
32
32
  var _Object$defineProperties__default = /*#__PURE__*/_interopDefault(_Object$defineProperties);
33
33
  var _Object$defineProperty__default = /*#__PURE__*/_interopDefault(_Object$defineProperty);
34
34
  var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
35
+ var _findInstanceProperty__default = /*#__PURE__*/_interopDefault(_findInstanceProperty);
35
36
  var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
36
37
  var _URL__default = /*#__PURE__*/_interopDefault(_URL);
37
38
  var semver__default = /*#__PURE__*/_interopDefault(semver);
38
39
  var _reduceRightInstanceProperty__default = /*#__PURE__*/_interopDefault(_reduceRightInstanceProperty);
39
40
 
40
- function ownKeys(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; }
41
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context5, _context6; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context5 = ownKeys(Object(t), !0)).call(_context5, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context6 = ownKeys(Object(t))).call(_context6, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
41
+ 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; }
42
+ function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var _context5, _context6; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context5 = ownKeys$1(Object(t), !0)).call(_context5, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context6 = ownKeys$1(Object(t))).call(_context6, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
42
43
 
43
44
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
44
45
 
@@ -161,7 +162,7 @@ function loginByOidc(commandOptions) {
161
162
  const requestOptions = {
162
163
  method: 'POST',
163
164
  url: "".concat(appConfig.mcApiUrl, "/tokens"),
164
- body: _objectSpread(_objectSpread({}, userCredentials), {}, {
165
+ body: _objectSpread$1(_objectSpread$1({}, userCredentials), {}, {
165
166
  client_id: applicationId,
166
167
  response_type: constants.OIDC_RESPONSE_TYPES.ID_TOKEN,
167
168
  scope: sessionScope,
@@ -436,6 +437,9 @@ subject) {
436
437
  return subject;
437
438
  }
438
439
 
440
+ function ownKeys(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; }
441
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
442
+
439
443
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
440
444
 
441
445
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -450,6 +454,17 @@ Cypress.Commands.add('loginToMerchantCenter', commandOptions => {
450
454
  loginByForm(commandOptions);
451
455
  }
452
456
  });
457
+ Cypress.Commands.add('loginToMerchantCenterForCustomView', commandOptions => {
458
+ var _context;
459
+ Cypress.log({
460
+ name: 'loginToMerchantCenterForCustomView'
461
+ });
462
+ const projectKey = Cypress.env('PROJECT_KEY');
463
+ loginByOidc(_objectSpread(_objectSpread({}, commandOptions), {}, {
464
+ entryPointUriPath: constants$1.CUSTOM_VIEW_HOST_ENTRY_POINT_URI_PATH,
465
+ initialRoute: _concatInstanceProperty__default["default"](_context = "/".concat(projectKey, "/")).call(_context, constants$1.CUSTOM_VIEW_HOST_ENTRY_POINT_URI_PATH)
466
+ }));
467
+ });
453
468
  Cypress.Commands.add('loginByOidc', commandOptions => {
454
469
  Cypress.log({
455
470
  name: 'loginByOidc'
@@ -474,7 +489,7 @@ Cypress.Commands.add('getIframeBody', {
474
489
  $iframe => {
475
490
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
476
491
  return new Cypress.Promise(resolve => {
477
- var _context;
478
- resolve(_findInstanceProperty__default["default"](_context = $iframe.contents()).call(_context, 'body'));
492
+ var _context2;
493
+ resolve(_findInstanceProperty__default["default"](_context2 = $iframe.contents()).call(_context2, 'body'));
479
494
  });
480
495
  });
@@ -1,4 +1,3 @@
1
- import _findInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/find';
2
1
  import _Object$keys from '@babel/runtime-corejs3/core-js-stable/object/keys';
3
2
  import _Object$getOwnPropertySymbols from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols';
4
3
  import _filterInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/filter';
@@ -9,6 +8,8 @@ import _Object$defineProperties from '@babel/runtime-corejs3/core-js-stable/obje
9
8
  import _Object$defineProperty from '@babel/runtime-corejs3/core-js-stable/object/define-property';
10
9
  import _defineProperty from '@babel/runtime-corejs3/helpers/esm/defineProperty';
11
10
  import _concatInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/concat';
11
+ import _findInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/find';
12
+ import { CUSTOM_VIEW_HOST_ENTRY_POINT_URI_PATH } from '@commercetools-frontend/constants';
12
13
  import _JSON$stringify from '@babel/runtime-corejs3/core-js-stable/json/stringify';
13
14
  import _URL from '@babel/runtime-corejs3/core-js-stable/url';
14
15
  import semver from 'semver';
@@ -18,8 +19,8 @@ import { O as OIDC_RESPONSE_TYPES, S as STORAGE_KEYS } from '../../dist/constant
18
19
  import _slicedToArray from '@babel/runtime-corejs3/helpers/esm/slicedToArray';
19
20
  import _reduceRightInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/reduce-right';
20
21
 
21
- function ownKeys(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; }
22
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context5, _context6; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context5 = ownKeys(Object(t), !0)).call(_context5, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context6 = ownKeys(Object(t))).call(_context6, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
22
+ 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; }
23
+ function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var _context5, _context6; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context5 = ownKeys$1(Object(t), !0)).call(_context5, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context6 = ownKeys$1(Object(t))).call(_context6, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
23
24
 
24
25
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
25
26
 
@@ -142,7 +143,7 @@ function loginByOidc(commandOptions) {
142
143
  const requestOptions = {
143
144
  method: 'POST',
144
145
  url: "".concat(appConfig.mcApiUrl, "/tokens"),
145
- body: _objectSpread(_objectSpread({}, userCredentials), {}, {
146
+ body: _objectSpread$1(_objectSpread$1({}, userCredentials), {}, {
146
147
  client_id: applicationId,
147
148
  response_type: OIDC_RESPONSE_TYPES.ID_TOKEN,
148
149
  scope: sessionScope,
@@ -417,6 +418,9 @@ subject) {
417
418
  return subject;
418
419
  }
419
420
 
421
+ function ownKeys(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; }
422
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context3 = ownKeys(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context4 = ownKeys(Object(t))).call(_context4, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
423
+
420
424
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
421
425
 
422
426
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -431,6 +435,17 @@ Cypress.Commands.add('loginToMerchantCenter', commandOptions => {
431
435
  loginByForm(commandOptions);
432
436
  }
433
437
  });
438
+ Cypress.Commands.add('loginToMerchantCenterForCustomView', commandOptions => {
439
+ var _context;
440
+ Cypress.log({
441
+ name: 'loginToMerchantCenterForCustomView'
442
+ });
443
+ const projectKey = Cypress.env('PROJECT_KEY');
444
+ loginByOidc(_objectSpread(_objectSpread({}, commandOptions), {}, {
445
+ entryPointUriPath: CUSTOM_VIEW_HOST_ENTRY_POINT_URI_PATH,
446
+ initialRoute: _concatInstanceProperty(_context = "/".concat(projectKey, "/")).call(_context, CUSTOM_VIEW_HOST_ENTRY_POINT_URI_PATH)
447
+ }));
448
+ });
434
449
  Cypress.Commands.add('loginByOidc', commandOptions => {
435
450
  Cypress.log({
436
451
  name: 'loginByOidc'
@@ -455,7 +470,7 @@ Cypress.Commands.add('getIframeBody', {
455
470
  $iframe => {
456
471
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
457
472
  return new Cypress.Promise(resolve => {
458
- var _context;
459
- resolve(_findInstanceProperty(_context = $iframe.contents()).call(_context, 'body'));
473
+ var _context2;
474
+ resolve(_findInstanceProperty(_context2 = $iframe.contents()).call(_context2, 'body'));
460
475
  });
461
476
  });
@@ -12,6 +12,20 @@ declare namespace Cypress {
12
12
  // https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-9.html#import-types
13
13
  options?: import('./dist/commercetools-frontend-cypress-add-commands.cjs').CommandLoginOptions
14
14
  ): Chainable<Subject>;
15
+ /**
16
+ * Log into the Custom View.
17
+ * Custom Views are assumed to be tested on localhost and `loginByOidc` mechanism is used
18
+ *
19
+ * @example
20
+ * cy.loginToMerchantCenterForCustomView()
21
+ */
22
+ loginToMerchantCenterForCustomView(
23
+ // https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-9.html#import-types
24
+ options?: Omit<
25
+ import('./dist/commercetools-frontend-cypress-add-commands.cjs').CommandLoginOptions,
26
+ 'entryPointUriPath' | 'initialRoute'
27
+ >
28
+ ): Chainable<Subject>;
15
29
  /**
16
30
  * Log into the Custom Application using the OIDC workflow.
17
31
  * The command only works for testing an application running on localhost.
@@ -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.14.3";
8
+ var version = "22.15.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.14.3";
8
+ var version = "22.15.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.14.3";
4
+ var version = "22.15.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.14.3",
3
+ "version": "22.15.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,8 +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.14.3",
45
- "@commercetools-frontend/application-shell": "22.14.3",
44
+ "@commercetools-frontend/application-config": "22.15.0",
45
+ "@commercetools-frontend/application-shell": "22.15.0",
46
+ "@commercetools-frontend/constants": "22.15.0",
46
47
  "@manypkg/get-packages": "1.1.3",
47
48
  "@types/semver": "^7.5.1",
48
49
  "semver": "7.5.2",