Use hash strategy in demo shell as the other apps (#6402)

* hash startegy

* use hash in e2e

* trigger build

* fix

* fix

* remove children router overwrite crazynes

* Update login.module.ts

* revert not needed changes

* some fixes

* fix

* remove fdescribe

* fix

* fix

* Update share-file.e2e.ts

* Update lock-file.e2e.ts

* Update share-file.e2e.ts

* some fix

* some other fixes

* username as id

* fix after rebase

* username

* fix usernamee

* Fix the errorComponent

* Attempt to fix unit test - to check

* * Fixed circular dependency error while building adf-testing package

* * Fixed failing UT

* fix

* use username

* some fixes

* some fix

* fix

Co-authored-by: Maurizio Vitale <maurizio.vitale@alfresco.com>
Co-authored-by: Vito Albano <vitoalbano@vitoalbano-mbp-0120.local>
Co-authored-by: sivakumar414ram <siva.kumar@muraai.com>
This commit is contained in:
Eugenio Romano
2020-12-16 18:46:56 +00:00
committed by GitHub
parent 3734151338
commit 1c51b2a1a6
195 changed files with 1774 additions and 1460 deletions

View File

@@ -68,11 +68,6 @@ describe('Unshare file', () => {
id: siteName
};
const memberBody = {
id: acsUser.email,
role: CONSTANTS.CS_USER_ROLES.CONSUMER
};
nodeBody = {
name: StringUtil.generateRandomString(5),
nodeType: 'cm:content',
@@ -85,26 +80,29 @@ describe('Unshare file', () => {
const docLibId = (await apiService.getInstance().core.sitesApi.getSiteContainers(siteName)).list.entries[0].entry.id;
const testFile1Id = (await apiService.getInstance().core.nodesApi.addNode(docLibId, nodeBody)).entry.id;
await apiService.getInstance().core.sitesApi.addSiteMember(siteName, memberBody);
await apiService.getInstance().core.sitesApi.addSiteMember(siteName, {
id: acsUser.username,
role: CONSTANTS.CS_USER_ROLES.CONSUMER
});
await apiService.getInstance().core.nodesApi.updateNode(testFile1Id, {
permissions: {
isInheritanceEnabled: false,
locallySet: [
{
authorityId: acsUser.email,
authorityId: acsUser.username,
name: CONSTANTS.CS_USER_ROLES.CONSUMER
}
]
}
});
await apiService.getInstance().core.sharedlinksApi.addSharedLink({ nodeId: testFile1Id });
await apiService.login(acsUser.email, acsUser.password);
await apiService.login(acsUser.username, acsUser.password);
const pngUploadedFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, '-my-');
nodeId = pngUploadedFile.entry.id;
await loginPage.login(acsUser.email, acsUser.password);
await loginPage.login(acsUser.username, acsUser.password);
await navBar.navigateToContentServices();
await contentServicesPage.waitForTableBody();
});
@@ -114,10 +112,6 @@ describe('Unshare file', () => {
await apiService.getInstance().core.sitesApi.deleteSite(testSite.entry.id, { permanent: true });
});
afterEach(async () => {
await browser.refresh();
});
describe('with permission', () => {
afterAll(async () => {
await apiService.loginWithProfile('admin');
@@ -128,6 +122,7 @@ describe('Unshare file', () => {
await contentListPage.selectRow(pngFileModel.name);
await contentServicesPage.clickShareButton();
await shareDialog.checkDialogIsDisplayed();
await browser.sleep(2000);
await shareDialog.clickUnShareFile();
await shareDialog.confirmationDialogIsDisplayed();
});
@@ -156,17 +151,20 @@ describe('Unshare file', () => {
await contentListPage.selectRow(pngFileModel.name);
await contentServicesPage.clickShareButton();
await shareDialog.checkDialogIsDisplayed();
await browser.sleep(2000);
const sharedLink = await shareDialog.getShareLink();
await shareDialog.clickUnShareFile();
await shareDialog.confirmationDialogIsDisplayed();
await shareDialog.clickConfirmationDialogRemoveButton();
await shareDialog.dialogIsClosed();
await BrowserActions.getUrl(sharedLink.replace(browser.params.testConfig.appConfig.ecmHost, browser.baseUrl));
await BrowserActions.getUrl(sharedLink.replace(browser.params.testConfig.appConfig.ecmHost, `${browser.baseUrl}`));
await errorPage.checkErrorCode();
});
});
describe('without permission', () => {
afterAll(async () => {
await apiService.loginWithProfile('admin');
await apiService.getInstance().core.sitesApi.deleteSite(siteName, { permanent: true });
@@ -177,6 +175,7 @@ describe('Unshare file', () => {
await contentServicesPage.openFolder('documentLibrary');
await contentListPage.selectRow(nodeBody.name);
await contentServicesPage.clickShareButton();
await shareDialog.checkDialogIsDisplayed();
await shareDialog.shareToggleButtonIsChecked();
await shareDialog.clickUnShareFile();
@@ -184,6 +183,7 @@ describe('Unshare file', () => {
await shareDialog.clickConfirmationDialogRemoveButton();
await shareDialog.checkDialogIsDisplayed();
await shareDialog.shareToggleButtonIsChecked();
await notificationHistoryPage.checkNotifyContains(`You don't have permission to unshare this file`);
});
});