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
co-authored by Maurizio Vitale Vito Albano sivakumar414ram
parent 3734151338
commit 1c51b2a1a6
195 changed files with 1774 additions and 1460 deletions
@@ -68,11 +68,11 @@ describe('Aspect oriented config', () => {
acsUser = await usersActions.createUser();
await apiService.login(acsUser.email, acsUser.password);
await apiService.login(acsUser.username, acsUser.password);
const uploadedFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, '-my-');
await loginPage.login(acsUser.email, acsUser.password);
await loginPage.login(acsUser.username, acsUser.password);
const aspects = await apiService.getInstance().core.nodesApi.getNode(uploadedFile.entry.id);
@@ -77,17 +77,17 @@ describe('permissions', () => {
});
await apiService.getInstance().core.sitesApi.addSiteMember(site.entry.id, {
id: consumerUser.email,
id: consumerUser.username,
role: CONSTANTS.CS_USER_ROLES.CONSUMER
});
await apiService.getInstance().core.sitesApi.addSiteMember(site.entry.id, {
id: collaboratorUser.email,
id: collaboratorUser.username,
role: CONSTANTS.CS_USER_ROLES.COLLABORATOR
});
await apiService.getInstance().core.sitesApi.addSiteMember(site.entry.id, {
id: contributorUser.email,
id: contributorUser.username,
role: CONSTANTS.CS_USER_ROLES.CONTRIBUTOR
});
@@ -95,12 +95,15 @@ describe('permissions', () => {
});
afterAll(async () => {
await navigationBarPage.clickLogoutButton();
await apiService.getInstance().core.sitesApi.deleteSite(site.entry.id, { permanent: true });
});
afterEach(async () => {
await navigationBarPage.clickLogoutButton();
});
it('[C274692] Should not be possible edit metadata properties when the user is a consumer user', async () => {
await loginPage.login(consumerUser.email, consumerUser.password);
await loginPage.login(consumerUser.username, consumerUser.password);
await navigationBarPage.openContentServicesFolder(site.entry.guid);
@@ -112,7 +115,7 @@ describe('permissions', () => {
});
it('[C279971] Should be possible edit metadata properties when the user is a collaborator user', async () => {
await loginPage.login(collaboratorUser.email, collaboratorUser.password);
await loginPage.login(collaboratorUser.username, collaboratorUser.password);
await navigationBarPage.openContentServicesFolder(site.entry.guid);
@@ -132,7 +135,7 @@ describe('permissions', () => {
});
it('[C279972] Should be possible edit metadata properties when the user is a contributor user', async () => {
await loginPage.login(collaboratorUser.email, collaboratorUser.password);
await loginPage.login(collaboratorUser.username, collaboratorUser.password);
await navigationBarPage.openContentServicesFolder(site.entry.guid);
@@ -64,7 +64,7 @@ describe('CardView Component - properties', () => {
beforeAll(async () => {
await apiService.loginWithProfile('admin');
acsUser = await usersActions.createUser();
await apiService.login(acsUser.email, acsUser.password);
await apiService.login(acsUser.username, acsUser.password);
const pdfUploadedFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, '-my-');
@@ -72,7 +72,7 @@ describe('CardView Component - properties', () => {
pngFileModel.update(pdfUploadedFile.entry);
await loginPage.login(acsUser.email, acsUser.password);
await loginPage.login(acsUser.username, acsUser.password);
await navigationBarPage.navigateToContentServices();
await contentServicesPage.waitForTableBody();
@@ -70,19 +70,15 @@ describe('Metadata component', () => {
beforeAll(async () => {
await apiService.loginWithProfile('admin');
acsUser = await usersActions.createUser();
await apiService.login(acsUser.email, acsUser.password);
await apiService.login(acsUser.username, acsUser.password);
const pngUploadedFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, '-my-');
Object.assign(pngFileModel, pngUploadedFile.entry);
pngFileModel.update(pngUploadedFile.entry);
});
afterAll(async () => {
await navigationBarPage.clickLogoutButton();
});
describe('Viewer Metadata', () => {
beforeAll(async () => {
await loginPage.login(acsUser.email, acsUser.password);
await loginPage.login(acsUser.username, acsUser.password);
await navigationBarPage.navigateToContentServices();
await contentServicesPage.waitForTableBody();
await LocalStorageUtil.setConfigField('content-metadata', JSON.stringify({
@@ -94,6 +90,10 @@ describe('Metadata component', () => {
}));
});
afterAll(async () => {
await navigationBarPage.clickLogoutButton();
});
beforeEach(async () => {
await viewerPage.viewFile(pngFileModel.name);
await viewerPage.checkFileIsLoaded();
@@ -226,19 +226,24 @@ describe('Metadata component', () => {
});
describe('Folder metadata', () => {
beforeAll(async () => {
await uploadActions.createFolder(folderName, '-my-');
await loginPage.login(acsUser.email, acsUser.password);
await loginPage.login(acsUser.username, acsUser.password);
await navigationBarPage.navigateToContentServices();
await contentServicesPage.waitForTableBody();
});
afterAll(async () => {
await navigationBarPage.clickLogoutButton();
});
it('[C261157] Should be possible use the metadata component When the node is a Folder', async () => {
await contentServicesPage.metadataContent(folderName);
await expect(await metadataViewPage.getPropertyText('name')).toEqual(folderName);
await expect(await metadataViewPage.getPropertyText('createdByUser.displayName')).toEqual(acsUser.firstName + ' ' + acsUser.lastName);
await expect(await metadataViewPage.getPropertyText('createdByUser.displayName')).toEqual(`${acsUser.firstName} ${acsUser.lastName}`);
await BrowserActions.closeMenuAndDialogs();
});
@@ -279,7 +284,8 @@ describe('Metadata component', () => {
await metadataViewPage.clickSaveMetadata();
await expect(await metadataViewPage.getPropertyText('properties.cm:description')).toEqual('check author example description');
await loginPage.login(acsUser.email, acsUser.password);
await navigationBarPage.clickLogoutButton();
await loginPage.login(acsUser.username, acsUser.password);
await navigationBarPage.navigateToContentServices();
await viewerPage.viewFile(pngFileModel.name);