@telefonica/acceptance-testing 2.23.2 → 3.0.0-beta1

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.
@@ -0,0 +1 @@
1
+ export {};
@@ -380,13 +380,13 @@ var getRootPath = function getRootPath() {
380
380
  }
381
381
  return rootPath;
382
382
  };
383
- /**
384
- * We want to clear coverage files from previous runs, but at this point it is not easy because each
385
- * worker runs a different instance of this script, so we can't just clear the coverage folder at
386
- * the beginning of the test run.
387
- *
388
- * The solution is to remove the coverage folder when the stored ppid (parent process id) is
389
- * different from the current one
383
+ /**
384
+ * We want to clear coverage files from previous runs, but at this point it is not easy because each
385
+ * worker runs a different instance of this script, so we can't just clear the coverage folder at
386
+ * the beginning of the test run.
387
+ *
388
+ * The solution is to remove the coverage folder when the stored ppid (parent process id) is
389
+ * different from the current one
390
390
  */
391
391
  var prepareCoverageReportPath = function prepareCoverageReportPath(_ref) {
392
392
  var coveragePath = _ref.coveragePath;
@@ -406,9 +406,9 @@ var prepareCoverageReportPath = function prepareCoverageReportPath(_ref) {
406
406
  fs.writeFileSync(ppidFile, ppid);
407
407
  }
408
408
  };
409
- /**
410
- * Asumes the code was instrumented with istanbul and the coverage report stored in `window.__coverage__`.
411
- * If not, this function does nothing.
409
+ /**
410
+ * Asumes the code was instrumented with istanbul and the coverage report stored in `window.__coverage__`.
411
+ * If not, this function does nothing.
412
412
  */
413
413
  var collectCoverageIfAvailable = /*#__PURE__*/function () {
414
414
  var _ref3 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref2) {
@@ -453,8 +453,8 @@ var collectCoverageIfAvailable = /*#__PURE__*/function () {
453
453
  };
454
454
  }();
455
455
 
456
- /**
457
- * Returns true if the current path matches the spied path, including parameters
456
+ /**
457
+ * Returns true if the current path matches the spied path, including parameters
458
458
  */
459
459
  var matchPath = function matchPath(spiedPath, currentPath) {
460
460
  var normalizedCurrentPath = path.normalize(currentPath);
@@ -462,8 +462,7 @@ var matchPath = function matchPath(spiedPath, currentPath) {
462
462
  return pattern.test(normalizedCurrentPath);
463
463
  };
464
464
 
465
- var _excluded = ["captureBeyondViewport"],
466
- _excluded2 = ["userAgent", "isDarkMode", "viewport", "cookies"];
465
+ var _excluded = ["userAgent", "isDarkMode", "viewport", "cookies"];
467
466
  var _pkg$acceptanceTests, _ref, _projectConfig$covera;
468
467
  var LINUX_DOCKER_HOST_IP = '172.17.0.1';
469
468
  var getGlobalBrowser = function getGlobalBrowser() {
@@ -634,18 +633,15 @@ var waitForPaintEnd = /*#__PURE__*/function () {
634
633
  return _ref3.apply(this, arguments);
635
634
  };
636
635
  }();
637
- var normalizeSreenshotOptions = function normalizeSreenshotOptions(_temp2) {
638
- var _ref5 = _temp2 === void 0 ? {} : _temp2,
639
- _ref5$captureBeyondVi = _ref5.captureBeyondViewport,
640
- captureBeyondViewport = _ref5$captureBeyondVi === void 0 ? false : _ref5$captureBeyondVi,
641
- options = _objectWithoutPropertiesLoose(_ref5, _excluded);
642
- // Puppeter default for captureBeyondViewport is true, but we think false is a better default.
643
- // When this is true, the fixed elements (like fixed footers) are relative to the original page
644
- // viewport, not to the full page, so those elements look weird in fullPage screenshots.
645
- return _extends({}, options, {
646
- captureBeyondViewport: captureBeyondViewport
647
- });
636
+ var normalizeSreenshotOptions = function normalizeSreenshotOptions(options) {
637
+ return options;
648
638
  };
639
+ // const normalizeSreenshotOptions = ({captureBeyondViewport = false, ...options}: ScreenshotOptions = {}) => {
640
+ // // Puppeter default for captureBeyondViewport is true, but we think false is a better default.
641
+ // // When this is true, the fixed elements (like fixed footers) are relative to the original page
642
+ // // viewport, not to the full page, so those elements look weird in fullPage screenshots.
643
+ // return {...options, captureBeyondViewport};
644
+ // };
649
645
  // Puppeteer already calls scrollIntoViewIfNeeded before clicking an element. But it doesn't work in all situations
650
646
  // For example, when there is a fixed footer in the page and the element to click is under it, the browser won't scroll
651
647
  // because the element is already in the viewport (the ifNeeded part is important here). By forcing the scroll to the
@@ -658,144 +654,238 @@ var scrollIntoView = function scrollIntoView(el) {
658
654
  });
659
655
  };
