@nocobase/test 1.0.0-alpha.2 → 1.0.0-alpha.4

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.
Files changed (115) hide show
  1. package/es/client/commonSettingsChecker/blockTitle.d.ts +8 -0
  2. package/es/client/commonSettingsChecker/fieldTitle.d.ts +8 -0
  3. package/es/client/commonSettingsChecker/index.d.ts +8 -0
  4. package/es/client/formItemChecker/collectionField.d.ts +8 -0
  5. package/es/client/formItemChecker/common.d.ts +8 -0
  6. package/es/client/formItemChecker/icon.d.ts +8 -0
  7. package/es/client/formItemChecker/index.d.ts +8 -0
  8. package/es/client/formItemChecker/input.d.ts +8 -0
  9. package/es/client/formItemChecker/number.d.ts +8 -0
  10. package/es/client/formItemChecker/radio.d.ts +8 -0
  11. package/es/client/formItemChecker/textarea.d.ts +8 -0
  12. package/es/client/index.d.ts +8 -0
  13. package/es/client/index.mjs +160 -13
  14. package/es/client/renderApp.d.ts +8 -0
  15. package/es/client/renderHookWithApp.d.ts +8 -0
  16. package/es/client/renderSettings.d.ts +8 -0
  17. package/es/client/renderSingleSettings.d.ts +8 -0
  18. package/es/client/settingsChecker/delete.d.ts +8 -0
  19. package/es/client/settingsChecker/index.d.ts +8 -0
  20. package/es/client/settingsChecker/modal.d.ts +8 -0
  21. package/es/client/settingsChecker/select.d.ts +8 -0
  22. package/es/client/settingsChecker/switch.d.ts +8 -0
  23. package/es/client/utils/checkModal.d.ts +8 -0
  24. package/es/client/utils/checkSchema.d.ts +8 -0
  25. package/es/client/utils/index.d.ts +8 -0
  26. package/es/client/utils/utils.d.ts +8 -0
  27. package/es/e2e/defineConfig.d.ts +8 -0
  28. package/es/e2e/e2eUtils.d.ts +8 -0
  29. package/es/e2e/index.d.ts +8 -0
  30. package/es/e2e/templatesOfCollection.d.ts +8 -0
  31. package/es/e2e/templatesOfPage.d.ts +8 -0
  32. package/es/index.d.ts +8 -0
  33. package/es/scripts/test-db-creator.d.ts +8 -0
  34. package/es/scripts/test-db-distributor.d.ts +8 -0
  35. package/es/server/index.d.ts +8 -0
  36. package/es/server/mockServer.d.ts +8 -0
  37. package/es/web/index.d.ts +11 -2
  38. package/es/web/index.mjs +158 -11
  39. package/es/web/utils.d.ts +8 -0
  40. package/lib/client/commonSettingsChecker/blockTitle.d.ts +8 -0
  41. package/lib/client/commonSettingsChecker/blockTitle.js +9 -0
  42. package/lib/client/commonSettingsChecker/fieldTitle.d.ts +8 -0
  43. package/lib/client/commonSettingsChecker/fieldTitle.js +9 -0
  44. package/lib/client/commonSettingsChecker/index.d.ts +8 -0
  45. package/lib/client/commonSettingsChecker/index.js +9 -0
  46. package/lib/client/formItemChecker/collectionField.d.ts +8 -0
  47. package/lib/client/formItemChecker/collectionField.js +9 -0
  48. package/lib/client/formItemChecker/common.d.ts +8 -0
  49. package/lib/client/formItemChecker/common.js +9 -0
  50. package/lib/client/formItemChecker/icon.d.ts +8 -0
  51. package/lib/client/formItemChecker/icon.js +9 -0
  52. package/lib/client/formItemChecker/index.d.ts +8 -0
  53. package/lib/client/formItemChecker/index.js +9 -0
  54. package/lib/client/formItemChecker/input.d.ts +8 -0
  55. package/lib/client/formItemChecker/input.js +9 -0
  56. package/lib/client/formItemChecker/number.d.ts +8 -0
  57. package/lib/client/formItemChecker/number.js +9 -0
  58. package/lib/client/formItemChecker/radio.d.ts +8 -0
  59. package/lib/client/formItemChecker/radio.js +9 -0
  60. package/lib/client/formItemChecker/textarea.d.ts +8 -0
  61. package/lib/client/formItemChecker/textarea.js +9 -0
  62. package/lib/client/index.d.ts +8 -0
  63. package/lib/client/index.js +9 -0
  64. package/lib/client/renderApp.d.ts +8 -0
  65. package/lib/client/renderApp.js +9 -0
  66. package/lib/client/renderHookWithApp.d.ts +8 -0
  67. package/lib/client/renderHookWithApp.js +9 -0
  68. package/lib/client/renderSettings.d.ts +8 -0
  69. package/lib/client/renderSettings.js +9 -0
  70. package/lib/client/renderSingleSettings.d.ts +8 -0
  71. package/lib/client/renderSingleSettings.js +9 -0
  72. package/lib/client/settingsChecker/delete.d.ts +8 -0
  73. package/lib/client/settingsChecker/delete.js +9 -0
  74. package/lib/client/settingsChecker/index.d.ts +8 -0
  75. package/lib/client/settingsChecker/index.js +9 -0
  76. package/lib/client/settingsChecker/modal.d.ts +8 -0
  77. package/lib/client/settingsChecker/modal.js +9 -0
  78. package/lib/client/settingsChecker/select.d.ts +8 -0
  79. package/lib/client/settingsChecker/select.js +9 -0
  80. package/lib/client/settingsChecker/switch.d.ts +8 -0
  81. package/lib/client/settingsChecker/switch.js +9 -0
  82. package/lib/client/utils/checkModal.d.ts +8 -0
  83. package/lib/client/utils/checkModal.js +9 -0
  84. package/lib/client/utils/checkSchema.d.ts +8 -0
  85. package/lib/client/utils/checkSchema.js +9 -0
  86. package/lib/client/utils/index.d.ts +8 -0
  87. package/lib/client/utils/index.js +9 -0
  88. package/lib/client/utils/utils.d.ts +8 -0
  89. package/lib/client/utils/utils.js +11 -2
  90. package/lib/e2e/defineConfig.d.ts +8 -0
  91. package/lib/e2e/defineConfig.js +9 -0
  92. package/lib/e2e/e2eUtils.d.ts +8 -0
  93. package/lib/e2e/e2eUtils.js +9 -0
  94. package/lib/e2e/index.d.ts +8 -0
  95. package/lib/e2e/index.js +9 -0
  96. package/lib/e2e/templatesOfCollection.d.ts +8 -0
  97. package/lib/e2e/templatesOfCollection.js +9 -0
  98. package/lib/e2e/templatesOfPage.d.ts +8 -0
  99. package/lib/e2e/templatesOfPage.js +9 -0
  100. package/lib/index.d.ts +8 -0
  101. package/lib/index.js +9 -0
  102. package/lib/scripts/test-db-creator.d.ts +8 -0
  103. package/lib/scripts/test-db-creator.js +9 -0
  104. package/lib/scripts/test-db-distributor.d.ts +8 -0
  105. package/lib/scripts/test-db-distributor.js +9 -0
  106. package/lib/server/index.d.ts +8 -0
  107. package/lib/server/index.js +9 -0
  108. package/lib/server/mockServer.d.ts +8 -0
  109. package/lib/server/mockServer.js +9 -0
  110. package/lib/web/dataSourceMainData.json +101 -0
  111. package/lib/web/index.d.ts +27 -8
  112. package/lib/web/index.js +39 -10
  113. package/lib/web/utils.d.ts +8 -0
  114. package/lib/web/utils.js +9 -0
  115. package/package.json +6 -6
