diff --git a/plugins/controlled-documents-resources/src/navigation.ts b/plugins/controlled-documents-resources/src/navigation.ts index 1e42fdf9a9..ff644b23a2 100644 --- a/plugins/controlled-documents-resources/src/navigation.ts +++ b/plugins/controlled-documents-resources/src/navigation.ts @@ -50,7 +50,7 @@ async function generateDocumentLocation ( return { loc: { - path: [appComponent, workspace, documentsId, doc.space], + path: [appComponent, workspace], fragment: getPanelFragment(doc) }, defaultLocation: { @@ -86,7 +86,7 @@ async function generateProjectDocumentLocation ( return { loc: { - path: [appComponent, workspace, documentsId, prjdoc.space], + path: [appComponent, workspace], fragment: getPanelFragment(prjdoc) }, defaultLocation: { diff --git a/plugins/document-resources/src/utils.ts b/plugins/document-resources/src/utils.ts index 814d522d94..a9071f2a1b 100644 --- a/plugins/document-resources/src/utils.ts +++ b/plugins/document-resources/src/utils.ts @@ -122,11 +122,11 @@ export async function generateLocation (loc: Location, id: Ref): Promi return { loc: { - path: [appComponent, workspace, documentId, doc.space], + path: [appComponent, workspace], fragment: getPanelURI(document.component.EditDoc, doc._id, doc._class, 'content') }, defaultLocation: { - path: [appComponent, workspace, documentId], + path: [appComponent, workspace], fragment: getPanelURI(document.component.EditDoc, doc._id, doc._class, 'content') } } diff --git a/plugins/drive-resources/src/navigation.ts b/plugins/drive-resources/src/navigation.ts index b60bb0b957..0de4f0de61 100644 --- a/plugins/drive-resources/src/navigation.ts +++ b/plugins/drive-resources/src/navigation.ts @@ -130,7 +130,10 @@ export async function generateFileLocation (loc: Location, id: Ref): Promi return { loc: { - path: [appComponent, workspace, driveId], + path: + doc.parent !== undefined + ? [appComponent, workspace, driveId, 'folder', doc.parent] + : [appComponent, workspace, driveId], fragment: getPanelFragment(doc) }, defaultLocation: { diff --git a/qms-tests/sanity/tests/model/documents/document-content-page.ts b/qms-tests/sanity/tests/model/documents/document-content-page.ts index 93a4643442..accdaf7f8b 100644 --- a/qms-tests/sanity/tests/model/documents/document-content-page.ts +++ b/qms-tests/sanity/tests/model/documents/document-content-page.ts @@ -6,6 +6,7 @@ import { DocumentHistoryPage } from './document-history-page' export class DocumentContentPage extends DocumentCommonPage { readonly page: Page + readonly panel: Locator readonly buttonDocumentTitle: Locator readonly buttonMoreActions: Locator readonly textDocumentStatus: Locator @@ -103,6 +104,7 @@ export class DocumentContentPage extends DocumentCommonPage { constructor (page: Page) { super(page) this.page = page + this.panel = page.locator('.popupPanel-body') this.buttonDocumentTitle = page.locator('button.version-item span.name') this.buttonMoreActions = page.locator('.hulyHeader-buttonsGroup > .no-print > .antiButton').first() this.textDocumentStatus = page.locator('button.version-item div.root span.label') @@ -260,16 +262,16 @@ export class DocumentContentPage extends DocumentCommonPage { } async checkIfReviewersAndApproversAreVisible (): Promise { - await expect(this.page.getByText('Appleseed John').first()).toBeVisible() - await expect(this.page.getByText('Dirak Kainin')).toBeVisible() - await expect(this.page.getByText('Appleseed John').nth(1)).toBeVisible() + await expect(this.panel.getByText('Appleseed John').first()).toBeVisible() + await expect(this.panel.getByText('Dirak Kainin')).toBeVisible() + await expect(this.panel.getByText('Appleseed John').nth(1)).toBeVisible() } async checkTheUserCantChangeReviewersAndApprovers (): Promise { - await this.page.getByText('Appleseed John').first().click() - await expect(this.page.getByText('Dirak Kainin').nth(1)).not.toBeVisible() - await this.page.getByText('Dirak Kainin').click() - await expect(this.page.getByText('Dirak Kainin').nth(1)).not.toBeVisible() + await this.panel.getByText('Appleseed John').first().click() + await expect(this.panel.getByText('Dirak Kainin').nth(1)).not.toBeVisible() + await this.panel.getByText('Dirak Kainin').click() + await expect(this.panel.getByText('Dirak Kainin').nth(1)).not.toBeVisible() } async clickDocumentHeader (name: string): Promise {