fix(e2e): change the value of adminSchemaUid
This commit is contained in:
parent
1cbdfa4f60
commit
1eee7f5f4e
@ -435,18 +435,10 @@ const createPage = async (options?: CreatePageOptions) => {
|
|||||||
};
|
};
|
||||||
const state = await api.storageState();
|
const state = await api.storageState();
|
||||||
const headers = getHeaders(state);
|
const headers = getHeaders(state);
|
||||||
|
|
||||||
const systemSettings = await api.get(`/api/systemSettings:get/1`, {
|
|
||||||
headers,
|
|
||||||
});
|
|
||||||
|
|
||||||
const pageUid = uid();
|
const pageUid = uid();
|
||||||
const gridName = uid();
|
const gridName = uid();
|
||||||
|
|
||||||
if (systemSettings.ok()) {
|
const result = await api.post(`/api/uiSchemas:insertAdjacent/nocobase-admin-menu?position=beforeEnd`, {
|
||||||
const { data } = await systemSettings.json();
|
|
||||||
|
|
||||||
const result = await api.post(`/api/uiSchemas:insertAdjacent/${data.options.adminSchemaUid}?position=beforeEnd`, {
|
|
||||||
headers,
|
headers,
|
||||||
data: {
|
data: {
|
||||||
schema: {
|
schema: {
|
||||||
@ -492,9 +484,6 @@ const createPage = async (options?: CreatePageOptions) => {
|
|||||||
if (!result.ok()) {
|
if (!result.ok()) {
|
||||||
throw new Error(await result.text());
|
throw new Error(await result.text());
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
throw new Error('systemSettings is not ok');
|
|
||||||
}
|
|
||||||
|
|
||||||
return pageUid;
|
return pageUid;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user