TagSpaces is an offline, open source, document manager with tagging support
chore: adjusting e2e tests
Ilian Sapundshiev0d7d72251510
diff --git a/app/components/menus/DirectoryMenu.tsx b/app/components/menus/DirectoryMenu.tsxindex 2deed1d38..eccd41575 100644--- a/app/components/menus/DirectoryMenu.tsx+++ b/app/components/menus/DirectoryMenu.tsx@@ -633,7 +633,6 @@ Do you want to continue?`)key={perspective.key}data-tid={perspective.key}onClick={() => switchPerspective(perspective.id)}- // title={perspective.tooltip}><ListItemIcon>{perspective.icon}</ListItemIcon><ListItemTextdiff --git a/app/package.json b/app/package.jsonindex 0c5573958..887415338 100644--- a/app/package.json+++ b/app/package.json@@ -13,6 +13,8 @@"license": "AGPL-3.0","scripts": {},"dependencies": {- "@tagspaces/extensions": "1.0.21"+ "@tagspaces/tagspaces-ws": "1.2.1",+ "@tagspaces/extensions": "1.0.21",+ "sharp": "^0.29.3"}}diff --git a/app/perspectives/grid-perspective/components/MainContainer.tsx b/app/perspectives/grid-perspective/components/MainContainer.tsxindex d16d6c062..14764c987 100644--- a/app/perspectives/grid-perspective/components/MainContainer.tsx+++ b/app/perspectives/grid-perspective/components/MainContainer.tsx@@ -741,6 +741,7 @@ const GridPerspective = (props: Props) => {style={{height: 'calc(100% - 48px)'}}+ data-tid={defaultSettings.testID}><MainToolbarclasses={classes}diff --git a/app/perspectives/grid-perspective/index.tsx b/app/perspectives/grid-perspective/index.tsxindex 0e82c9b05..29833c6f4 100644--- a/app/perspectives/grid-perspective/index.tsx+++ b/app/perspectives/grid-perspective/index.tsx@@ -15,6 +15,7 @@ export { default } from './components/MainContainer';// }export const defaultSettings = {+ testID: 'gridPerspectiveContainer',settingsKey: 'tsPerspectiveGrid',orderBy: true,sortBy: 'byName',diff --git a/app/perspectives/index.js b/app/perspectives/index.jsindex 11eeda382..ca3a9cc37 100644--- a/app/perspectives/index.js+++ b/app/perspectives/index.js@@ -39,8 +39,7 @@ export const GridPerspectiveMeta = {pro: false,beta: false,icon: <GridPerspectiveIcon />,- title: 'Grid Perspective',- tooltip: 'Switch to Grid perspective'+ title: 'Grid Perspective'};export const ListPerspectiveMeta = {@@ -49,8 +48,7 @@ export const ListPerspectiveMeta = {pro: false,beta: false,icon: <ListPerspectiveIcon />,- title: 'List Perspective',- tooltip: 'Switch to List perspective'+ title: 'List Perspective'};export const WikiPerspectiveMeta = {@@ -59,8 +57,7 @@ export const WikiPerspectiveMeta = {pro: true,beta: true,icon: <WikiPerspectiveIcon />,- title: 'Wiki Perspective',- tooltip: 'Switch to Wiki perspective'+ title: 'Wiki Perspective'};export const MapiquePerspectiveMeta = {@@ -69,8 +66,7 @@ export const MapiquePerspectiveMeta = {pro: true,beta: false,icon: <MapiquePerspectiveIcon />,- title: 'Mapique Perspective',- tooltip: 'Switch to Mapique perspective'+ title: 'Mapique Perspective'};export const KanbanPerspectiveMeta = {@@ -79,8 +75,7 @@ export const KanbanPerspectiveMeta = {pro: true,beta: true,icon: <KanbanPerspectiveIcon />,- title: 'Kanban Perspective',- tooltip: 'Switch to Kanban perspective'+ title: 'Kanban Perspective'};export const GalleryPerspectiveMeta = {@@ -89,8 +84,7 @@ export const GalleryPerspectiveMeta = {pro: true,beta: false,icon: <GalleryPerspectiveIcon />,- title: 'Gallery Perspective',- tooltip: 'Switch to Gallery perspective'+ title: 'Gallery Perspective'};export const AvailablePerspectives = [];diff --git a/app/perspectives/list/components/MainContainer.tsx b/app/perspectives/list/components/MainContainer.tsxindex e43dd1ef0..849faf806 100644--- a/app/perspectives/list/components/MainContainer.tsx+++ b/app/perspectives/list/components/MainContainer.tsx@@ -741,6 +741,7 @@ const GridPerspective = (props: Props) => {style={{height: 'calc(100% - 48px)'}}+ data-tid={defaultSettings.testID}><MainToolbarclasses={classes}diff --git a/app/perspectives/list/index.tsx b/app/perspectives/list/index.tsxindex f1764d349..0b059257c 100644--- a/app/perspectives/list/index.tsx+++ b/app/perspectives/list/index.tsx@@ -15,6 +15,7 @@ export { default } from './components/MainContainer';// }export const defaultSettings = {+ testID: 'listPerspectiveContainer',settingsKey: 'tsPerspectiveList',orderBy: true,sortBy: 'byName',diff --git a/tests/e2e/perspective-grid-right-button.pw.e2e.js b/tests/e2e/perspective-grid-right-button.pw.e2e.jsindex d6a90d19f..2a52b448f 100644--- a/tests/e2e/perspective-grid-right-button.pw.e2e.js+++ b/tests/e2e/perspective-grid-right-button.pw.e2e.js@@ -35,6 +35,12 @@ import {} from './general.helpers';import { AddRemoveTagsToSelectedFiles } from './perspective-grid.helpers';import { startTestingApp, stopSpectronApp, testDataRefresh } from './hook';+// import { defaultSettings as listDefaultSettings } from '../../app/perspectives/list/index';+// import { defaultSettings as gridDefaultSettings } from '../../app/perspectives/grid-perspective/index';+// import {+// GridPerspectiveMeta,+// ListPerspectiveMeta+// } from '../../app/perspectives/index';const testTagName = 'testTag'; // TODO fix camelCase tag name@@ -439,20 +445,30 @@ describe('TST50** - Right button on a file', () => {test('TST5039 - Changing the Perspective View [web,minio,electron]', async () => {// await isDisplayed('[data-tid=perspectiveGridFileTable]', true);// await global.client.screenshot({ path: 'screenshotTST5039.png' });- const grid = await global.client.waitForSelector(- '[data-tid=perspectiveGridFileTable]'- );- let gridStyle = await grid.getAttribute('style');-- expect(gridStyle).toContain(- 'margin-top: 53px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));'- );- await clickOn('[data-tid=openListPerspective]');- // check perspective view+ // const grid = await global.client.waitForSelector(+ // '[data-tid=perspectiveGridFileTable]'+ // );+ // let gridStyle = await grid.getAttribute('style');+ // expect(gridStyle).toContain(+ // 'margin-top: 53px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));'+ // );+ // await clickOn('[data-tid=openListPerspective]');+ // // check perspective view+ // gridStyle = await grid.getAttribute('style');+ // expect(gridStyle).toContain('grid-template-columns: none;');- gridStyle = await grid.getAttribute('style');- expect(gridStyle).toContain('grid-template-columns: none;');+ await expectElementExist(+ // '[data-tid=' + gridDefaultSettings.testID + ']',+ '[data-tid=gridPerspectiveContainer]',+ true+ );+ await clickOn('[data-tid=openListPerspective]'); // openListPerspective+ await expectElementExist(+ // '[data-tid=' + listDefaultSettings.testID + ']',+ '[data-tid=listPerspectiveContainer]',+ true+ );});test('TST5040 - Create file [TST5040,web,minio,electron]', async () => {