TagSpaces is an offline, open source, document manager with tagging support
TST0213 Add description to folder
sytolkccb23fd383a4
diff --git a/app/perspectives/grid-perspective/components/CellContent.tsx b/app/perspectives/grid-perspective/components/CellContent.tsxindex 59ce8e9b4..7402df17e 100644--- a/app/perspectives/grid-perspective/components/CellContent.tsx+++ b/app/perspectives/grid-perspective/components/CellContent.tsx@@ -179,6 +179,7 @@ function CellContent(props: Props) {function renderGridCell() {return (<div+ data-tid={'fsEntryName_' + dataTidFormat(fSystemEntry.name)}style={{background: fileSystemEntryBgColor,borderRadius: 5@@ -226,10 +227,7 @@ function CellContent(props: Props) {{description && (<Tooltip title={i18n.t('core:entryDescription')}><Typography- data-tid={- 'gridCellDescription' +- description.trim().replaceAll(/\s+/g, '-')- }+ data-tid="gridCellDescription"className={classes.gridCellDescription}variant="caption">@@ -238,11 +236,7 @@ function CellContent(props: Props) {</Tooltip>)}</div>- <Typography- className={classes.gridCellTitle}- data-tid={'fsEntryName_' + dataTidFormat(fSystemEntry.name)}- variant="body1"- >+ <Typography className={classes.gridCellTitle} variant="body1">{entryTitle}</Typography><div className={classes.gridDetails}>diff --git a/playwright.config.common.js b/playwright.config.common.jsindex b9d9b294e..9f0b56ea1 100644--- a/playwright.config.common.js+++ b/playwright.config.common.js@@ -8,12 +8,12 @@ const pwConfig = {testMatch: /.*\.pw\.e2e\.js/,// Set the timeout for each testtimeout: process.env.CI ? 60000 : 300000,- // (3 hours) Maximum time in milliseconds the whole test suite can run. Useful on CI to prevent broken setup from running too long and wasting resources.- globalTimeout: process.env.CI ? 3 * 60 * 60 * 1000 : undefined,+ // (2 hours) Maximum time in milliseconds the whole test suite can run. Useful on CI to prevent broken setup from running too long and wasting resources.+ globalTimeout: process.env.CI ? 2 * 60 * 60 * 1000 : undefined,ignoreSnapshots: !process.env.CI,retries: process.env.CI ? 3 : 0,// The maximum number of test failures for the whole test suite run. After reaching this number, testing will stop and exit with an error- maxFailures: process.env.CI ? 20 : 0,+ maxFailures: 0, // process.env.CI ? 20 : 0,globalSetup: './tests/global-setup.js',globalTeardown: './tests/global-teardown.js',/*use: {diff --git a/tests/e2e/fileopener.pw.e2e.js b/tests/e2e/fileopener.pw.e2e.jsindex b02b49fe0..1ce1441d5 100644--- a/tests/e2e/fileopener.pw.e2e.js+++ b/tests/e2e/fileopener.pw.e2e.js@@ -218,8 +218,9 @@ test.describe('TST08 - File folder properties', () => {*/test('TST3001 - Description for files [web,minio,electron,_pro]', async () => {const desc = 'testDecr';+ const fileSelector = getGridFileSelector('sample.pdf');// open fileProperties- await clickOn(selectorFile);+ await clickOn(fileSelector);await clickOn('[data-tid=fileContainerToggleProperties]');await global.client.dblclick('[data-tid=descriptionTID]');await clickOn('[data-tid=descriptionTID]');@@ -231,11 +232,10 @@ test.describe('TST08 - File folder properties', () => {await clickOn('[data-tid=editDescriptionTID]');await expectElementExist(- '[data-tid=gridCellDescription' +- desc.trim().replaceAll(/\s+/g, '-') +- ']',+ '[data-tid=gridCellDescription]',true,- 10000+ 10000,+ fileSelector);});diff --git a/tests/e2e/folderprops.pw.e2e.js b/tests/e2e/folderprops.pw.e2e.jsindex 3ef938dff..c622c28ea 100644--- a/tests/e2e/folderprops.pw.e2e.js+++ b/tests/e2e/folderprops.pw.e2e.js@@ -168,4 +168,23 @@ test.describe('TST02 - Folder properties', () => {const propsTags = await getPropertiesTags();expect(propsTags).toContain(tagName);});++ test('TST0213 - Add description to folder [web,minio,electron,_pro]', async () => {+ const desc = 'test description';++ await global.client.dblclick('[data-tid=descriptionTID]');+ await clickOn('[data-tid=descriptionTID]');+ const editor = await global.client.waitForSelector(+ '[data-tid=descriptionTID] .milkdown'+ );+ await editor.type(desc);++ await clickOn('[data-tid=editDescriptionTID]');+ await expectElementExist(+ '[data-tid=gridCellDescription]',+ true,+ 10000,+ getGridFileSelector('empty_folder')+ );+ });});