creevey 0.9.0-beta.14 → 0.9.0-beta.15

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.
@@ -79,10 +79,11 @@ async function _default(config, options, resolveApi) {
79
79
  port: options.port
80
80
  });
81
81
  if (options.saveReport) {
82
- runner.on('stop', async () => {
83
- var _runner5;
84
- await copyStatics(config.reportDir);
85
- await writeFileAsync(_path.default.join(config.reportDir, 'data.js'), reportDataModule((_runner5 = runner) === null || _runner5 === void 0 ? void 0 : _runner5.status.tests));
82
+ runner.on('stop', () => {
83
+ void copyStatics(config.reportDir).then(() => {
84
+ var _runner5;
85
+ return writeFileAsync(_path.default.join(config.reportDir, 'data.js'), reportDataModule((_runner5 = runner) === null || _runner5 === void 0 ? void 0 : _runner5.status.tests));
86
+ });
86
87
  });
87
88
  }
88
89
  if (options.ui) {
@@ -93,7 +93,7 @@ class Pool extends _events.EventEmitter {
93
93
  return this.aliveWorkers.filter(worker => !worker.isRunning);
94
94
  }
95
95
  async forkWorker(retry = 0) {
96
- _cluster.default.setupMaster({
96
+ _cluster.default.setupPrimary({
97
97
  args: ['--browser', this.browser, ...process.argv.slice(2)]
98
98
  });
99
99
  const worker = _cluster.default.fork();
@@ -96,6 +96,7 @@ function server(reportDir, port, ui) {
96
96
  (0, _messages.subscribeOn)('shutdown', () => {
97
97
  server.close();
98
98
  wss.close();
99
+ wss.clients.forEach(ws => ws.close());
99
100
  });
100
101
  void creeveyApi.then(api => {
101
102
  api.subscribe(wss);
@@ -50,6 +50,7 @@ function getSessionData(grid, sessionId = '') {
50
50
  }));
51
51
  }
52
52
  function getAddresses() {
53
+ // TODO Check if docker is used
53
54
  return [DOCKER_INTERNAL].concat(...Object.values((0, _os.networkInterfaces)()).filter(_types.isDefined).map(network => network.filter(info => info.family == 'IPv4').map(info => info.address)));
54
55
  }
55
56
  async function resolveStorybookUrl(storybookUrl, checkUrl) {
@@ -416,7 +417,7 @@ async function getBrowser(config, options) {
416
417
  // TODO Define some capabilities explicitly and define typings
417
418
  const capabilities = new _seleniumWebdriver.Capabilities({
418
419
  ...userCapabilities,
419
- pageLoadStrategy: _capabilities.PageLoadStrategy.NONE
420
+ pageLoadStrategy: _capabilities.PageLoadStrategy.EAGER
420
421
  });
421
422
  (0, _messages.subscribeOn)('shutdown', () => {
422
423
  var _browser;
@@ -83,6 +83,7 @@ export const SideBySideView = withTheme(_ref3 => {
83
83
  useResizeObserver(containerRef, calcScale);
84
84
  useLayoutEffect(calcScale, [calcScale]);
85
85
  useLayoutEffect(() => {
86
+ // TODO Check image height and viewport
86
87
  const diffImage = diffImageRef.current;
87
88
  if (!diffImage || !loaded) return;
88
89
  const ratio = diffImage.naturalWidth / diffImage.naturalHeight;
@@ -29,7 +29,8 @@ const HeaderContainer = styled.div({
29
29
  zIndex: 1
30
30
  });
31
31
  const BodyContainer = styled.div({
32
- flexGrow: 1
32
+ flexGrow: 1,
33
+ minHeight: 0
33
34
  });
34
35
  const FooterContainer = styled.div({
35
36
  position: 'sticky',