TagSpaces is an offline, open source, document manager with tagging support
add e2e TST0219 TST0220
sytolkb1adf11fe53e
diff --git a/src/renderer/components/EntryProperties.tsx b/src/renderer/components/EntryProperties.tsxindex fb2cfe289..a52571785 100644--- a/src/renderer/components/EntryProperties.tsx+++ b/src/renderer/components/EntryProperties.tsx@@ -965,7 +965,11 @@ function EntryProperties(props: Props) {!openedEntry.editMode &&editName === undefined && (<ProTooltip tooltip={t('changeThumbnail')}>- <Button fullWidth onClick={toggleThumbFilesDialog}>+ <Button+ data-tid="changeThumbnailTID"+ fullWidth+ onClick={toggleThumbFilesDialog}+ >{t('core:change')}</Button>{/* <IconButton@@ -1023,7 +1027,11 @@ function EntryProperties(props: Props) {!openedEntry.editMode &&editName === undefined && (<ProTooltip tooltip={t('changeBackgroundImage')}>- <Button fullWidth onClick={toggleBgndImgDialog}>+ <Button+ data-tid="changeBackgroundImageTID"+ fullWidth+ onClick={toggleBgndImgDialog}+ >{t('core:change')}</Button>{/* <IconButton@@ -1037,8 +1045,8 @@ function EntryProperties(props: Props) {</IconButton> */}</ProTooltip>)}- {/* <ProTooltip tooltip={t('changeBackgroundImage')}> */}<div+ data-tid="propsBgnImageTID"role="button"tabIndex={0}style={{@@ -1059,7 +1067,6 @@ function EntryProperties(props: Props) {}}onClick={toggleBgndImgDialog}/>- {/* </ProTooltip> */}</Stack></InputAdornment>),diff --git a/tests/e2e/folderprops.pw.e2e.js b/tests/e2e/folderprops.pw.e2e.jsindex 2cdc71cdf..70577dba7 100644--- a/tests/e2e/folderprops.pw.e2e.js+++ b/tests/e2e/folderprops.pw.e2e.js@@ -275,4 +275,42 @@ test.describe('TST02 - Folder properties', () => {5000,);});++ test('TST0219 - Set and remove predefined folder thumbnail [web,minio,electron,_pro]', async () => {+ await openContextEntryMenu(+ getGridFileSelector('empty_folder'),+ 'showProperties',+ );+ await clickOn('[data-tid=changeThumbnailTID]');+ await clickOn('ul[data-tid=predefinedThumbnailsTID] > li');+ await clickOn('[data-tid=confirmCustomThumb]');++ const imgElement = await global.client.$(+ '[data-tid=fsEntryName_empty_folder] img',+ );+ const srcValue = await imgElement.getAttribute('src');+ expect(srcValue.indexOf('.ts/tst.jpg')).toBeGreaterThan(-1);+ });++ test('TST0220 - Set and remove predefined folder background [web,minio,electron,_pro]', async () => {+ await openContextEntryMenu(+ getGridFileSelector('empty_folder'),+ 'openDirectory',+ );+ await clickOn('[data-tid=changeBackgroundImageTID]');+ await clickOn('ul[data-tid=predefinedBackgroundsTID] > li');++ await expectElementExist(+ '[data-tid=bgnColorPickerDialogContent] > img',+ true,+ 5000,+ );+ await clickOn('[data-tid=colorPickerConfirm]');+ // todo expects - background link is always the same+ /*const imgElement = await global.client.$(+ '[data-tid=propsBgnImageTID]',+ );+ const styleValue = await imgElement.getAttribute('style');+ expect(styleValue.indexOf('.ts/tsb.jpg')).toBeGreaterThan(-1);*/+ });});