ui5-test-runner 6.0.1 → 6.0.3

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.
@@ -83,7 +83,7 @@ export const factory = async (configuration, signal) => {
83
83
  const request = response.request();
84
84
  handleNetworkResponse(pageId, request.url(), request.method(), response.status(), request.headers(), response.headers());
85
85
  });
86
- await page.goto(settings.url);
86
+ await page.goto(settings.url, { waitUntil: 'domcontentloaded' });
87
87
  return {
88
88
  async eval(script) {
89
89
  return await page?.evaluate(script);
@@ -104,7 +104,7 @@ export const factory = async (configuration, signal) => {
104
104
  password: basicAuthentication.password.reveal()
105
105
  });
106
106
  }
107
- await page?.goto(settings.url);
107
+ await page?.goto(settings.url, { waitUntil: 'domcontentloaded' });
108
108
  return {
109
109
  async eval(script) {
110
110
  return await page?.evaluate(script);
@@ -16,6 +16,11 @@ import { start } from '../../start.js';
16
16
  import { end } from '../../end.js';
17
17
  import { sendToParentProcess } from '../../sendToParentProcess.js';
18
18
  import { instrument, generateReport } from './coverage/index.js';
19
+ const markFailed = () => {
20
+ if (Exit.code === 0) {
21
+ Exit.code = -1;
22
+ }
23
+ };
19
24
  export const test = async (configuration) => {
20
25
  await initReportBuilder(configuration);
21
26
  await Folder.create(configuration.reportDir);
@@ -116,6 +121,7 @@ export const test = async (configuration) => {
116
121
  }
117
122
  catch (error) {
118
123
  logger.error({ source: 'job', message: 'an error occurred', error });
124
+ markFailed();
119
125
  }
120
126
  finally {
121
127
  if (isBrowserStarted) {
@@ -65,6 +65,9 @@ const start = () => {
65
65
  }
66
66
  }
67
67
  else if (message.command === 'fatal') {
68
+ if (Exit.code === 0) {
69
+ Exit.code = -1;
70
+ }
68
71
  void Exit.shutdown();
69
72
  }
70
73
  else if (message.command === 'terminate') {
@@ -133,6 +136,9 @@ export const logger = {
133
136
  fatal(attributes) {
134
137
  log(LogLevel.fatal, attributes);
135
138
  if (Thread.isMainThread) {
139
+ if (Exit.code === 0) {
140
+ Exit.code = -1;
141
+ }
136
142
  void Exit.shutdown();
137
143
  }
138
144
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ui5-test-runner",
3
- "version": "6.0.1",
3
+ "version": "6.0.3",
4
4
  "description": "Standalone test runner for UI5",
5
5
  "main": "dist/cli.js",
6
6
  "type": "module",