@nocobase/test 0.15.0-alpha.2 → 0.15.0-alpha.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.
@@ -39,6 +39,8 @@ var import_shared = require("@formily/shared");
39
39
  var import_test = require("@playwright/test");
40
40
  var import_lodash = __toESM(require("lodash"));
41
41
  __reExport(e2eUtils_exports, require("@playwright/test"), module.exports);
42
+ const PORT = process.env.APP_PORT || 2e4;
43
+ const APP_BASE_URL = process.env.APP_BASE_URL || `http://localhost:${PORT}`;
42
44
  const _NocoPage = class _NocoPage {
43
45
  constructor(page, options) {
44
46
  this.page = page;
@@ -119,7 +121,7 @@ const test = Object.assign(_test, {
119
121
  });
120
122
  const getStorageItem = /* @__PURE__ */ __name((key, storageState) => {
121
123
  var _a, _b;
122
- return (_b = (_a = storageState.origins.find((item) => item.origin === process.env.APP_BASE_URL)) == null ? void 0 : _a.localStorage.find((item) => item.name === key)) == null ? void 0 : _b.value;
124
+ return (_b = (_a = storageState.origins.find((item) => item.origin === APP_BASE_URL)) == null ? void 0 : _a.localStorage.find((item) => item.name === key)) == null ? void 0 : _b.value;
123
125
  }, "getStorageItem");
124
126
  const updateUidOfPageSchema = /* @__PURE__ */ __name((uiSchema) => {
125
127
  if (!uiSchema) {
@@ -309,8 +311,8 @@ function getHeaders(storageState) {
309
311
  const headers = {};
310
312
  const token = getStorageItem("NOCOBASE_TOKEN", storageState);
311
313
  const auth = getStorageItem("NOCOBASE_AUTH", storageState);
312
- const subAppName = (_a = new URL(process.env.APP_BASE_URL).pathname.match(/^\/apps\/([^/]*)\/*/)) == null ? void 0 : _a[1];
313
- const hostName = new URL(process.env.APP_BASE_URL).host;
314
+ const subAppName = (_a = new URL(APP_BASE_URL).pathname.match(/^\/apps\/([^/]*)\/*/)) == null ? void 0 : _a[1];
315
+ const hostName = new URL(APP_BASE_URL).host;
314
316
  const locale = getStorageItem("NOCOBASE_LOCALE", storageState);
315
317
  const timezone = "+08:00";
316
318
  const withAclMeta = "true";
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@nocobase/test",
3
- "version": "0.15.0-alpha.2",
3
+ "version": "0.15.0-alpha.3",
4
4
  "main": "lib/index.js",
5
5
  "types": "./lib/index.d.ts",
6
6
  "license": "Apache-2.0",
7
7
  "dependencies": {
8
- "@nocobase/server": "0.15.0-alpha.2",
8
+ "@nocobase/server": "0.15.0-alpha.3",
9
9
  "@types/supertest": "^2.0.11",
10
10
  "mockjs": "^1.1.0",
11
11
  "mysql2": "^2.3.3",
@@ -15,5 +15,5 @@
15
15
  "supertest": "^6.1.6",
16
16
  "ws": "^8.13.0"
17
17
  },
18
- "gitHead": "2504887cf82935200bf546b28adf2872cab3e452"
18
+ "gitHead": "8f39868bd613a465efb20123094ebbc2390c1eef"
19
19
  }