660
656
  var getPageApi = function getPageApi(page) {
661
- var api = Object.create(page);
662
- api.type = /*#__PURE__*/function () {
663
- var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(elementHandle, text, options) {
664
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
665
- while (1) switch (_context2.prev = _context2.next) {
666
- case 0:
667
- _context2.next = 2;
668
- return scrollIntoView(elementHandle);
669
- case 2:
670
- return _context2.abrupt("return", elementHandle.type(text, options));
671
- case 3:
672
- case "end":
673
- return _context2.stop();
674
- }
675
- }, _callee2);
676
- }));
677
- return function (_x3, _x4, _x5) {
678
- return _ref6.apply(this, arguments);
679
- };
680
- }();
681
- api.click = /*#__PURE__*/function () {
682
- var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(elementHandle, options) {
683
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
684
- while (1) switch (_context3.prev = _context3.next) {
685
- case 0:
686
- _context3.next = 2;
687
- return scrollIntoView(elementHandle);
688
- case 2:
689
- return _context3.abrupt("return", elementHandle.click(options));
690
- case 3:
691
- case "end":
692
- return _context3.stop();
693
- }
694
- }, _callee3);
695
- }));
696
- return function (_x6, _x7) {
697
- return _ref7.apply(this, arguments);
698
- };
699
- }();
700
- api.select = /*#__PURE__*/function () {
701
- var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(elementHandle) {
702
- var _len,
703
- values,
704
- _key,
705
- _args4 = arguments;
706
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
707
- while (1) switch (_context4.prev = _context4.next) {
708
- case 0:
709
- _context4.next = 2;
710
- return scrollIntoView(elementHandle);
711
- case 2:
712
- for (_len = _args4.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
713
- values[_key - 1] = _args4[_key];
714
- }
715
- return _context4.abrupt("return", elementHandle.select.apply(elementHandle, values));
716
- case 4:
717
- case "end":
718
- return _context4.stop();
719
- }
720
- }, _callee4);
721
- }));
722
- return function (_x8) {
723
- return _ref8.apply(this, arguments);
724
- };
725
- }();
726
- api.screenshot = /*#__PURE__*/function () {
727
- var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(options) {
728
- return _regeneratorRuntime().wrap(function _callee5$(_context5) {
729
- while (1) switch (_context5.prev = _context5.next) {
730
- case 0:
731
- if (options != null && options.skipNetworkWait) {
657
+ return {
658
+ type: function () {
659
+ var _type = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(elementHandle, text, options) {
660
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
661
+ while (1) switch (_context2.prev = _context2.next) {
662
+ case 0:
663
+ _context2.next = 2;
664
+ return scrollIntoView(elementHandle);
665
+ case 2:
666
+ return _context2.abrupt("return", elementHandle.type(text, options));
667
+ case 3:
668
+ case "end":
669
+ return _context2.stop();
670
+ }
671
+ }, _callee2);
672
+ }));
673
+ function type(_x3, _x4, _x5) {
674
+ return _type.apply(this, arguments);
675
+ }
676
+ return type;
677
+ }(),
678
+ click: function () {
679
+ var _click = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(elementHandle, options) {
680
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
681
+ while (1) switch (_context3.prev = _context3.next) {
682
+ case 0:
683
+ _context3.next = 2;
684
+ return scrollIntoView(elementHandle);
685
+ case 2:
686
+ return _context3.abrupt("return", elementHandle.click(options));
687
+ case 3:
688
+ case "end":
689
+ return _context3.stop();
690
+ }
691
+ }, _callee3);
692
+ }));
693
+ function click(_x6, _x7) {
694
+ return _click.apply(this, arguments);
695
+ }
696
+ return click;
697
+ }(),
698
+ select: function () {
699
+ var _select = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(elementHandle) {
700
+ var _len,
701
+ values,
702
+ _key,
703
+ _args4 = arguments;
704
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
705
+ while (1) switch (_context4.prev = _context4.next) {
706
+ case 0:
707
+ _context4.next = 2;
708
+ return scrollIntoView(elementHandle);
709
+ case 2:
710
+ for (_len = _args4.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
711
+ values[_key - 1] = _args4[_key];
712
+ }
713
+ return _context4.abrupt("return", elementHandle.select.apply(elementHandle, values));
714
+ case 4:
715
+ case "end":
716
+ return _context4.stop();
717
+ }
718
+ }, _callee4);
719
+ }));
720
+ function select(_x8) {
721
+ return _select.apply(this, arguments);
722
+ }
723
+ return select;
724
+ }(),
725
+ screenshot: function () {
726
+ var _screenshot = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(options) {
727
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
728
+ while (1) switch (_context5.prev = _context5.next) {
729
+ case 0:
730
+ if (options != null && options.skipNetworkWait) {
731
+ _context5.next = 3;
732
+ break;
733
+ }
732
734
  _context5.next = 3;
733
- break;
734
- }
735
- _context5.next = 3;
736
- return page.waitForNetworkIdle();
737
- case 3:
738
- _context5.next = 5;
739
- return waitForPaintEnd(page, options);
740
- case 5:
741
- return _context5.abrupt("return", page.screenshot(normalizeSreenshotOptions(options)));
742
- case 6:
743
- case "end":
744
- return _context5.stop();
745
- }
746
- }, _callee5);
747
- }));
748
- return function (_x9) {
749
- return _ref9.apply(this, arguments);
750
- };
751
- }();
752
- api.clear = /*#__PURE__*/function () {
753
- var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(elementHandle) {
754
- return _regeneratorRuntime().wrap(function _callee6$(_context6) {
755
- while (1) switch (_context6.prev = _context6.next) {
756
- case 0:
757
- _context6.next = 2;
758
- return elementHandle.click({
759
- clickCount: 3
760
- });
761
- case 2:
762
- _context6.next = 4;
763
- return elementHandle.press('Delete');
764
- case 4:
765
- case "end":
766
- return _context6.stop();
767
- }
768
- }, _callee6);
769
- }));
770
- return function (_x10) {
771
- return _ref10.apply(this, arguments);
772
- };
773
- }();
774
- // For some reason, puppeteer browserContext.overridePermissions doesn't work with newer chrome versions.
775
- // This workaround polyfills the browser geolocation api to return the mocked position
776
- api.setGeolocation = function (position) {
777
- return page.evaluate(function (position) {
778
- window.navigator.geolocation.getCurrentPosition = function (callback) {
779
- // @ts-expect-error - puppeteer's setGeoLocation does not expect a timestamp to be passed
780
- callback({
781
- coords: position
782
- });
783
- };
784
- }, position);
735
+ return page.waitForNetworkIdle();
736
+ case 3:
737
+ _context5.next = 5;
738
+ return waitForPaintEnd(page, options);
739
+ case 5:
740
+ return _context5.abrupt("return", page.screenshot(normalizeSreenshotOptions(options)));
741
+ case 6:
742
+ case "end":
743
+ return _context5.stop();
744
+ }
745
+ }, _callee5);
746
+ }));
747
+ function screenshot(_x9) {
748
+ return _screenshot.apply(this, arguments);
749
+ }
750
+ return screenshot;
751
+ }(),
752
+ clear: function () {
753
+ var _clear = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(elementHandle) {
754
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
755
+ while (1) switch (_context6.prev = _context6.next) {
756
+ case 0:
757
+ _context6.next = 2;
758
+ return elementHandle.click({
759
+ clickCount: 3
760
+ });
761
+ case 2:
762
+ _context6.next = 4;
763
+ return elementHandle.press('Delete');
764
+ case 4:
765
+ case "end":
766
+ return _context6.stop();
767
+ }
768
+ }, _callee6);
769
+ }));
770
+ function clear(_x10) {
771
+ return _clear.apply(this, arguments);
772
+ }
773
+ return clear;
774
+ }(),
775
+ // For some reason, puppeteer browserContext.overridePermissions doesn't work with newer chrome versions.
776
+ // This workaround polyfills the browser geolocation api to return the mocked position
777
+ setGeolocation: function setGeolocation(position) {
778
+ return page.evaluate(function (position) {
779
+ window.navigator.geolocation.getCurrentPosition = function (callback) {
780
+ // @ts-expect-error - puppeteer's setGeoLocation does not expect a timestamp to be passed
781
+ callback({
782
+ coords: position
783
+ });
784
+ };
785
+ }, position);
786
+ },
787
+ $: page.$.bind(page),
788
+ $$: page.$$.bind(page),
789
+ $$eval: page.$$eval.bind(page),
790
+ $eval: page.$eval.bind(page),
791
+ accessibility: page.accessibility,
792
+ addScriptTag: page.addScriptTag.bind(page),
793
+ addStyleTag: page.addStyleTag.bind(page),
794
+ authenticate: page.authenticate.bind(page),
795
+ bringToFront: page.bringToFront.bind(page),
796
+ browser: page.browser.bind(page),
797
+ browserContext: page.browserContext.bind(page),
798
+ close: page.close.bind(page),
799
+ content: page.content,
800
+ cookies: page.cookies.bind(page),
801
+ coverage: page.coverage,
802
+ createCDPSession: page.createCDPSession.bind(page),
803
+ createPDFStream: page.createPDFStream.bind(page),
804
+ deleteCookie: page.deleteCookie.bind(page),
805
+ emit: page.emit.bind(page),
806
+ emulate: page.emulate.bind(page),
807
+ emulateCPUThrottling: page.emulateCPUThrottling.bind(page),
808
+ emulateIdleState: page.emulateIdleState.bind(page),
809
+ emulateMediaFeatures: page.emulateMediaFeatures.bind(page),
810
+ emulateMediaType: page.emulateMediaType.bind(page),
811
+ emulateNetworkConditions: page.emulateNetworkConditions.bind(page),
812
+ emulateTimezone: page.emulateTimezone.bind(page),
813
+ emulateVisionDeficiency: page.emulateVisionDeficiency.bind(page),
814
+ evaluate: page.evaluate.bind(page),
815
+ evaluateHandle: page.evaluateHandle.bind(page),
816
+ evaluateOnNewDocument: page.evaluateOnNewDocument.bind(page),
817
+ exposeFunction: page.exposeFunction.bind(page),
818
+ focus: page.focus.bind(page),
819
+ frames: page.frames.bind(page),
820
+ getDefaultTimeout: page.getDefaultTimeout.bind(page),
821
+ goBack: page.goBack.bind(page),
822
+ goForward: page.goForward.bind(page),
823
+ "goto": page["goto"].bind(page),
824
+ hover: page.hover.bind(page),
825
+ isClosed: page.isClosed.bind(page),
826
+ isDragInterceptionEnabled: page.isDragInterceptionEnabled.bind(page),
827
+ isJavaScriptEnabled: page.isJavaScriptEnabled.bind(page),
828
+ isServiceWorkerBypassed: page.isServiceWorkerBypassed.bind(page),
829
+ keyboard: page.keyboard,
830
+ listenerCount: page.listenerCount.bind(page),
831
+ locator: page.locator.bind(page),
832
+ mainFrame: page.mainFrame.bind(page),
833
+ metrics: page.metrics.bind(page),
834
+ mouse: page.mouse,
835
+ off: page.off.bind(page),
836
+ on: page.on.bind(page),
837
+ once: page.once.bind(page),
838
+ pdf: page.pdf,
839
+ queryObjects: page.queryObjects.bind(page),
840
+ reload: page.reload.bind(page),
841
+ removeAllListeners: page.removeAllListeners.bind(page),
842
+ removeExposedFunction: page.removeExposedFunction.bind(page),
843
+ removeScriptToEvaluateOnNewDocument: page.removeScriptToEvaluateOnNewDocument.bind(page),
844
+ screencast: page.screencast,
845
+ setBypassCSP: page.setBypassCSP.bind(page),
846
+ setBypassServiceWorker: page.setBypassServiceWorker.bind(page),
847
+ setCacheEnabled: page.setCacheEnabled.bind(page),
848
+ setContent: page.setContent.bind(page),
849
+ setCookie: page.setCookie.bind(page),
850
+ setDefaultNavigationTimeout: page.setDefaultNavigationTimeout.bind(page),
851
+ setDefaultTimeout: page.setDefaultTimeout.bind(page),
852
+ setDragInterception: page.setDragInterception.bind(page),
853
+ setExtraHTTPHeaders: page.setExtraHTTPHeaders.bind(page),
854
+ setJavaScriptEnabled: page.setJavaScriptEnabled.bind(page),
855
+ setOfflineMode: page.setOfflineMode.bind(page),
856
+ setRequestInterception: page.setRequestInterception.bind(page),
857
+ setUserAgent: page.setUserAgent.bind(page),
858
+ setViewport: page.setViewport.bind(page),
859
+ tap: page.tap.bind(page),
860
+ target: page.target.bind(page),
861
+ title: page.title,
862
+ touchscreen: page.touchscreen,
863
+ tracing: page.tracing,
864
+ url: page.url,
865
+ viewport: page.viewport,
866
+ waitForDevicePrompt: page.waitForDevicePrompt.bind(page),
867
+ waitForFileChooser: page.waitForFileChooser.bind(page),
868
+ waitForFrame: page.waitForFrame.bind(page),
869
+ waitForFunction: page.waitForFunction.bind(page),
870
+ waitForNavigation: page.waitForNavigation.bind(page),
871
+ waitForNetworkIdle: page.waitForNetworkIdle.bind(page),
872
+ waitForRequest: page.waitForRequest.bind(page),
873
+ waitForResponse: page.waitForResponse.bind(page),
874
+ waitForSelector: page.waitForSelector.bind(page),
875
+ workers: page.workers
785
876
  };
