@nocobase/test 1.5.0-alpha.5 → 1.6.0-alpha.1
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.
|
@@ -42,12 +42,12 @@ __export(renderAppOptions_exports, {
|
|
|
42
42
|
});
|
|
43
43
|
module.exports = __toCommonJS(renderAppOptions_exports);
|
|
44
44
|
var import_react = __toESM(require("react"));
|
|
45
|
-
var
|
|
45
|
+
var import__ = require(".");
|
|
46
46
|
var import_web = require("../web");
|
|
47
47
|
var import_utils = require("./utils");
|
|
48
48
|
const renderAppOptions = /* @__PURE__ */ __name(async (options) => {
|
|
49
49
|
const App = (0, import_web.getAppComponent)(options);
|
|
50
|
-
const res = (0,
|
|
50
|
+
const res = (0, import__.render)(/* @__PURE__ */ import_react.default.createElement(App, null));
|
|
51
51
|
await (0, import_utils.WaitApp)();
|
|
52
52
|
return res;
|
|
53
53
|
}, "renderAppOptions");
|
|
@@ -7,11 +7,9 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
var __create = Object.create;
|
|
11
10
|
var __defProp = Object.defineProperty;
|
|
12
11
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
12
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
15
13
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
14
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
17
15
|
var __export = (target, all) => {
|
|
@@ -26,14 +24,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
26
24
|
}
|
|
27
25
|
return to;
|
|
28
26
|
};
|
|
29
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
30
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
31
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
32
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
33
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
34
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
35
|
-
mod
|
|
36
|
-
));
|
|
37
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
38
28
|
var renderSettings_exports = {};
|
|
39
29
|
__export(renderSettings_exports, {
|
|
@@ -43,16 +33,19 @@ __export(renderSettings_exports, {
|
|
|
43
33
|
});
|
|
44
34
|
module.exports = __toCommonJS(renderSettings_exports);
|
|
45
35
|
var import_react = require("@testing-library/react");
|
|
46
|
-
var import_user_event = __toESM(require("@testing-library/user-event"));
|
|
47
36
|
var import_renderAppOptions = require("./renderAppOptions");
|
|
48
37
|
var import_utils = require("./utils");
|
|
49
38
|
async function showSettingsMenu(container = document) {
|
|
50
39
|
await (0, import_react.waitFor)(() => {
|
|
51
|
-
(0, import_utils.expectNoTsError)(container.querySelector('[aria-label^="designer-schema-settings-"]')).toBeInTheDocument();
|
|
40
|
+
return (0, import_utils.expectNoTsError)(container.querySelector('[aria-label^="designer-schema-settings-"]')).toBeInTheDocument();
|
|
52
41
|
});
|
|
53
|
-
await
|
|
42
|
+
const button = await (0, import_react.waitFor)(() => {
|
|
43
|
+
return container.querySelector('[aria-label^="designer-schema-settings-"]');
|
|
44
|
+
});
|
|
45
|
+
import_react.fireEvent.mouseEnter(button);
|
|
46
|
+
import_react.fireEvent.mouseOver(button);
|
|
54
47
|
await (0, import_react.waitFor)(() => {
|
|
55
|
-
(0, import_utils.expectNoTsError)(import_react.screen.queryByTestId("schema-settings-menu")).toBeInTheDocument();
|
|
48
|
+
return (0, import_utils.expectNoTsError)(import_react.screen.queryByTestId("schema-settings-menu")).toBeInTheDocument();
|
|
56
49
|
});
|
|
57
50
|
}
|
|
58
51
|
__name(showSettingsMenu, "showSettingsMenu");
|
package/lib/e2e/e2eUtils.js
CHANGED
|
@@ -862,6 +862,7 @@ async function expectSettingsMenu({
|
|
|
862
862
|
page,
|
|
863
863
|
unsupportedOptions
|
|
864
864
|
}) {
|
|
865
|
+
await page.waitForTimeout(100);
|
|
865
866
|
await showMenu();
|
|
866
867
|
for (const option of supportedOptions) {
|
|
867
868
|
await (0, import_test.expect)(page.getByRole("menuitem", { name: option })).toBeVisible();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/test",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0-alpha.1",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"module": "./src/index.ts",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@faker-js/faker": "8.1.0",
|
|
54
|
-
"@nocobase/server": "1.
|
|
54
|
+
"@nocobase/server": "1.6.0-alpha.1",
|
|
55
55
|
"@playwright/test": "^1.45.3",
|
|
56
56
|
"@testing-library/jest-dom": "^6.4.2",
|
|
57
57
|
"@testing-library/react": "^14.0.0",
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"vitest-dom": "^0.1.1",
|
|
77
77
|
"ws": "^8.13.0"
|
|
78
78
|
},
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "a4c91015e34ec0c9a427451b5fbdfb5fedc4f3d7"
|
|
80
80
|
}
|