sefiutils 1.0.28 → 1.0.29

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.
package/README.md CHANGED
@@ -25,9 +25,28 @@ In your jest.config.js file add the following lines:
25
25
 
26
26
  ```
27
27
  globalSetup: "<rootDir>/node_modules/sefiutils/lib/globalSetup.js",
28
- globalTeardown: "<rootDir>/node_modules/sefiutils/lib/globalTeardown.js"
28
+ globalTeardown: "<rootDir>/node_modules/sefiutils/lib/globalTeardown.js"
29
29
  ```
30
30
 
31
+ <details>
32
+ <summary>Note on docker containers on macos:</summary>
33
+ In a docker container on macos, relative paths may cause problems. E.g.,
34
+
35
+ ```
36
+ globalSetup: "<rootDir>/../node_modules/sefiutils/lib/globalSetup.js",
37
+ globalTeardown: "<rootDir>/../node_modules/sefiutils/lib/globalTeardown.js"
38
+ ```
39
+
40
+ would not work. In this case, create your own global files and reexport the sefituils ones, e.g.
41
+ Create a file 'globalSetup.js' in your project with the following content:
42
+
43
+ ```
44
+ module.exports = require("sefiutils/lib/globalSetup.js");
45
+ ```
46
+
47
+ </details>
48
+
49
+
31
50
  Depending on the environment variable `BROWSER` either a browser is started or a
32
51
  selenium server is started. The following values are supported:
33
52
 
@@ -57,6 +76,7 @@ afterAll(async () => {
57
76
  });
58
77
  ```
59
78
 
79
+
60
80
  ## Utils for accessing information from the DOM via Selenium Webdriver injected JavaScript
61
81
 
62
82
  Most utility functions are provided via module 'seUtils', e.g.
@@ -1 +1 @@
1
- {"version":3,"file":"globalSetup.d.ts","sourceRoot":"","sources":["../src/globalSetup.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,CAAC;IACX,IAAI,MAAM,EAAE,GAAG,CAAC;CAEnB;AACD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAA8B,gBAAgB,kBAY7C"}
1
+ {"version":3,"file":"globalSetup.d.ts","sourceRoot":"","sources":["../src/globalSetup.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,CAAC;IACX,IAAI,MAAM,EAAE,GAAG,CAAC;CAEnB;AACD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAA8B,gBAAgB,kBAc7C"}
@@ -52,11 +52,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
52
52
  function setGlobalObjects() {
53
53
  return __awaiter(this, void 0, void 0, function* () {
54
54
  const browser = process.env.BROWSER || "remote";
55
- // console.log(`Using browser: ${browser}`);
55
+ console.log(`Global Setup: Use browser: ${browser}`);
56
56
  try {
57
57
  if (browser === "remote") {
58
58
  yield setUpSeleniumServer();
59
59
  }
60
+ else {
61
+ throw new Error("At the moment, ony remote mode is supported. Please set BROWSER=remote");
62
+ }
60
63
  }
61
64
  catch (err) {
62
65
  console.error(`Error setting up server: ${err}`);
@@ -1 +1 @@
1
- {"version":3,"file":"globalSetup.js","sourceRoot":"","sources":["../src/globalSetup.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA;;;;;;;;;;;;;;;;GAgBG;AACH,SAA8B,gBAAgB;;QAC1C,MAAM,OAAO,GAAI,OAAO,CAAC,GAAG,CAAC,OAA2C,IAAI,QAAQ,CAAC;QAErF,4CAA4C;QAC5C,IAAI;YACA,IAAI,OAAO,KAAK,QAAQ,EAAE;gBACtB,MAAM,mBAAmB,EAAE,CAAC;aAC/B;SACJ;QAAC,OAAO,GAAG,EAAE;YACV,OAAO,CAAC,KAAK,CAAC,4BAA4B,GAAG,EAAE,CAAC,CAAC;YACjD,MAAM,GAAG,CAAC;SACb;IACL,CAAC;CAAA;AAZD,mCAYC;AAGD,SAAe,mBAAmB;;QAE9B,MAAM,MAAM,GAAG,wDAAa,2BAA2B,GAAC,CAAC;QACzD,YAAY;QACZ,MAAM,GAAG,GAAG,wDAAa,gCAAgC,GAAC,CAAC;QAE3D,IAAI,UAAU,CAAC,MAAM,EAAE;YACnB,MAAM,UAAU,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;YAC/B,OAAO,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AAU,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;YAC/B,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;SACtD;QAED,wDAAwD;QACxD,MAAM,CAAC,GAAG,IAAI,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,EAAE;YAC1C,IAAI,EAAE,IAAI;YACV,GAAG,kCACI,OAAO,CAAC,GAAG,KACd,sBAAsB,EAAE,GAAG,EAC3B,+BAA+B,EAAE,MAAM,GAE1C;SACJ,CAAC,CAAC;QACH,MAAM,OAAO,GAAG,MAAM,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACpC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC;QACtB,oDAAoD;QACpD,iEAAiE;IACrE,CAAC;CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"globalTeardown.d.ts","sourceRoot":"","sources":["../src/globalTeardown.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;GAWG;AACH,wBAA8B,UAAU,kBAOvC"}
1
+ {"version":3,"file":"globalTeardown.d.ts","sourceRoot":"","sources":["../src/globalTeardown.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;GAWG;AACH,wBAA8B,UAAU,kBAQvC"}
@@ -25,7 +25,10 @@ function killServer() {
25
25
  return __awaiter(this, void 0, void 0, function* () {
26
26
  if (globalThis.server) {
27
27
  yield server.kill();
28
- console.log(`Server killed`);
28
+ console.log(`global Teardown: Server killed`);
29
+ }
30
+ else {
31
+ console.log(`global Teardown: No server to kill`);
29
32
  }
30
33
  globalThis.server = undefined;
31
34
  });
@@ -1 +1 @@
1
- {"version":3,"file":"globalTeardown.js","sourceRoot":"","sources":["../src/globalTeardown.ts"],"names":[],"mappings":";;;;;;;;;;;AACA;;;;;;;;;;;GAWG;AACH,SAA8B,UAAU;;QACpC,IAAI,UAAU,CAAC,MAAM,EAAE;YACnB,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;YACpB,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;SAEhC;QACD,UAAU,CAAC,MAAM,GAAG,SAAS,CAAC;IAClC,CAAC;CAAA;AAPD,6BAOC"}
1
+ {"version":3,"file":"globalTeardown.js","sourceRoot":"","sources":["../src/globalTeardown.ts"],"names":[],"mappings":";;;;;;;;;;;AACA;;;;;;;;;;;GAWG;AACH,SAA8B,UAAU;;QACpC,IAAI,UAAU,CAAC,MAAM,EAAE;YACnB,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;YACpB,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;SACjD;aAAM;YACH,OAAO,CAAC,GAAG,CAAC,oCAAoC,CAAC,CAAC;SACrD;QACD,UAAU,CAAC,MAAM,GAAG,SAAS,CAAC;IAClC,CAAC;CAAA;AARD,6BAQC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sefiutils",
3
- "version": "1.0.28",
3
+ "version": "1.0.29",
4
4
  "description": "Utilities (and Jest tests) for Selenium Webdriver Tests and some React tools as well",
5
5
  "author": "Jens von Pilgrim <jens.vonpilgrim@bht-berlin.de>",
6
6
  "license": "EPL-2.0",