786
- return api;
787
877
  };
788
878
  var needsRequestInterception = false;
789
879
  var requestHandlers = [];
790
880
  var requestInterceptor = function requestInterceptor(req) {
791
881
  var _requestHandlers$find;
792
- var _ref11 = (_requestHandlers$find = requestHandlers.find(function (_ref12) {
793
- var matcher = _ref12.matcher;
882
+ var _ref5 = (_requestHandlers$find = requestHandlers.find(function (_ref6) {
883
+ var matcher = _ref6.matcher;
794
884
  return matcher(req);
795
885
  })) != null ? _requestHandlers$find : {
796
886
  handler: null
797
887
  },
798
- handler = _ref11.handler;
888
+ handler = _ref5.handler;
799
889
  if (!handler) {
800
890
  req["continue"]();
801
891
  return;
@@ -812,12 +902,12 @@ var interceptRequest = function interceptRequest(matcher) {
812
902
  });
813
903
  return spy;
814
904
  };
815
- var createApiEndpointMock = function createApiEndpointMock(_temp3) {
816
- var _ref14;
817
- var _ref13 = _temp3 === void 0 ? {} : _temp3,
818
- origin = _ref13.origin,
819
- baseUrl = _ref13.baseUrl;
820
- var originRegExp = globToRegExp((_ref14 = origin != null ? origin : baseUrl) != null ? _ref14 : '*');
905
+ var createApiEndpointMock = function createApiEndpointMock(_temp2) {
906
+ var _ref8;
907
+ var _ref7 = _temp2 === void 0 ? {} : _temp2,
908
+ origin = _ref7.origin,
909
+ baseUrl = _ref7.baseUrl;
910
+ var originRegExp = globToRegExp((_ref8 = origin != null ? origin : baseUrl) != null ? _ref8 : '*');
821
911
  interceptRequest(function (req) {
822
912
  var _URL = new URL(req.url()),
823
913
  origin = _URL.origin;
@@ -865,12 +955,12 @@ var createApiEndpointMock = function createApiEndpointMock(_temp3) {
865
955
  };
866
956
  };
867
957
  var openPage = /*#__PURE__*/function () {
868
- var _ref16 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(_ref15) {
958
+ var _ref10 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(_ref9) {
869
959
  var userAgent, isDarkMode, viewport, cookies, urlConfig, url, currentUserAgent, page, connectionError;
870
960
  return _regeneratorRuntime().wrap(function _callee7$(_context7) {
871
961
  while (1) switch (_context7.prev = _context7.next) {
872
962
  case 0:
873
- userAgent = _ref15.userAgent, isDarkMode = _ref15.isDarkMode, viewport = _ref15.viewport, cookies = _ref15.cookies, urlConfig = /*#__PURE__*/_objectWithoutPropertiesLoose(_ref15, _excluded2);
963
+ userAgent = _ref9.userAgent, isDarkMode = _ref9.isDarkMode, viewport = _ref9.viewport, cookies = _ref9.cookies, urlConfig = /*#__PURE__*/_objectWithoutPropertiesLoose(_ref9, _excluded);
874
964
  url = function () {
875
965
  if (urlConfig.url !== undefined) {
876
966
  return urlConfig.url;
@@ -981,13 +1071,13 @@ var openPage = /*#__PURE__*/function () {
981
1071
  }, _callee7, null, [[27, 32]]);
982
1072
  }));
983
1073
  return function openPage(_x11) {
984
- return _ref16.apply(this, arguments);
1074
+ return _ref10.apply(this, arguments);
985
1075
  };
986
1076
  }();
987
- var buildQueryMethods = function buildQueryMethods(_temp4) {
988
- var _ref17 = _temp4 === void 0 ? {} : _temp4,
989
- page = _ref17.page,
990
- element = _ref17.element;
1077
+ var buildQueryMethods = function buildQueryMethods(_temp3) {
1078
+ var _ref11 = _temp3 === void 0 ? {} : _temp3,
1079
+ page = _ref11.page,
1080
+ element = _ref11.element;
991
1081
  var boundQueries = {};
992
1082
  var _loop = function _loop() {
993
1083
  var _Object$entries$_i = _Object$entries[_i],
@@ -1032,7 +1122,7 @@ var buildQueryMethods = function buildQueryMethods(_temp4) {
1032
1122
  elementHandle = _context12.sent;
1033
1123
  newElementHandle = Object.create(elementHandle);
1034
1124
  newElementHandle.screenshot = /*#__PURE__*/function () {
1035
- var _ref19 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(options) {
1125
+ var _ref13 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(options) {
1036
1126
  return _regeneratorRuntime().wrap(function _callee8$(_context8) {
1037
1127
  while (1) switch (_context8.prev = _context8.next) {
1038
1128
  case 0:
@@ -1056,11 +1146,11 @@ var buildQueryMethods = function buildQueryMethods(_temp4) {
1056
1146
  }, _callee8);
1057
1147
  }));
1058
1148
  return function (_x12) {
1059
- return _ref19.apply(this, arguments);
1149
+ return _ref13.apply(this, arguments);
1060
1150
  };
1061
1151
  }();
1062
1152
  newElementHandle.click = /*#__PURE__*/function () {
1063
- var _ref20 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(options) {
1153
+ var _ref14 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(options) {
1064
1154
  return _regeneratorRuntime().wrap(function _callee9$(_context9) {
1065
1155
  while (1) switch (_context9.prev = _context9.next) {
1066
1156
  case 0:
@@ -1075,11 +1165,11 @@ var buildQueryMethods = function buildQueryMethods(_temp4) {
1075
1165
  }, _callee9);
1076
1166
  }));
1077
1167
  return function (_x13) {
1078
- return _ref20.apply(this, arguments);
1168
+ return _ref14.apply(this, arguments);
1079
1169
  };
1080
1170
  }();
1081
1171
  newElementHandle.type = /*#__PURE__*/function () {
1082
- var _ref21 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(text, options) {
1172
+ var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(text, options) {
1083
1173
  return _regeneratorRuntime().wrap(function _callee10$(_context10) {
1084
1174
  while (1) switch (_context10.prev = _context10.next) {
1085
1175
  case 0:
@@ -1094,7 +1184,7 @@ var buildQueryMethods = function buildQueryMethods(_temp4) {
1094
1184
  }, _callee10);
1095
1185
  }));
1096
1186
  return function (_x14, _x15) {
1097
- return _ref21.apply(this, arguments);
1187
+ return _ref15.apply(this, arguments);
1098
1188
  };
1099
1189
  }();
1100
1190
  newElementHandle.select = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
@@ -1181,14 +1271,14 @@ afterEach( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().ma
1181
1271
  }
1182
1272
  }, _callee14, null, [[2, 11]]);
1183
1273
  })));
1184
- /**
1185
- * Returns a new path to the file that can be used by chromium in acceptance tests
1186
- *
1187
- * To be able to use `element.uploadFile()` in a dockerized chromium, the file must exist in the
1188
- * host and the docker, and both sides must use the same path.
1189
- *
1190
- * To workaround this bug or limitation, this function prepares the file by copying it to /tmp in
1191
- * the host and the container.
1274
+ /**
1275
+ * Returns a new path to the file that can be used by chromium in acceptance tests
1276
+ *
1277
+ * To be able to use `element.uploadFile()` in a dockerized chromium, the file must exist in the
1278
+ * host and the docker, and both sides must use the same path.
1279
+ *
1280
+ * To workaround this bug or limitation, this function prepares the file by copying it to /tmp in
1281
+ * the host and the container.
1192
1282
  */
1193
1283
  var prepareFile = function prepareFile(filepath) {
1194
1284
  var isLocal = !isCi;
@@ -1196,7 +1286,7 @@ var prepareFile = function prepareFile(filepath) {
1196
1286
  var usesDocker = isLocal && isHeadless;
1197
1287
  var dockerComposeFile = path.join(__dirname, '..', 'docker-compose.yaml');
1198
1288
  if (usesDocker) {
1199
- var containerId = child_process.execSync("docker-compose -f " + dockerComposeFile + " ps -q").toString().trim();
1289
+ var containerId = child_process.execSync("docker compose -f " + dockerComposeFile + " ps -q").toString().trim();
1200
1290
  if (!containerId) {
1201
1291
  throw Error('acceptance-testing container not found');
1202
1292
  }
@@ -1208,8 +1298,8 @@ var prepareFile = function prepareFile(filepath) {
1208
1298
  return filepath;
1209
1299
  }
1210
1300
  };
1211
- /**
1212
- * A convenience method to defer an expectation
1301
+ /**
1302
+ * A convenience method to defer an expectation
1213
1303
  */
1214
1304
  var wait = function wait(expectation, timeout, interval) {
1215
1305
  if (timeout === void 0) {
@@ -1255,7 +1345,7 @@ var waitForElementToBeRemoved = function waitForElementToBeRemoved(element, time
1255
1345
  }
1256
1346
  var startStack = new Error().stack;
1257
1347
  var wait = /*#__PURE__*/function () {
1258
- var _ref25 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15() {
1348
+ var _ref19 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15() {
1259
1349
  var t0, box;
1260
1350
  return _regeneratorRuntime().wrap(function _callee15$(_context15) {
1261
1351
  while (1) switch (_context15.prev = _context15.next) {
@@ -1292,7 +1382,7 @@ var waitForElementToBeRemoved = function waitForElementToBeRemoved(element, time
1292
1382
  }, _callee15);
1293
1383
  }));
1294
1384
  return function wait() {
1295
- return _ref25.apply(this, arguments);
1385
+ return _ref19.apply(this, arguments);
1296
1386
  };
1297
1387
  }();
1298
1388
  return wait()["catch"](function (error) {