Skip to content

TagSpaces is an offline, open source, document manager with tagging support

Fix broken test with tag in file.properties.helpers.js (#1783)

Stanimiref97bbd146bf
diff --git a/tests/e2e/file.properties.helpers.js b/tests/e2e/file.properties.helpers.js
index f4a679d64..8cccb94a9 100644
--- a/tests/e2e/file.properties.helpers.js
+++ b/tests/e2e/file.properties.helpers.js
@@ -31,7 +31,7 @@ export async function AddRemovePropertiesTags(
// await clickOn('[data-tid=PropertiesTagsSelectTID]');
await global.client.keyboard.press('Enter');
const tagDisplayed = await isDisplayed(
- '[data-tid=PropertiesTagsSelectTID] button[aria-label=' + tagName + ']',
+ '[data-tid=tagContainer_' + tagName + ']',
true,
2000
);
@@ -47,7 +47,7 @@ export async function AddRemovePropertiesTags(
await removeTagFromTagMenu(tagName);
// await global.client.waitForLoadState('networkidle'); //'networkidle'); //'domcontentloaded'); // load
await isDisplayed(
- '[data-tid=PropertiesTagsSelectTID] button[aria-label=' + tagName + ']',
+ '[data-tid=tagContainer_' + tagName + ']',
false,
2000
);
diff --git a/tests/e2e/general.helpers.js b/tests/e2e/general.helpers.js
index b36304cd9..c6900fc4b 100644
--- a/tests/e2e/general.helpers.js
+++ b/tests/e2e/general.helpers.js
@@ -589,9 +589,10 @@ export async function extractTags(selectorElement) {
const arrTags = [];
const tags = await selectorElement.$('#gridCellTags');
if (tags) {
- const tagsList = await tags.$$('button');
+ const tagsList = await tags.$$('div[role=presentation]');
for (let i = 0; i < tagsList.length; i++) {
- arrTags.push(await tagsList[i].getAttribute('aria-label'));
+ const tid = await tagsList[i].getAttribute('data-tid');
+ arrTags.push(tid.replace(/(^tagContainer_)/i, ""));
}
}
return arrTags;