TagSpaces is an offline, open source, document manager with tagging support
e2e fix
Stanimird0476b5af69d
diff --git a/tests/e2e/general.helpers.js b/tests/e2e/general.helpers.jsindex e32c7934d..9cb340d82 100644--- a/tests/e2e/general.helpers.js+++ b/tests/e2e/general.helpers.js@@ -142,6 +142,10 @@ export async function typeInputValue(inputSelector, value, delay = 0) {await global.client.type(inputSelector, value, {delay,});+ if (global.isWin) {+ // todo on windows not always wait for typing value+ await global.client.waitForTimeout(1000);+ }return oldValue;}diff --git a/tests/e2e/key-bindings.pw.e2e.js b/tests/e2e/key-bindings.pw.e2e.jsindex 0e70c0f95..184d34728 100644--- a/tests/e2e/key-bindings.pw.e2e.js+++ b/tests/e2e/key-bindings.pw.e2e.js@@ -1,7 +1,6 @@/** Copyright (c) 2016-present - TagSpaces GmbH. All rights reserved.*/-import { extractFileNameWithoutExt } from '@tagspaces/tagspaces-common/paths';import { test, expect } from './fixtures';import { defaultLocationName } from './location.helpers';import {@@ -9,7 +8,7 @@ import {expectElementExist,getGridFileSelector,selectorFile,- setInputKeys,+ setInputValue,} from './general.helpers';import { startTestingApp, stopApp, testDataRefresh } from './hook';import { clearDataStorage, closeWelcomePlaywright } from './welcome.helpers';@@ -70,23 +69,20 @@ test.describe('TST13 - Settings Key Bindings [electron]', () => {});test('TST1312 - Test rename file [electron]', async () => {- const newTitle = 'renamed';+ const newTitle = 'renamed.pdf';await clickOn(getGridFileSelector(testFileName));await global.client.keyboard.press('F2');- //await setInputValue('[data-tid=renameEntryDialogInput] input', newTitle);- const oldName = await setInputKeys('renameEntryDialogInput', newTitle);+ const inputSelector = '[data-tid=renameEntryDialogInput] input';+ const oldName = await global.client.inputValue(inputSelector);+ await setInputValue(inputSelector, newTitle);await clickOn('[data-tid=confirmRenameEntry]');//await expectElementExist('[data-tid=detailsTabTID]', true);- await expectElementExist(- getGridFileSelector(newTitle + '.pdf'),- true,- 5000,- );+ await expectElementExist(getGridFileSelector(newTitle), true, 5000);//rename back- const name = extractFileNameWithoutExt(oldName, '/');- await clickOn(getGridFileSelector(newTitle + '.pdf'));+ //const name = extractFileNameWithoutExt(oldName, '/');+ await clickOn(getGridFileSelector(newTitle));await global.client.keyboard.press('F2');- await setInputKeys('renameEntryDialogInput', name);+ await setInputValue(inputSelector, oldName);await clickOn('[data-tid=confirmRenameEntry]');await expectElementExist(getGridFileSelector(oldName), true, 5000);});