@@ -1 +1,9 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  export declare function checkBlockTitle(oldValue?: string): Promise<void>;
@@ -1 +1,9 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  export declare function checkFieldTitle(oldValue?: string): Promise<void>;
@@ -1,2 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  export * from './blockTitle';
2
10
  export * from './fieldTitle';
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  import { CommonFormItemCheckerOptions } from './common';
2
10
  export interface CollectionFieldCheckOptions extends CommonFormItemCheckerOptions {
3
11
  field: string;
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  export interface CommonFormItemCheckerOptions {
2
10
  label?: string;
3
11
  container?: HTMLElement;
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  import { CommonFormItemCheckerOptions } from './common';
2
10
  export type IconCheckOptions = CommonFormItemCheckerOptions;
3
11
  export declare function iconChecker(options: IconCheckOptions): Promise<void>;
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  import { IconCheckOptions } from './icon';
2
10
  import { RadioCheckOptions } from './radio';
3
11
  import { InputCheckOptions } from './input';
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  import { CommonFormItemCheckerOptions } from './common';
2
10
  export type InputCheckOptions = CommonFormItemCheckerOptions;
3
11
  export declare function inputChecker(options: InputCheckOptions): Promise<void>;
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  import { CommonFormItemCheckerOptions } from './common';
2
10
  export type NumberCheckOptions = CommonFormItemCheckerOptions;
3
11
  export declare function numberChecker(options: NumberCheckOptions): Promise<void>;
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  import { CommonFormItemCheckerOptions } from './common';
2
10
  export type RadioCheckOptions = CommonFormItemCheckerOptions;
3
11
  export declare function radioChecker(options: CommonFormItemCheckerOptions): Promise<void>;
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  import { CommonFormItemCheckerOptions } from './common';
2
10
  export type TextareaCheckOptions = CommonFormItemCheckerOptions;
3
11
  export declare function textareaChecker(options: TextareaCheckOptions): Promise<void>;
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  import React from 'react';
2
10
  import { sleep } from '../web';
3
11
  export * from './utils';
@@ -3,7 +3,7 @@ export * from "@testing-library/react";
3
3
  import React, { Fragment } from "react";
4
4
  import MockAdapter from "axios-mock-adapter";
5
5
  import _, { pick, get } from "lodash";
6
- import { observer, useFieldSchema } from "@formily/react";
6
+ import { observer, useForm, useFieldSchema } from "@formily/react";
7
7
  import { Application, AntdSchemaComponentPlugin, SchemaSettingsPlugin, CollectionPlugin, LocalDataSource, SchemaSettings, SchemaComponent, DataBlockProvider } from "@nocobase/client";
8
8
  import { expect } from "vitest";
9
9
  import userEvent from "@testing-library/user-event";
@@ -1117,6 +1117,113 @@ const dataSourceMainData = {
1117
1117
  }
1118
1118
  }
1119
1119
  },
