TagSpaces is an offline, open source, document manager with tagging support
add TST0419
sytolk5a05f734a928
diff --git a/tests/e2e/general.helpers.js b/tests/e2e/general.helpers.jsindex aeb2335af..c31a06ad5 100644--- a/tests/e2e/general.helpers.js+++ b/tests/e2e/general.helpers.js@@ -793,8 +793,15 @@ export async function setSettings(selector, click = false) {await clickOn('[data-tid=closeSettingsDialog]');}-export async function checkSettings(selector, isChecked = true) {+export async function checkSettings(+ selector,+ isChecked = true,+ isAdvanced = false+) {await clickOn('[data-tid=settings]');+ if (isAdvanced) {+ await clickOn('[data-tid=advancedSettingsDialogTID]');+ }if (isChecked) {await global.client.check(selector + ' input');expect(await global.client.isChecked(selector + ' input')).toBeTruthy();diff --git a/tests/e2e/perspective-grid.pw.e2e.js b/tests/e2e/perspective-grid.pw.e2e.jsindex 70836eb01..f3439d3c1 100644--- a/tests/e2e/perspective-grid.pw.e2e.js+++ b/tests/e2e/perspective-grid.pw.e2e.js@@ -99,7 +99,11 @@ test.describe('TST50 - Perspective Grid', () => {await AddRemoveTagsToSelectedFiles('list', tags);for (let i = 0; i < tags.length; i++) {- await expectElementExist('[data-tid=tagContainer_' + tags[i] + ']', true);+ await expectElementExist(+ '[data-tid=tagContainer_' + tags[i] + ']',+ true,+ 5000+ );// const selectBox = await global.client.$('[data-tid=perspectiveGridFileTable]');/* await expectTagsExistBySelector('[data-entry-id="' + selectedIds[i] + '"]',@@ -116,7 +120,8 @@ test.describe('TST50 - Perspective Grid', () => {for (let i = 0; i < tags.length; i++) {await expectElementExist('[data-tid=tagContainer_' + tags[i] + ']',- false+ false,+ 5000);/*await expectTagsExistBySelector('[data-entry-id="' + selectedIds[i] + '"]',diff --git a/tests/e2e/tag.pw.e2e.js b/tests/e2e/tag.pw.e2e.jsindex 44df323f1..dd4c9ba12 100644--- a/tests/e2e/tag.pw.e2e.js+++ b/tests/e2e/tag.pw.e2e.js@@ -1,14 +1,16 @@/* Copyright (c) 2016-present - TagSpaces UG (Haftungsbeschraenkt). All rights reserved. */import { expect, test } from '@playwright/test';import {+ checkSettings,clickOn,expectElementExist,setInputKeys,setInputValue,takeScreenshot-} from './general.helpers';-import { startTestingApp, stopApp, testDataRefresh } from './hook';+} from "./general.helpers";+import { createFile, startTestingApp, stopApp, testDataRefresh } from "./hook";import { clearDataStorage, closeWelcomePlaywright } from './welcome.helpers';+import { createPwLocation, createPwMinioLocation, defaultLocationName, defaultLocationPath } from "./location.helpers";const testTagName = 'testTag';const newTagName = 'newTagName';@@ -272,4 +274,22 @@ test.describe('TST04 - Testing the tag library:', () => {test.skip('TST0416 - Export tag groups / all / some [manual]', async () => {});test.skip('TST0417 - Collect tags from current location [electron, Pro]', async () => {});++ test('TST0419 - Create location based tag group [electron, _pro]', async () => {+ const tslContent = '{"appName":"TagSpaces","appVersion":"5.3.6","description":"","lastUpdated":"2023-06-08T16:51:23.926Z","tagGroups":[{"uuid":"collected_tag_group_id","title":"Collected Tags","color":"#61DD61","textcolor":"white","children":[{"title":"Stanimir","color":"#61DD61","textcolor":"white","type":"sidecar"}],"created_date":1686119562860,"modified_date":1686243083871,"expanded":true,"locationId":"dc1ffaaeeb5747e39dd171c7e551afd6"}]}';+ await createFile('tsl.json', tslContent,'.ts');+ await checkSettings('[data-tid=saveTagInLocationTID]', true, true);+ await clickOn('[data-tid=locationManager]');+ if (global.isMinio) {+ await createPwMinioLocation('', defaultLocationName, true);+ } else {+ await createPwLocation(defaultLocationPath, defaultLocationName, true);+ }+ await clickOn('[data-tid=location_' + defaultLocationName + ']');+ await clickOn('[data-tid=tagLibrary]');+ await expectElementExist(+ '[data-tid=tagContainer_Stanimir]',+ true+ );+ });});