[ACA-4645] Fix for shareActions e2es (#2890)

* Fixed expiry date

* Remove tests from protractor.excludes.json

* Remove unnecessary coment

* Fixed test case C286329
This commit is contained in:
Thomas Hunter
2023-01-06 16:58:33 +00:00
committed by GitHub
parent 547e17bee8
commit 28d9475ecd
4 changed files with 13 additions and 23 deletions

View File

@@ -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"
}

View File

@@ -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();

View File

@@ -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');