TagSpaces is an offline, open source, document manager with tagging support
fixes and optimise
sytolk8b8d347d4551
diff --git a/tests/e2e/clearstorage.helpers.js b/tests/e2e/clearstorage.helpers.jsindex 41093de04..e78fe7f6b 100644--- a/tests/e2e/clearstorage.helpers.js+++ b/tests/e2e/clearstorage.helpers.js@@ -1,9 +1,17 @@import { clickOn, takeScreenshot } from './general.helpers';export async function clearStorage() {- await takeScreenshot('clearStorage');- await clickOn('[data-tid=settings]', { timeout: 20000 });- await clickOn('[data-tid=advancedSettingsDialogTID]');- await clickOn('[data-tid=resetSettingsTID]');- await clickOn('[data-tid=confirmResetSettingsDialogTID]');+ if (global.session) {+ await global.session.send('Storage.clearDataForOrigin', {+ origin: 'app://',+ storageTypes:+ 'appcache,cookies,filesystem,indexeddb,localstorage,serviceworkers,websql'+ }); //, { origin: 'your-electron-app-url' });+ } else {+ // await takeScreenshot('clearStorage');+ await clickOn('[data-tid=settings]', { timeout: 20000 });+ await clickOn('[data-tid=advancedSettingsDialogTID]');+ await clickOn('[data-tid=resetSettingsTID]');+ await clickOn('[data-tid=confirmResetSettingsDialogTID]');+ }}diff --git a/tests/e2e/hook.js b/tests/e2e/hook.jsindex 8814cb760..93c8ff171 100644--- a/tests/e2e/hook.js+++ b/tests/e2e/hook.js@@ -195,6 +195,8 @@ export async function startTestingApp(extconfig) {// Get the first window that the app opens, wait if necessary.global.client = await global.app.firstWindow();+ global.session = await global.client.context().newCDPSession(global.client);+ await global.client.setViewportSize({ width: 1920, height: 1080 });await global.client.waitForLoadState('load'); //'domcontentloaded'); //'networkidle');// await global.client.bringToFront();diff --git a/tests/setup-after-env.js b/tests/setup-after-env.jsindex 259e980b0..3340fbb6c 100644--- a/tests/setup-after-env.js+++ b/tests/setup-after-env.js@@ -53,17 +53,7 @@ jest.retryTimes(3); //, { logErrorsBeforeRetry: true });beforeEach(async () => {if (global.isPlaywright) {- /*if (global.context) {- if (jasmine.currentTest && jasmine.currentTest.status !== 'disabled') {- // Start tracing before creating / navigating a page.- await global.context.tracing.start({- screenshots: true,- snapshots: true- });- }- }*/-- await closeWelcomePlaywright();+ // await closeWelcomePlaywright();if (global.isWeb) {await global.client.evaluate(() => {