From beb788995418b77e64edc66da6053f22cafa9c84 Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Wed, 1 Mar 2023 00:59:43 +0000 Subject: [PATCH] e2e fix --- e2e/suites/viewer/viewer-actions.test.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/e2e/suites/viewer/viewer-actions.test.ts b/e2e/suites/viewer/viewer-actions.test.ts index 5464d34c9..0915f27ab 100755 --- a/e2e/suites/viewer/viewer-actions.test.ts +++ b/e2e/suites/viewer/viewer-actions.test.ts @@ -38,6 +38,7 @@ import { UploadFilesDialog } from '@alfresco/aca-testing-shared'; import { Logger } from '@alfresco/adf-testing'; +import { By, element } from 'protractor'; describe('Viewer actions', () => { const username = `user-${Utils.random()}`; @@ -64,6 +65,8 @@ describe('Viewer actions', () => { const userActions = new UserActions(); const uploadFilesDialog = new UploadFilesDialog(); + const downloadButton = element(By.css(`button[id='app.viewer.download']`)); + const shareButton = element(By.css(`adf-viewer [data-automation-id="share-action-button"]`)); beforeAll(async () => { await adminApiActions.createUser({ username }); @@ -144,7 +147,7 @@ describe('Viewer actions', () => { await dataTable.doubleClickOnRowByName(docxPersonalFiles); await viewer.waitForViewerToOpen(); - await toolbar.downloadButton.click(); + await downloadButton.click(); expect(await Utils.fileExistsOnOS(docxPersonalFiles)).toBe(true, 'File not found in download location'); }); @@ -569,7 +572,7 @@ describe('Viewer actions', () => { await dataTable.doubleClickOnRowByName(docxFavorites); expect(await viewer.isViewerOpened()).toBe(true, 'Viewer is not opened'); - await toolbar.shareButton.click(); + await shareButton.click(); expect(await shareDialog.isDialogOpen()).toBe(true, 'Dialog is not open'); await shareDialog.clickClose(); });