mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 03:12:15 +00:00
fix(editor): Fields reset after closing NDV when side panel NDV is also visible (no-changelog) (#18857)
This commit is contained in:
@@ -10,8 +10,18 @@ export async function setupTestRequirements(
|
||||
context: BrowserContext,
|
||||
requirements: TestRequirements,
|
||||
): Promise<void> {
|
||||
const n8n = new n8nPage(page);
|
||||
// 0. Setup browser storage before creating a new page
|
||||
if (requirements.storage) {
|
||||
await context.addInitScript((storage) => {
|
||||
// Set localStorage items
|
||||
for (const [key, value] of Object.entries(storage)) {
|
||||
window.localStorage.setItem(key, value);
|
||||
}
|
||||
}, requirements.storage);
|
||||
}
|
||||
|
||||
const api = new ApiHelpers(context.request);
|
||||
const n8n = new n8nPage(page, api);
|
||||
|
||||
// 1. Setup frontend settings override
|
||||
if (requirements.config?.settings) {
|
||||
@@ -57,14 +67,4 @@ export async function setupTestRequirements(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 5. Setup browser storage
|
||||
if (requirements.storage) {
|
||||
await context.addInitScript((storage) => {
|
||||
// Set localStorage items
|
||||
for (const [key, value] of Object.entries(storage)) {
|
||||
window.localStorage.setItem(key, value);
|
||||
}
|
||||
}, requirements.storage);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user