Skip to content

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

e2e fix

sytolk215c5b316ea4
diff --git a/app/components/EntryContainer.tsx b/app/components/EntryContainer.tsx
index fe96ffb35..e15618650 100644
--- a/app/components/EntryContainer.tsx
+++ b/app/components/EntryContainer.tsx
@@ -1229,9 +1229,17 @@ function EntryContainer(props: Props) {
)
: '';
- let fileName: string = openedFile.path
- ? extractFileName(openedFile.path, PlatformIO.getDirSeparator())
- : '';
+ let fileName: string;
+ if (openedFile.path) {
+ if (openedFile.isFile) {
+ fileName = extractFileName(openedFile.path, PlatformIO.getDirSeparator());
+ } else {
+ fileName = extractDirectoryName(
+ openedFile.path,
+ PlatformIO.getDirSeparator()
+ );
+ }
+ }
if (!fileName) {
const currentLocation = props.locations.find(
location => location.uuid === openedFile.locationId
@@ -1256,7 +1264,7 @@ function EntryContainer(props: Props) {
);
const toolbarButtons = () => {
- if (openedFile.path) {
+ if (openedFile.path !== undefined) {
return (
<Box
key="toolbarButtonsID"
diff --git a/app/components/SearchOptionsMenu.ts b/app/components/SearchOptionsMenu.ts
index 528dab6c6..893ef5e03 100644
--- a/app/components/SearchOptionsMenu.ts
+++ b/app/components/SearchOptionsMenu.ts
@@ -1,5 +1,9 @@
import { Pro } from '-/pro';
-import { SearchActions, SearchOptionType, SearchQueryComposition } from "-/components/SearchOptions";
+import {
+ SearchActions,
+ SearchOptionType,
+ SearchQueryComposition
+} from '-/components/SearchOptions';
export function getSearchOptions(): Array<SearchOptionType> {
const options = [];
diff --git a/app/components/dialogs/AboutDialog.tsx b/app/components/dialogs/AboutDialog.tsx
index 042027a2f..939a810db 100644
--- a/app/components/dialogs/AboutDialog.tsx
+++ b/app/components/dialogs/AboutDialog.tsx
@@ -125,7 +125,7 @@ function AboutDialog(props: Props) {
>
<DialogTitle style={{ cursor: 'move' }} id="draggable-dialog-title">
{productName}
- <DialogCloseButton onClose={onClose} />
+ <DialogCloseButton testId="closeAboutDialogTID" onClose={onClose} />
</DialogTitle>
<DialogContent>
<img
diff --git a/app/components/dialogs/AddRemoveTagsDialog.tsx b/app/components/dialogs/AddRemoveTagsDialog.tsx
index 04c24ce5e..3c96bed41 100644
--- a/app/components/dialogs/AddRemoveTagsDialog.tsx
+++ b/app/components/dialogs/AddRemoveTagsDialog.tsx
@@ -123,7 +123,7 @@ function AddRemoveTagsDialog(props: Props) {
>
<DialogTitle style={{ cursor: 'move' }} id="draggable-dialog-title">
{i18n.t('core:tagOperationTitle')}
- <DialogCloseButton onClose={onClose} />
+ <DialogCloseButton testId="closeAddRemoveTagsTID" onClose={onClose} />
</DialogTitle>
<DialogContent
style={{
diff --git a/app/components/dialogs/ColorPickerDialog.tsx b/app/components/dialogs/ColorPickerDialog.tsx
index 9710753ce..b6bc0133f 100644
--- a/app/components/dialogs/ColorPickerDialog.tsx
+++ b/app/components/dialogs/ColorPickerDialog.tsx
@@ -108,7 +108,7 @@ function ColorPickerDialog(props: Props) {
>
<DialogTitle data-tid="colorPickerDialogTitle">
{i18n.t('core:colorPickerDialogTitle')}
- <DialogCloseButton onClose={onClose} />
+ <DialogCloseButton testId="closeColorPickerTID" onClose={onClose} />
</DialogTitle>
<DialogContent
data-tid="colorPickerDialogContent"
diff --git a/app/components/dialogs/ConfirmDialog.tsx b/app/components/dialogs/ConfirmDialog.tsx
index e190487d9..19fe894b7 100644
--- a/app/components/dialogs/ConfirmDialog.tsx
+++ b/app/components/dialogs/ConfirmDialog.tsx
@@ -63,7 +63,7 @@ function ConfirmDialog(props: Props) {
>
<DialogTitle style={{ cursor: 'move' }} id="draggable-dialog-title">
{props.title}
- <DialogCloseButton onClose={onClose} />
+ <DialogCloseButton testId="closeConfirmTID" onClose={onClose} />
</DialogTitle>
<DialogContent>
<DialogContentText
diff --git a/app/components/dialogs/CreateDialog.tsx b/app/components/dialogs/CreateDialog.tsx
index e6a749002..0b3d59666 100644
--- a/app/components/dialogs/CreateDialog.tsx
+++ b/app/components/dialogs/CreateDialog.tsx
@@ -337,7 +337,7 @@ function CreateDialog(props: Props) {
>
<DialogTitle style={{ cursor: 'move' }} id="draggable-dialog-title">
{i18n.t('core:create') + '...'}
- <DialogCloseButton onClose={onClose} />
+ <DialogCloseButton testId="closeCreateDialogTID" onClose={onClose} />
</DialogTitle>
<DialogContent
style={{
diff --git a/app/components/dialogs/CreateDirectoryDialog.tsx b/app/components/dialogs/CreateDirectoryDialog.tsx
index 60b5e5b37..9b65d14fd 100644
--- a/app/components/dialogs/CreateDirectoryDialog.tsx
+++ b/app/components/dialogs/CreateDirectoryDialog.tsx
@@ -125,7 +125,7 @@ function CreateDirectoryDialog(props: Props) {
>
<DialogTitle>
{i18n.t('core:createNewDirectoryTitle')}
- <DialogCloseButton onClose={onClose} />
+ <DialogCloseButton testId="closeCreateDirectoryTID" onClose={onClose} />
</DialogTitle>
<DialogContent>
<FormControl fullWidth={true} error={inputError}>
diff --git a/app/components/dialogs/CreateEditLocationDialog.tsx b/app/components/dialogs/CreateEditLocationDialog.tsx
index 016ecc9e7..b6a283ef0 100644
--- a/app/components/dialogs/CreateEditLocationDialog.tsx
+++ b/app/components/dialogs/CreateEditLocationDialog.tsx
@@ -530,7 +530,10 @@ function CreateEditLocationDialog(props: Props) {
{props.location
? i18n.t('core:editLocationTitle')
: i18n.t('core:createLocationTitle')}
- <DialogCloseButton onClose={onClose} />
+ <DialogCloseButton
+ testId="closeCreateEditLocationTID"
+ onClose={onClose}
+ />
</DialogTitle>
<DialogContent
style={{
diff --git a/app/components/dialogs/CreateTagGroupDialog.tsx b/app/components/dialogs/CreateTagGroupDialog.tsx
index b9b6d7b10..4e7e85adc 100644
--- a/app/components/dialogs/CreateTagGroupDialog.tsx
+++ b/app/components/dialogs/CreateTagGroupDialog.tsx
@@ -188,7 +188,7 @@ function CreateTagGroupDialog(props: Props) {
>
<DialogTitle>
{i18n.t('core:createTagGroupTitle')}
- <DialogCloseButton onClose={onClose} />
+ <DialogCloseButton testId="closeCreateTagGroupTID" onClose={onClose} />
</DialogTitle>
<DialogContent style={{ paddingTop: 10 }}>
<FormControl fullWidth={true} error={inputError}>
diff --git a/app/components/dialogs/CreateTagsDialog.tsx b/app/components/dialogs/CreateTagsDialog.tsx
index 8de281460..efb226d2a 100644
--- a/app/components/dialogs/CreateTagsDialog.tsx
+++ b/app/components/dialogs/CreateTagsDialog.tsx
@@ -102,7 +102,7 @@ function CreateTagsDialog(props: Props) {
>
<DialogTitle>
{i18n.t('core:addTagsToGroupTitle')}
- <DialogCloseButton onClose={onClose} />
+ <DialogCloseButton testId="closeCreateTagTID" onClose={onClose} />
</DialogTitle>
<DialogContent style={{ minWidth: 400, paddingTop: 10 }}>
<FormControl fullWidth={true} error={inputError}>
diff --git a/app/components/dialogs/EditEntryTagDialog.tsx b/app/components/dialogs/EditEntryTagDialog.tsx
index 66f6817cb..2c40cb279 100644
--- a/app/components/dialogs/EditEntryTagDialog.tsx
+++ b/app/components/dialogs/EditEntryTagDialog.tsx
@@ -133,7 +133,8 @@ function EditEntryTagDialog(props: Props) {
function renderTitle() {
return (
<DialogTitle>
- {i18n.t('core:tagProperties')} <DialogCloseButton onClose={onClose} />
+ {i18n.t('core:tagProperties')}{' '}
+ <DialogCloseButton testId="closeEditEntryTagTID" onClose={onClose} />
</DialogTitle>
);
}
diff --git a/app/components/dialogs/EditTagDialog.tsx b/app/components/dialogs/EditTagDialog.tsx
index b4d109e09..9804196f3 100644
--- a/app/components/dialogs/EditTagDialog.tsx
+++ b/app/components/dialogs/EditTagDialog.tsx
@@ -147,7 +147,7 @@ function EditTagDialog(props: Props) {
<DialogTitle style={{ overflow: 'visible' }}>
{i18n.t('core:editTagTitle')}
{` '${title}'`}
- <DialogCloseButton onClose={onClose} />
+ <DialogCloseButton testId="closeEditTagTID" onClose={onClose} />
</DialogTitle>
<DialogContent style={{ overflow: 'visible' }}>
<FormControl
diff --git a/app/components/dialogs/EditTagGroupDialog.tsx b/app/components/dialogs/EditTagGroupDialog.tsx
index c50015e25..b1ed76de6 100644
--- a/app/components/dialogs/EditTagGroupDialog.tsx
+++ b/app/components/dialogs/EditTagGroupDialog.tsx
@@ -129,7 +129,7 @@ function EditTagGroupDialog(props: Props) {
const renderTitle = () => (
<DialogTitle style={{ overflow: 'visible' }}>
{i18n.t('core:editTagGroupTitle')}
- <DialogCloseButton onClose={onClose} />
+ <DialogCloseButton testId="closeEditTagGroupTID" onClose={onClose} />
</DialogTitle>
);
diff --git a/app/components/dialogs/FilePreviewDialog.tsx b/app/components/dialogs/FilePreviewDialog.tsx
index dac0561ab..56da10726 100644
--- a/app/components/dialogs/FilePreviewDialog.tsx
+++ b/app/components/dialogs/FilePreviewDialog.tsx
@@ -194,7 +194,7 @@ function FilePreviewDialog(props: Props) {
id="draggable-dialog-title"
>
{/*{i18n.t('core:importDialogTitle')}*/}
- <DialogCloseButton onClose={onClose} />
+ <DialogCloseButton testId="closeFilePreviewTID" onClose={onClose} />
</DialogTitle>
<DialogContent
style={{
diff --git a/app/components/dialogs/FileUploadDialog.tsx b/app/components/dialogs/FileUploadDialog.tsx
index d35b38fef..829c83bb3 100644
--- a/app/components/dialogs/FileUploadDialog.tsx
+++ b/app/components/dialogs/FileUploadDialog.tsx
@@ -167,7 +167,7 @@ function FileUploadDialog(props: Props) {
? props.title
: 'importDialogTitle')
)}
- <DialogCloseButton onClose={onClose} />
+ <DialogCloseButton testId="closeFileUploadTID" onClose={onClose} />
</DialogTitle>
<DialogContent
style={{
@@ -266,11 +266,7 @@ function FileUploadDialog(props: Props) {
{i18n.t('core:minimize')}
</Button>
{haveProgress && (
- <Button
- data-tid="uploadStopAllTID"
- onClick={stopAll}
- color="primary"
- >
+ <Button data-tid="uploadStopAllTID" onClick={stopAll} color="primary">
{i18n.t('core:stopAll')}
</Button>
)}
diff --git a/app/components/dialogs/ImportExportTagGroupsDialog.tsx b/app/components/dialogs/ImportExportTagGroupsDialog.tsx
index 0bc117109..fac75c900 100644
--- a/app/components/dialogs/ImportExportTagGroupsDialog.tsx
+++ b/app/components/dialogs/ImportExportTagGroupsDialog.tsx
@@ -134,7 +134,7 @@ function ImportExportTagGroupsDialog(props: Props) {
{props.dialogModeImport
? i18n.t('core:importGroupTagsTitle')
: i18n.t('core:exportGroupTagsTitle')}
- <DialogCloseButton onClose={onClose} />
+ <DialogCloseButton testId="closeIETagGroupsTID" onClose={onClose} />
</DialogTitle>
);
diff --git a/app/components/dialogs/KeyboardDialog.tsx b/app/components/dialogs/KeyboardDialog.tsx
index fc2af9469..a46b62342 100644
--- a/app/components/dialogs/KeyboardDialog.tsx
+++ b/app/components/dialogs/KeyboardDialog.tsx
@@ -66,7 +66,7 @@ function KeyboardDialog(props: Props) {
>
<DialogTitle>
{i18n.t('core:shortcutKeys')}
- <DialogCloseButton onClose={onClose} />
+ <DialogCloseButton testId="closeKeyboardTID" onClose={onClose} />
</DialogTitle>
<DialogContent
data-tid="keyboardShortCutsDialog"
diff --git a/app/components/dialogs/LinkGeneratorDialog.tsx b/app/components/dialogs/LinkGeneratorDialog.tsx
index 3532bffd0..09e63bb9f 100644
--- a/app/components/dialogs/LinkGeneratorDialog.tsx
+++ b/app/components/dialogs/LinkGeneratorDialog.tsx
@@ -92,7 +92,7 @@ function LinkGeneratorDialog(props: Props) {
>
<DialogTitle>
{i18n.t('core:generateDownloadLink')}{' '}
- <DialogCloseButton onClose={onClose} />
+ <DialogCloseButton testId="closeLinkGeneratorTID" onClose={onClose} />
</DialogTitle>
<DialogContent
style={{ overflow: AppConfig.isFirefox ? 'auto' : 'overlay' }}
diff --git a/app/components/dialogs/MoveCopyFilesDialog.tsx b/app/components/dialogs/MoveCopyFilesDialog.tsx
index 7e676e04a..db7e1ad01 100644
--- a/app/components/dialogs/MoveCopyFilesDialog.tsx
+++ b/app/components/dialogs/MoveCopyFilesDialog.tsx
@@ -195,7 +195,7 @@ function MoveCopyFilesDialog(props: Props) {
>
<DialogTitle style={{ cursor: 'move' }} id="draggable-dialog-title">
{i18n.t('core:copyMoveEntriesTitle')}
- <DialogCloseButton onClose={onCloseDialog} />
+ <DialogCloseButton testId="closeMCFilesTID" onClose={onCloseDialog} />
</DialogTitle>
<DialogContent style={{ overflow: 'hidden' }}>
<Typography variant="subtitle2">
diff --git a/app/components/dialogs/MoveOrCopyFilesDialog.tsx b/app/components/dialogs/MoveOrCopyFilesDialog.tsx
index 8305f6ed3..3aa6c71e2 100644
--- a/app/components/dialogs/MoveOrCopyFilesDialog.tsx
+++ b/app/components/dialogs/MoveOrCopyFilesDialog.tsx
@@ -66,7 +66,10 @@ function MoveOrCopyFilesDialog(props: Props) {
>
<DialogTitle style={{ cursor: 'move' }} id="draggable-dialog-title">
{i18n.t('core:copyMoveEntriesTitle')}
- <DialogCloseButton onClose={() => onClose()} />
+ <DialogCloseButton
+ testId="closeMoveOrCopyTID"
+ onClose={() => onClose()}
+ />
</DialogTitle>
<DialogContent
style={{
diff --git a/app/components/dialogs/OnboardingDialog.tsx b/app/components/dialogs/OnboardingDialog.tsx
index 4a9d5a1f6..81ad9a46c 100644
--- a/app/components/dialogs/OnboardingDialog.tsx
+++ b/app/components/dialogs/OnboardingDialog.tsx
@@ -96,7 +96,7 @@ function OnboardingDialog(props: Props) {
scroll="paper"
>
<DialogTitle style={{ justifyContent: 'center', textAlign: 'center' }}>
- <DialogCloseButton onClose={onClose} testId="closeOnboardingDialog" />
+ <DialogCloseButton testId="closeOnboardingDialog" onClose={onClose} />
</DialogTitle>
<DialogContent
style={{
diff --git a/app/components/dialogs/OpenLinkDialog.tsx b/app/components/dialogs/OpenLinkDialog.tsx
index e5c4258f9..cbe686fc8 100644
--- a/app/components/dialogs/OpenLinkDialog.tsx
+++ b/app/components/dialogs/OpenLinkDialog.tsx
@@ -101,7 +101,7 @@ function OpenLinkDialog(props: Props) {
>
<DialogTitle>
{i18n.t('core:openLink')}
- <DialogCloseButton onClose={onClose} />
+ <DialogCloseButton testId="closeOpenLinkTID" onClose={onClose} />
</DialogTitle>
<DialogContent>
<FormControl fullWidth={true} error={inputError}>
diff --git a/app/components/dialogs/ProTeaserDialog.tsx b/app/components/dialogs/ProTeaserDialog.tsx
index 4a2cffda1..81b08c4be 100644
--- a/app/components/dialogs/ProTeaserDialog.tsx
+++ b/app/components/dialogs/ProTeaserDialog.tsx
@@ -192,7 +192,7 @@ function ProTeaserDialog(props: Props) {
scroll="paper"
>
<DialogTitle style={{ justifyContent: 'center', textAlign: 'center' }}>
- <DialogCloseButton onClose={onClose} />
+ <DialogCloseButton testId="closeProTeaserTID" onClose={onClose} />
</DialogTitle>
<DialogContent
style={{
diff --git a/app/components/dialogs/ProgressDialog.tsx b/app/components/dialogs/ProgressDialog.tsx
index dc3b932bc..e35caf7b5 100644
--- a/app/components/dialogs/ProgressDialog.tsx
+++ b/app/components/dialogs/ProgressDialog.tsx
@@ -42,7 +42,7 @@ function ProgressDialog(props: Props) {
data-tid="progressDialogTitle"
id="draggable-dialog-title"
>
- <DialogCloseButton onClose={props.onClose} />
+ <DialogCloseButton testId="closeProgressTID" onClose={props.onClose} />
</DialogTitle>
<DialogContent
style={{
diff --git a/app/components/dialogs/RenameEntryDialog.tsx b/app/components/dialogs/RenameEntryDialog.tsx
index 2100d7c09..aef396356 100644
--- a/app/components/dialogs/RenameEntryDialog.tsx
+++ b/app/components/dialogs/RenameEntryDialog.tsx
@@ -169,7 +169,7 @@ function RenameEntryDialog(props: Props) {
>
<DialogTitle style={{ cursor: 'move' }} id="draggable-dialog-title">
{i18n.t('core:' + (isFile ? 'renameFile' : 'renameDirectory'))}
- <DialogCloseButton onClose={onClose} />
+ <DialogCloseButton testId="closeRenameEntryTID" onClose={onClose} />
</DialogTitle>
<DialogContent>
<FormControl fullWidth={true} error={inputError}>
diff --git a/app/components/dialogs/ResolveConflictDialog.tsx b/app/components/dialogs/ResolveConflictDialog.tsx
index 0c93259a4..468469349 100644
--- a/app/components/dialogs/ResolveConflictDialog.tsx
+++ b/app/components/dialogs/ResolveConflictDialog.tsx
@@ -69,7 +69,7 @@ function ResolveConflictDialog(props: Props) {
>
<DialogTitle style={{ cursor: 'move' }} id="draggable-dialog-title">
{i18n.t('core:resolveConflictTitle')}
- <DialogCloseButton onClose={onClose} />
+ <DialogCloseButton testId="closeResolveConflictTID" onClose={onClose} />
</DialogTitle>
<DialogContent
style={{
diff --git a/app/components/dialogs/ThirdPartyLibsDialog.tsx b/app/components/dialogs/ThirdPartyLibsDialog.tsx
index 119814e8f..b7512771b 100644
--- a/app/components/dialogs/ThirdPartyLibsDialog.tsx
+++ b/app/components/dialogs/ThirdPartyLibsDialog.tsx
@@ -46,7 +46,8 @@ function ThirdPartyLibsDialog(props: Props) {
scroll="paper"
>
<DialogTitle>
- {i18n.t('core:thirdPartyLibs')} <DialogCloseButton onClose={onClose} />
+ {i18n.t('core:thirdPartyLibs')}{' '}
+ <DialogCloseButton testId="closeThirdPartyTID" onClose={onClose} />
</DialogTitle>
<DialogContent style={{ overflowX: 'auto' }}>
<pre style={{ whiteSpace: 'pre-wrap', userSelect: 'text' }}>
diff --git a/app/components/dialogs/settings/MapTileServerDialog.tsx b/app/components/dialogs/settings/MapTileServerDialog.tsx
index a54b27922..13291eaa9 100644
--- a/app/components/dialogs/settings/MapTileServerDialog.tsx
+++ b/app/components/dialogs/settings/MapTileServerDialog.tsx
@@ -58,7 +58,7 @@ function MapTileServerDialog(props: Props) {
? 'core:tileServerDialogEdit'
: 'core:tileServerDialogAdd'
)}
- <DialogCloseButton onClose={onClose} />
+ <DialogCloseButton testId="closeMapTileServerTID" onClose={onClose} />
</DialogTitle>
);
diff --git a/app/components/dialogs/settings/SettingsDialog.tsx b/app/components/dialogs/settings/SettingsDialog.tsx
index a1e2797bf..62d6465cd 100644
--- a/app/components/dialogs/settings/SettingsDialog.tsx
+++ b/app/components/dialogs/settings/SettingsDialog.tsx
@@ -70,7 +70,7 @@ function SettingsDialog(props: Props) {
<>
<DialogTitle>
{i18n.t('core:settings')}
- <DialogCloseButton onClose={onClose} />
+ <DialogCloseButton testId="closeSettingsTID" onClose={onClose} />
</DialogTitle>
<AppBar position="static" color="default">
<Tabs
diff --git a/app/perspectives/common/DirectoryMenuItems.tsx b/app/perspectives/common/DirectoryMenuItems.tsx
index 94fcf7697..7ce4b48ad 100644
--- a/app/perspectives/common/DirectoryMenuItems.tsx
+++ b/app/perspectives/common/DirectoryMenuItems.tsx
@@ -46,7 +46,7 @@ export function getDirectoryMenuItems(
switchPerspective?: (perspectiveId: string) => void,
showProperties?: () => void,
cameraTakePicture?: () => void,
- showAddRemoveTagsDialog?: () => void,
+ showAddRemoveTagsDialog?: () => void
) {
const menuItems = [];
if (selectedEntriesLength < 2) {
diff --git a/app/perspectives/grid-perspective/components/GridSettingsDialog.tsx b/app/perspectives/grid-perspective/components/GridSettingsDialog.tsx
index 8e3df11e0..5ba3f25fc 100644
--- a/app/perspectives/grid-perspective/components/GridSettingsDialog.tsx
+++ b/app/perspectives/grid-perspective/components/GridSettingsDialog.tsx
@@ -147,7 +147,10 @@ function GridSettingsDialog(props: Props) {
<Dialog open={open} onClose={() => onClose()} keepMounted scroll="paper">
<DialogTitle>
{i18n.t('core:perspectiveSettingsTitle')}
- <DialogCloseButton onClose={() => onClose()} />
+ <DialogCloseButton
+ testId="closePerspectiveSettingsTID"
+ onClose={() => onClose()}
+ />
</DialogTitle>
<DialogContent>
{props.isLocal && (
diff --git a/tests/e2e/folder.pw.e2e.js b/tests/e2e/folder.pw.e2e.js
index 2d989bc3d..b769f5909 100644
--- a/tests/e2e/folder.pw.e2e.js
+++ b/tests/e2e/folder.pw.e2e.js
@@ -203,11 +203,12 @@ test.describe('TST01 - Folder management', () => {
'[data-tid=fsEntryName_empty_folder]',
'showProperties'
);
- const divElement = await global.client.$(
+ await expectElementExist('[data-tid=OpenedTIDempty_folder]', true, 5000);
+ /*const divElement = await global.client.$(
'[data-tid=OpenedTIDsupported-filestypes]'
- ); // Replace 'div' with your selector
+ );
const divText = await divElement.innerText();
- expect(divText).toEqual('empty_folder');
+ expect(divText).toEqual('empty_folder');*/
});
test('TST0112 - Delete non empty folder by disabled trashcan [web,minio,electron]', async () => {
@@ -237,6 +238,7 @@ test.describe('TST01 - Folder management', () => {
true,
5000
);
+ await clickOn('[data-tid=closePerspectiveSettingsTID]');
});
test('TST0117 - Switch to List Perspective [web,minio,electron]', async () => {
diff --git a/tests/e2e/general.helpers.js b/tests/e2e/general.helpers.js
index 376317d75..d1e51c182 100644
--- a/tests/e2e/general.helpers.js
+++ b/tests/e2e/general.helpers.js
@@ -385,11 +385,12 @@ export async function createLocation(
}
export async function setGridOptions(
+ perspective = 'list',
showDirectories = true,
entrySize = undefined
) {
// open Option menu
- await clickOn('[data-tid=gridPerspectiveOptionsMenu]');
+ await clickOn('[data-tid=' + perspective + 'PerspectiveOptionsMenu]');
if (showDirectories) {
await global.client.check(
'[data-tid=gridPerspectiveToggleShowDirectories] input'
@@ -449,7 +450,7 @@ export async function selectFilesByID(arrEntryIds = []) {
*/
export async function selectRowFiles(arrIndex = []) {
await clickOn('[data-tid=openListPerspective]');
- await setGridOptions(false, 'gridPerspectiveEntrySizeNormal');
+ await setGridOptions('list', false, 'gridPerspectiveEntrySizeNormal');
// const filesList = await global.client.$('[data-tid=perspectiveGridFileTable]');
const filesList = await global.client.$$('[data-tid=rowCellTID]');
const arrElements = [];
diff --git a/tests/e2e/perspective-grid-right-button.pw.e2e.js b/tests/e2e/perspective-grid-right-button.pw.e2e.js
index 2a2af87ea..f1847a725 100644
--- a/tests/e2e/perspective-grid-right-button.pw.e2e.js
+++ b/tests/e2e/perspective-grid-right-button.pw.e2e.js
@@ -430,7 +430,7 @@ test.describe('TST50** - Right button on a file', () => {
test('TST5037 - Show sub folders [TST5037,web,minio,electron]', async () => {
// click on hide directories
- await setGridOptions(false);
+ await setGridOptions('grid', false);
// file
await expectElementExist(selectorFile, true);
@@ -438,7 +438,7 @@ test.describe('TST50** - Right button on a file', () => {
await expectElementExist(selectorFolder, false);
// show sub folder in the grid perspective
- await setGridOptions(true);
+ await setGridOptions('grid', true);
// file
await expectElementExist(selectorFile, true);
diff --git a/tests/e2e/perspective-grid.helpers.js b/tests/e2e/perspective-grid.helpers.js
index 5e2341703..47986fe21 100644
--- a/tests/e2e/perspective-grid.helpers.js
+++ b/tests/e2e/perspective-grid.helpers.js
@@ -21,7 +21,7 @@ export async function AddRemoveTagsToSelectedFiles(
tagNames = ['test-tag'], // TODO fix camelCase tag name
addTag = true
) {
- await clickOn('[data-tid=gridPerspectiveAddRemoveTags]');
+ await clickOn('[data-tid=listPerspectiveAddRemoveTags]');
for (let i = 0; i < tagNames.length; i++) {
const tagName = tagNames[i];
diff --git a/tests/e2e/perspective-grid.pw.e2e.js b/tests/e2e/perspective-grid.pw.e2e.js
index 324d16fbf..5b6b805b2 100644
--- a/tests/e2e/perspective-grid.pw.e2e.js
+++ b/tests/e2e/perspective-grid.pw.e2e.js
@@ -100,7 +100,7 @@ test.describe('TST50 - Perspective Grid', () => {
});
// This scenario includes "Add tags" && "Remove tags" to be fulfilled
- test('TST5005/TST5006 - Add/Remove tags to the selected files [web,minio,electron]', async () => {
+ test('TST5005 - Add/Remove tags from selected files [web,minio,electron]', async () => {
let selectedIds = await selectRowFiles([0, 1, 2]);
const tags = ['test-tag1', 'test-tag2'];
@@ -149,7 +149,7 @@ test.describe('TST50 - Perspective Grid', () => {
await selectFilesByID(selectedIds);
- await clickOn('[data-tid=gridPerspectiveAddRemoveTags]');
+ await clickOn('[data-tid=listPerspectiveAddRemoveTags]');
await clickOn('[data-tid=cleanTagsMultipleEntries]');
for (let i = 0; i < tags.length; i++) {
diff --git a/tests/e2e/search.helpers.js b/tests/e2e/search.helpers.js
index 3d86b6872..07ff77ca8 100644
--- a/tests/e2e/search.helpers.js
+++ b/tests/e2e/search.helpers.js
@@ -128,7 +128,7 @@ export async function addRemoveTagsInSearchResults(
5000
);
}
- if (await isDisabled('[data-tid=gridPerspectiveAddRemoveTags]')) {
+ if (await isDisabled('[data-tid=listPerspectiveAddRemoveTags]')) {
//select rows to enable button
selectedIds = await selectRowFiles([0]);
}