1120
+ "users:get": {
1121
+ data: {
1122
+ createdAt: "2024-04-07T06:50:37.797Z",
1123
+ updatedAt: "2024-04-07T06:50:37.797Z",
1124
+ appLang: null,
1125
+ createdById: null,
1126
+ email: "admin@nocobase.com",
1127
+ f_1gx8uyn3wva: 1,
1128
+ id: 1,
1129
+ nickname: "Super Admin",
1130
+ phone: null,
1131
+ systemSettings: {},
1132
+ updatedById: null,
1133
+ username: "nocobase",
1134
+ roles: [
1135
+ {
1136
+ createdAt: "2024-04-07T06:50:37.700Z",
1137
+ updatedAt: "2024-04-07T06:50:37.700Z",
1138
+ allowConfigure: null,
1139
+ allowNewMenu: true,
1140
+ "default": true,
1141
+ description: null,
1142
+ hidden: false,
1143
+ color: "#1677FF",
1144
+ name: "member",
1145
+ snippets: [
1146
+ "!pm",
1147
+ "!pm.*",
1148
+ "!ui.*"
1149
+ ],
1150
+ strategy: {
1151
+ actions: [
1152
+ "view",
1153
+ "update:own",
1154
+ "destroy:own",
1155
+ "create"
1156
+ ]
1157
+ },
1158
+ title: '{{t("Member")}}',
1159
+ rolesUsers: {
1160
+ createdAt: "2024-04-07T06:50:37.854Z",
1161
+ updatedAt: "2024-04-07T06:50:37.854Z",
1162
+ "default": null,
1163
+ roleName: "member",
1164
+ userId: 1
1165
+ }
1166
+ },
1167
+ {
1168
+ createdAt: "2024-04-07T06:50:37.622Z",
1169
+ updatedAt: "2024-04-07T06:50:37.622Z",
1170
+ allowConfigure: null,
1171
+ allowNewMenu: null,
1172
+ "default": false,
1173
+ description: null,
1174
+ hidden: true,
1175
+ color: "#1677FF",
1176
+ name: "root",
1177
+ snippets: [
1178
+ "pm",
1179
+ "pm.*",
1180
+ "ui.*"
1181
+ ],
1182
+ strategy: null,
1183
+ title: '{{t("Root")}}',
1184
+ rolesUsers: {
1185
+ createdAt: "2024-04-07T06:50:38.152Z",
1186
+ updatedAt: "2024-04-07T06:50:38.186Z",
1187
+ "default": true,
1188
+ roleName: "root",
1189
+ userId: 1
1190
+ }
1191
+ },
1192
+ {
1193
+ createdAt: "2024-04-07T06:50:37.657Z",
1194
+ updatedAt: "2024-04-07T06:50:37.657Z",
1195
+ allowConfigure: true,
1196
+ allowNewMenu: true,
1197
+ "default": false,
1198
+ description: null,
1199
+ hidden: false,
1200
+ name: "admin",
1201
+ color: "#1677FF",
1202
+ snippets: [
1203
+ "pm",
1204
+ "pm.*",
1205
+ "ui.*"
1206
+ ],
1207
+ strategy: {
1208
+ actions: [
1209
+ "create",
1210
+ "view",
1211
+ "update",
1212
+ "destroy"
1213
+ ]
1214
+ },
1215
+ title: '{{t("Admin")}}',
1216
+ rolesUsers: {
1217
+ createdAt: "2024-04-07T06:50:38.152Z",
1218
+ updatedAt: "2024-04-07T06:50:38.152Z",
1219
+ "default": null,
1220
+ roleName: "admin",
1221
+ userId: 1
1222
+ }
1223
+ }
1224
+ ]
1225
+ }
1226
+ },
1120
1227
  "roles:list": {
1121
1228
  data: [
1122
1229
  {
@@ -1208,6 +1315,26 @@ const dataSourceMainData = {
1208
1315
  }
1209
1316
  }
1210
1317
  },
1318
+ "roles:get": {
1319
+ data: {
1320
+ createdAt: "2024-04-07T06:50:37.622Z",
1321
+ updatedAt: "2024-04-07T06:50:37.622Z",
1322
+ allowConfigure: null,
1323
+ allowNewMenu: null,
1324
+ "default": false,
1325
+ description: null,
1326
+ hidden: true,
1327
+ name: "root",
1328
+ color: "#1677FF",
1329
+ snippets: [
1330
+ "pm",
1331
+ "pm.*",
1332
+ "ui.*"
1333
+ ],
1334
+ strategy: null,
1335
+ title: '{{t("Root")}}'
1336
+ }
1337
+ },
1211
1338
  "tree:list": {
1212
1339
  data: [
1213
1340
  {
@@ -1250,7 +1377,10 @@ const sleep = async (timeout = 0) => {
1250
1377
  };
1251
1378
  const defaultApis = {
1252
1379
  "uiSchemas:patch": { data: { result: "ok" } },
1380
+ "uiSchemas:batchPatch": { data: { result: "ok" } },
1253
1381
  "uiSchemas:saveAsTemplate": { data: { result: "ok" } },
1382
+ "users:update": { data: { result: "ok" } },
1383
+ "roles:update": { data: { result: "ok" } },
1254
1384
  ...dataSourceMainData
1255
1385
  };
1256
1386
  function getProcessMockData(apis, key2) {
@@ -1260,15 +1390,27 @@ function getProcessMockData(apis, key2) {
1260
1390
  return [404, { data: { message: "mock data not found" } }];
1261
1391
  if (((_a = config == null ? void 0 : config.params) == null ? void 0 : _a.pageSize) || ((_b = config == null ? void 0 : config.params) == null ? void 0 : _b.page)) {
1262
1392
  const { data, meta } = apis[key2];
1263
- const pageSize = config.params.pageSize || (meta == null ? void 0 : meta.pageSize);
1264
- const page = config.params.page || (meta == null ? void 0 : meta.page);
1265
- return [200, { data: data.slice(pageSize * (page - 1), pageSize), meta: { ...meta, page, pageSize } }];
1393
+ const pageSize = config.params.pageSize || (meta == null ? void 0 : meta.pageSize) || 20;
1394
+ const page = config.params.page || (meta == null ? void 0 : meta.page) || 1;
1395
+ return [
1396
+ 200,
1397
+ {
1398
+ data: data.slice(pageSize * (page - 1), pageSize * page),
1399
+ meta: {
1400
+ ...meta,
1401
+ page,
1402
+ pageSize,
1403
+ count: data.length,
1404
+ totalPage: Math.ceil(data.length / pageSize)
1405
+ }
1406
+ }
1407
+ ];
1266
1408
  }
1267
1409
  return [200, apis[key2]];
1268
1410
  };
1269
1411
  }
1270
- const mockApi = (axiosInstance, apis = {}) => {
1271
- const mock = new MockAdapter(axiosInstance);
1412
+ const mockApi = (axiosInstance, apis = {}, delayResponse) => {
1413
+ const mock = new MockAdapter(axiosInstance, { delayResponse });
1272
1414
  Object.keys(apis).forEach((key2) => {
1273
1415
  mock.onAny(key2).reply(getProcessMockData(apis, key2));
1274
1416
  });
@@ -1278,10 +1420,14 @@ const mockApi = (axiosInstance, apis = {}) => {
1278
1420
  });
1279
1421
  };
1280
1422
  };
1281
- const mockAppApi = (app, apis = {}) => {
1282
- const mock = mockApi(app.apiClient.axios, apis);
1423
+ const mockAppApi = (app, apis = {}, delayResponse) => {
1424
+ const mock = mockApi(app.apiClient.axios, apis, delayResponse);
1283
1425
  return mock;
1284
1426
  };
1427
+ const ShowFormData = observer(({ children }) => {
1428
+ const form = useForm();
1429
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("pre", { style: { marginBottom: 20 }, "data-testid": "form-data" }, JSON.stringify(form.values, null, 2)), children);
1430
+ });
1285
1431
  const getApp = (options) => {
1286
1432
  const {
1287
1433
  appOptions = {},
@@ -1290,7 +1436,8 @@ const getApp = (options) => {
1290
1436
  disableAcl = true,
1291
1437
  apis: optionsApis = {},
1292
1438
  enableMultipleDataSource,
1293
- designable
1439
+ designable,
1440
+ delayResponse
1294
1441
  } = options;
1295
1442
  const app = appOptions instanceof Application ? appOptions : new Application({
1296
1443
  ...appOptions,
@@ -1303,7 +1450,7 @@ const getApp = (options) => {
1303
1450
  if (schemaSettings) {
1304
1451
  app.schemaSettingsManager.add(schemaSettings);
1305
1452
  }
1306
- app.addComponents({ CommonSchemaComponent });
1453
+ app.addComponents({ CommonSchemaComponent, ShowFormData });
1307
1454
  app.pluginManager.add(AntdSchemaComponentPlugin);
1308
1455
  app.pluginManager.add(SchemaSettingsPlugin);
1309
1456
  app.pluginManager.add(CollectionPlugin, { config: { enableRemoteDataSource: false } });
@@ -1312,7 +1459,7 @@ const getApp = (options) => {
1312
1459
  if (enableMultipleDataSource) {
1313
1460
  app.dataSourceManager.addDataSource(LocalDataSource, dataSource2);
1314
1461
  }
1315
- mockAppApi(app, apis);
1462
+ mockAppApi(app, apis, delayResponse);
1316
1463
  const App = app.getRootComponent();
1317
1464
  return {
1318
1465
  App,
@@ -1432,9 +1579,9 @@ const WaitApp = async () => {
1432
1579
  await waitFor(() => {
1433
1580
  expectNoTsError(screen.queryByText("Loading...")).not.toBeInTheDocument();
1434
1581
  });
1435
- const loadError = screen.queryByText("Load Plugin Error");
1582
+ const loadError = screen.queryByText("App Error");
1436
1583
  if (loadError) {
1437
- expectNoTsError(screen.queryByText("Load Plugin Error")).not.toBeInTheDocument();
1584
+ expectNoTsError(screen.queryByText("App Error")).not.toBeInTheDocument();
1438
1585
  }
1439
1586
  const renderError = screen.queryByText("Render Failed");
1440
1587
  if (renderError) {
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  import { GetAppComponentOptions } from '../web';
2
10
  export declare const renderApp: (options: GetAppComponentOptions) => Promise<import("@testing-library/react").RenderResult<typeof import("@testing-library/dom/types/queries"), HTMLElement, HTMLElement>>;
3
11
  export declare const renderReadPrettyApp: (options: GetAppComponentOptions) => Promise<import("@testing-library/react").RenderResult<typeof import("@testing-library/dom/types/queries"), HTMLElement, HTMLElement>>;
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  import React, { FC } from 'react';
2
10
  import { GetAppOptions } from '../web';
3
11
  interface RenderHookOptions extends Omit<GetAppOptions, 'value' | 'onChange'> {
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  import { GetAppComponentOptions } from '../web';
2
10
  export declare function showSettingsMenu(container?: HTMLElement | Document): Promise<void>;
3
11
  export interface RenderSettingsOptions extends GetAppComponentOptions {
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  import { RenderSettingsOptions } from './renderSettings';
2
10
  interface RenderSingleSettingsOptions extends Omit<RenderSettingsOptions, 'schemaSettings'> {
3
11
  settingPath?: string;
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  import { CheckModalOptions } from '../utils';
2
10
  export interface CheckDeleteSettingOptions {
3
11
  title: string;
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  import { CheckDeleteSettingOptions } from './delete';
2
10
  import { CheckModalSettingOptions } from './modal';
3
11
  import { CheckSwitchSettingOptions } from './switch';
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  import { CheckModalOptions } from '../utils';
2
10
  export interface CheckModalSettingOptions {
3
11
  title: string;
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  export interface SelectSettingOptions {
2
10
  title: string;
3
11
  beforeSelect?: () => Promise<void> | void;
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  export interface CheckSwitchSettingOptions {
2
10
  title: string;
3
11
  beforeClick?: () => Promise<void> | void;
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  import { FormItemCheckOptions } from '../formItemChecker';
2
10
  export interface CheckModalOptions {
3
11
  triggerText?: string;
@@ -1 +1,9 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  export declare function checkSchema(matchObj?: Record<string, any>, name?: string): Promise<void>;
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  export * from './utils';
2
10
  export * from './checkModal';
3
11
  export * from './checkSchema';
@@ -1,2 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  export declare const expectNoTsError: any;
2
10
  export declare const WaitApp: () => Promise<void>;
@@ -1,2 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  import { type PlaywrightTestConfig } from '@playwright/test';
2
10
  export declare const defineConfig: (config?: PlaywrightTestConfig) => PlaywrightTestConfig<{}, {}>;
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  import { Page } from '@playwright/test';
2
10
  import { defineConfig } from './defineConfig';
3
11
  export * from '@playwright/test';
package/es/e2e/index.d.ts CHANGED
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  export * from './e2eUtils';
2
10
  export * from './templatesOfCollection';
3
11
  export * from './templatesOfPage';
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  import { CollectionSetting } from './e2eUtils';
2
10
  /**
3
11
  * 创建一个名为 general 的 collection,其包含所有类型的字段
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  import { PageConfig } from './e2eUtils';
2
10
  /**
3
11
  * 一个空的 group 页面
package/es/index.d.ts CHANGED
@@ -1 +1,9 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  export * from './server';
@@ -1 +1,9 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  export {};
@@ -1 +1,9 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
1
9
  export {};