Improve local filetree view state and sidebar performance
This commit is contained in:
@@ -174,7 +174,7 @@ async function openPageSettingsDialog(page) {
|
||||
async function waitForOptionsResponse(page, documentId, mutate) {
|
||||
const responsePromise = page.waitForResponse(
|
||||
async (response) => {
|
||||
if (!response.url().includes("/api/documents/options") || response.request().method() !== "POST") {
|
||||
if (!response.url().includes("/api/ui/preferences") || response.request().method() !== "PUT") {
|
||||
return false;
|
||||
}
|
||||
const payload = response.request().postDataJSON();
|
||||
@@ -185,8 +185,8 @@ async function waitForOptionsResponse(page, documentId, mutate) {
|
||||
await mutate();
|
||||
const response = await responsePromise;
|
||||
const payload = await response.json();
|
||||
assert.equal(payload?.meta?.commandName, "page.layout.updateOptions", "页面设置写入必须走 page.layout.updateOptions");
|
||||
assert.equal(payload?.meta?.canonicalCommand, "page.layout.updateOptions", "页面设置 canonical command 必须稳定");
|
||||
assert.equal(payload?.owner, "mnote-web", "页面设置写入必须由 mnote-web 持有");
|
||||
assert(payload?.result?.pageOptions, "页面设置写入必须返回 SQLite 合并后的 pageOptions");
|
||||
return response.status();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user