diff --git a/e2e/protractor.excludes.json b/e2e/protractor.excludes.json index f08142a4e..eb7e376ad 100644 --- a/e2e/protractor.excludes.json +++ b/e2e/protractor.excludes.json @@ -1,16 +1,5 @@ { "C589205": "https://alfresco.atlassian.net/browse/ACA-4353", "C261153": "https://alfresco.atlassian.net/browse/AAE-7517", - "C306959": "https://alfresco.atlassian.net/browse/ACA-4620", - "C286330": "https://alfresco.atlassian.net/browse/ACA-4645", - "C286332": "https://alfresco.atlassian.net/browse/ACA-4645", - "C286337": "https://alfresco.atlassian.net/browse/ACA-4645", - "C286333": "https://alfresco.atlassian.net/browse/ACA-4645", - "C286335": "https://alfresco.atlassian.net/browse/ACA-4645", - "C286345": "https://alfresco.atlassian.net/browse/ACA-4645", - "C306996": "https://alfresco.atlassian.net/browse/ACA-4645", - "C306997": "https://alfresco.atlassian.net/browse/ACA-4645", - "C306999": "https://alfresco.atlassian.net/browse/ACA-4645", - "C306998": "https://alfresco.atlassian.net/browse/ACA-4645", - "C307000": "https://alfresco.atlassian.net/browse/ACA-4645" + "C306959": "https://alfresco.atlassian.net/browse/ACA-4620" } diff --git a/e2e/suites/actions/share/share-file.test.ts b/e2e/suites/actions/share/share-file.test.ts index 90783c007..06d57a318 100755 --- a/e2e/suites/actions/share/share-file.test.ts +++ b/e2e/suites/actions/share/share-file.test.ts @@ -90,7 +90,9 @@ describe('Share a file', () => { }); describe('when logged in', () => { - const expiryDate: any = '2022-12-25T18:30:00.000+0000'; + const expiryDateObj: Date = new Date(); + expiryDateObj.setFullYear(expiryDateObj.getFullYear() + 1); + const expiryDate: any = expiryDateObj.toISOString().replace('Z', '+0000'); const loginPage = new LoginPage(); const shareDialog = new ShareDialog(); @@ -209,7 +211,7 @@ describe('Share a file', () => { it('[C286337] Expire date is displayed correctly', async () => { await dataTable.selectItem(file6); - await BrowserActions.click(toolbar.shareEditButton); + await BrowserActions.click(toolbar.shareButton); await shareDialog.waitForDialogToOpen(); const expireProperty = await apis.user.nodes.getSharedExpiryDate(file6Id); @@ -220,7 +222,7 @@ describe('Share a file', () => { it('[C286333] Disable the share link expiration', async () => { await dataTable.selectItem(file7); - await BrowserActions.click(toolbar.shareEditButton); + await BrowserActions.click(toolbar.shareButton); await shareDialog.waitForDialogToOpen(); expect(await shareDialog.isExpireToggleEnabled()).toBe(true, 'Expiration is not checked'); @@ -244,7 +246,7 @@ describe('Share a file', () => { await page.dataTable.clearSelection(); await dataTable.selectItem(file8); - await BrowserActions.click(toolbar.shareEditButton); + await BrowserActions.click(toolbar.shareButton); await shareDialog.waitForDialogToOpen(); const url2 = await shareDialog.getLinkUrl(); diff --git a/e2e/suites/actions/share/unshare-file-search-results.test.ts b/e2e/suites/actions/share/unshare-file-search-results.test.ts index 67b65e677..51eb046b5 100755 --- a/e2e/suites/actions/share/unshare-file-search-results.test.ts +++ b/e2e/suites/actions/share/unshare-file-search-results.test.ts @@ -130,7 +130,7 @@ describe('Unshare a file from Search Results', () => { await dataTable.waitForBody(); await dataTable.selectItem(file1); - await BrowserActions.click(toolbar.shareEditButton); + await BrowserActions.click(toolbar.shareButton); await shareDialog.waitForDialogToOpen(); expect(await shareDialog.isShareToggleChecked()).toBe(true, 'Share toggle not checked'); @@ -150,7 +150,7 @@ describe('Unshare a file from Search Results', () => { await dataTable.waitForBody(); await dataTable.selectItem(file2); - await BrowserActions.click(toolbar.shareEditButton); + await BrowserActions.click(toolbar.shareButton); await shareDialog.waitForDialogToOpen(); const url = await shareDialog.getLinkUrl(); await BrowserActions.click(shareDialog.shareToggle); @@ -176,7 +176,7 @@ describe('Unshare a file from Search Results', () => { await dataTable.waitForBody(); await dataTable.selectItem(file3); - await BrowserActions.click(toolbar.shareEditButton); + await BrowserActions.click(toolbar.shareButton); await shareDialog.waitForDialogToOpen(); const urlBefore = await shareDialog.getLinkUrl(); @@ -225,7 +225,7 @@ describe('Unshare a file from Search Results', () => { await searchInput.searchFor(fileSite1); await dataTable.waitForBody(); await dataTable.selectItem(fileSite1); - await BrowserActions.click(toolbar.shareEditButton); + await BrowserActions.click(toolbar.shareButton); await shareDialog.waitForDialogToOpen(); expect(await shareDialog.isShareToggleDisabled()).toBe(false, 'Share toggle disabled for consumer'); @@ -244,7 +244,7 @@ describe('Unshare a file from Search Results', () => { await searchInput.searchFor(fileSite2); await dataTable.waitForBody(); await dataTable.selectItem(fileSite2); - await BrowserActions.click(toolbar.shareEditButton); + await BrowserActions.click(toolbar.shareButton); await shareDialog.waitForDialogToOpen(); expect(await shareDialog.isShareToggleDisabled()).toBe(false, 'Share toggle disabled for consumer'); diff --git a/projects/aca-testing-shared/src/components/toolbar/toolbar.ts b/projects/aca-testing-shared/src/components/toolbar/toolbar.ts index 7716b36d6..394d6fcfc 100755 --- a/projects/aca-testing-shared/src/components/toolbar/toolbar.ts +++ b/projects/aca-testing-shared/src/components/toolbar/toolbar.ts @@ -33,8 +33,7 @@ export class Toolbar extends Component { menu = new Menu(); buttons = this.allByCss('button'); - shareButton = this.byCss(`.mat-icon-button[title='Share']`); - shareEditButton = this.byCss(`.mat-icon-button[title='Shared Link Settings']`); + shareButton = this.byId('share-action-button'); viewButton = this.byCss(`.mat-icon-button[title='View']`); downloadButton = this.byCss(`.mat-icon-button[title='Download']`); editFolderButton = this.byId('app.toolbar.editFolder');