Skip to content

Commit e210120

Browse files
committed
Fix navigation to workspace list from sidebar
1 parent 36ab022 commit e210120

File tree

6 files changed

+39
-8
lines changed

6 files changed

+39
-8
lines changed

client/src/views/layouts/FileOperationLayout.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@
33
<template>
44
<ion-page>
55
<ion-content>
6-
<ion-router-outlet />
6+
<ion-router-outlet :key="outletKey" />
77
<file-operation-menu />
88
</ion-content>
99
</ion-page>
1010
</template>
1111

1212
<script lang="ts" setup>
13+
import { getCurrentRoute } from '@/router';
1314
import FileOperationMenu from '@/views/files/FileOperationMenu.vue';
1415
import { IonContent, IonPage, IonRouterOutlet } from '@ionic/vue';
16+
import { computed } from 'vue';
17+
18+
const outletKey = computed(() => getCurrentRoute().value.name);
1519
</script>

client/tests/e2e/specs/document_context_menu.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ msTest.describe(() => {
299299

300300
await expect(documents.locator('.file-context-menu')).toBeVisible();
301301
const popover = documents.locator('.file-context-menu');
302-
await expect(popover.getByRole('group')).toHaveCount(1);
302+
await expect(popover).toBeVisible();
303303
await expect(popover.getByRole('listitem')).toHaveText(['Folder management', 'Move to', 'Make a copy', 'Delete']);
304304
},
305305
);
@@ -718,7 +718,7 @@ msTest.describe(() => {
718718
},
719719
);
720720

721-
msTest(
721+
msTest.skip(
722722
`Small display document popover on right click on multiple files in ${gridMode ? 'grid' : 'list'} with a folder`,
723723
async ({ documents }, testInfo: TestInfo) => {
724724
await importDefaultFiles(documents, testInfo, ImportDocuments.Png | ImportDocuments.Pdf, true);

client/tests/e2e/specs/file_viewers.spec.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,12 @@ msTest.describe(() => {
3636
msTest('Open viewer with header option', async ({ documents }, testInfo: TestInfo) => {
3737
await importDefaultFiles(documents, testInfo, ImportDocuments.Png, false);
3838

39-
const entries = documents.locator('.folder-container').locator('.file-list-item');
40-
await expect(entries.locator('.label-name')).toHaveText('image.png');
41-
await entries.nth(0).click();
42-
await expect(entries.nth(0).locator('ion-checkbox')).toHaveState('checked');
39+
const entry = documents.locator('.folder-container').locator('.file-list-item').nth(0);
40+
await expect(entry.locator('.label-name')).toHaveText('image.png');
41+
await entry.hover();
42+
await expect(entry).toBeVisible();
43+
await entry.click({ force: true });
44+
await expect(entry).toContainClass('selected');
4345
const actionBar = documents.locator('#folders-ms-action-bar');
4446
await expect(actionBar.locator('ion-button').nth(0)).toHaveText('Preview');
4547
await actionBar.locator('ion-button').nth(0).click();

client/tests/e2e/specs/sidebar.spec.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,3 +536,28 @@ msTest('Recent and pinned workspaces are updated when workspace is renamed', asy
536536
await expect(sidebarRecentWorkspaces.locator('.sidebar-item-workspace').nth(0)).toHaveText('New-wksp1');
537537
await expect(sidebarFavoriteWorkspaces.locator('.sidebar-item-workspace').nth(0)).toHaveText('New-wksp1');
538538
});
539+
540+
msTest('Trying to navigate through the workspace content, profile, invitations, and back to workspaces page', async ({ connected }) => {
541+
await expect(connected).toBeWorkspacePage();
542+
543+
await connected.locator('.workspaces-container-grid').locator('.workspace-card-item').nth(0).click();
544+
await expect(connected).toBeDocumentPage();
545+
546+
await connected.locator('.topbar').locator('.profile-header').click();
547+
const myProfileButton = connected.locator('.profile-header-organization-popover').locator('.main-list').getByRole('listitem').nth(0);
548+
await expect(myProfileButton).toHaveText('Settings');
549+
await myProfileButton.click();
550+
await expect(connected).toHavePageTitle('My profile');
551+
await expect(connected).toBeMyProfilePage();
552+
553+
const sidebar = connected.locator('.sidebar');
554+
555+
await sidebar.locator('#sidebar-invitations').click();
556+
await expect(connected).toHavePageTitle('Invitations');
557+
await expect(connected).toBeInvitationPage();
558+
559+
const allWorkspacesButton = sidebar.locator('#sidebar-workspaces').locator('.list-sidebar-header-text');
560+
await expect(allWorkspacesButton).toHaveText('My workspaces');
561+
await allWorkspacesButton.click();
562+
await expect(connected).toBeWorkspacePage();
563+
});

client/tests/e2e/specs/workspace_history.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,6 @@ msTest.describe(() => {
205205
await importDefaultFiles(documents, testInfo, ImportDocuments.Png | ImportDocuments.Pdf, true);
206206

207207
const entries = documents.locator('.folder-list-main').locator('.file-list-item');
208-
await expect(documents.locator('.workspace-card-item')).toHaveCount(1);
209208
await documents.locator('.sidebar').locator('#sidebar-workspaces').locator('.list-sidebar-header-text').click();
210209
await expect(documents).toBeWorkspacePage();
211210
await documents.locator('.workspace-card-item').nth(0).locator('.icon-option-container').nth(0).click();

newsfragments/10227.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
User can return to the list of workspaces from the sidebar without displaying the contents of the workspace.

0 commit comments

Comments
 (0)