diff --git a/scripts/playwright/setup/index.ts b/scripts/playwright/setup/index.ts index 3dadf4ad76..18075dfe85 100644 --- a/scripts/playwright/setup/index.ts +++ b/scripts/playwright/setup/index.ts @@ -24,7 +24,14 @@ const setup = async ({page}: {page: Page}): Promise => { await page.addInitScript(async ({token}) => { try { + let initialLocalStorage = {}; + try { + initialLocalStorage = JSON.parse(localStorage.getItem('nocodb-gui-v2') || '{}'); + } catch(e) { + console.error('Failed to parse local storage', e); + } window.localStorage.setItem('nocodb-gui-v2', JSON.stringify({ + ...initialLocalStorage, token: token, })); } catch (e) {