mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
Disable control flow e2e ADF (#4954)
* update project script possible different JS-API * first commit no controll flow * second commit no controll flow * third commit no controll flow * 4 commit no controll flow * 5 commit no controll flow * 6 commit no controll flow * 7 commit no controll flow * 8 commit no controll flow * 9 commit no controll flow * 10 commit no controll flow * 11 commit no controll flow * 12 commit no controll flow * 13 commit no controll flow * 14 commit no controll flow * 15 commit no controll flow * 16 commit no controll flow * 17 commit no controll flow * 18 commit no controll flow * 19 commit no controll flow * 20 commit no controll flow * remove wdpromise, protractor promise and deferred promises * - fixed some incorrect “expect” calls - fixed some matchers - removed “return this;” when not needed - added a few more await-s * forgot a file * fix some failing tests * replaced driver calls with browser calls and enabled back waitForAngular * fix rightClick methods and hopefully some tests * fix settings-component * some more fixes for core and content tests * try to fix some more issues * linting * revert some changes, allowing download on headless chrome won’t work with multiple browser instances * fixes for Search tests * try to remove some wait calls * fix build * increase allScriptsTimeout and try another protractor and web driver version * improve navigation methods * some fixes for notification history and login sso * forgot a space * fix packages and enable some screenshots * navigation bar fixes * fix some test * some fixes for notification history and navigation bar use correct visibility method in attachFileWidget test * fix searching and another fix for navigation * try solve sso login * some more fixes * refactor async forEach into for..of * try fix for search tests * resolve rebabse problems * remove install * fix lint * fix core e2e * fix core e2e * fix core e2e * fix ps tests * fix some tests * fix core e2e * fix core e2e * fix core * fix some issues PS * fix core * fix core * fix some ps test * fix rebase issues * remove save * fix url regressed after rebase * fix url regressed after rebase * fix ps and core * fix lint * more parallel e2e ps * fix some ps cloud test * some cloud fix * fix lint * fix some test * remove files to be ignored * out-tsc * improve one cs test * fix candidate base app * fix ps test * remove click function * clean methods alrady present in browser action * try ugly wait * move wait * remove duplicate call * remove underscore * fix after review * fix imports * minor cosmetic fixes * fix comments test
This commit is contained in:
@@ -52,7 +52,7 @@ describe('Social component', () => {
|
||||
'location': resources.Files.ADF_DOCUMENTS.TXT_0B.file_location
|
||||
});
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(componentOwner);
|
||||
@@ -81,13 +81,12 @@ describe('Social component', () => {
|
||||
}
|
||||
});
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
await uploadActions.deleteFileOrFolder(emptyFile.entry.id);
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
describe('User interaction on their own components', () => {
|
||||
@@ -97,21 +96,21 @@ describe('Social component', () => {
|
||||
await navigationBarPage.clickSocialButton();
|
||||
});
|
||||
|
||||
it('[C203006] Should be able to like and unlike their components but not rate them,', () => {
|
||||
socialPage.writeCustomNodeId(emptyFile.entry.id);
|
||||
expect(socialPage.getNodeIdFieldValue()).toEqual(emptyFile.entry.id);
|
||||
likePage.clickLike();
|
||||
expect(likePage.getLikeCounter()).toBe('1');
|
||||
likePage.removeHoverFromLikeButton();
|
||||
expect(likePage.getLikedIconColor()).toBe(blueLikeColor);
|
||||
ratePage.rateComponent(4);
|
||||
expect(ratePage.getRatingCounter()).toBe('0');
|
||||
expect(ratePage.isNotStarRated(4));
|
||||
expect(ratePage.getUnratedStarColor(4)).toBe(averageStarColor);
|
||||
likePage.clickUnlike();
|
||||
expect(likePage.getLikeCounter()).toBe('0');
|
||||
likePage.removeHoverFromLikeButton();
|
||||
expect(likePage.getUnLikedIconColor()).toBe(greyLikeColor);
|
||||
it('[C203006] Should be able to like and unlike their components but not rate them,', async () => {
|
||||
await socialPage.writeCustomNodeId(emptyFile.entry.id);
|
||||
await expect(await socialPage.getNodeIdFieldValue()).toEqual(emptyFile.entry.id);
|
||||
await likePage.clickLike();
|
||||
await expect(await likePage.getLikeCounter()).toBe('1');
|
||||
await likePage.removeHoverFromLikeButton();
|
||||
await expect(await likePage.getLikedIconColor()).toBe(blueLikeColor);
|
||||
await ratePage.rateComponent(4);
|
||||
await expect(await ratePage.getRatingCounter()).toBe('0');
|
||||
await expect(await ratePage.isNotStarRated(4));
|
||||
await expect(await ratePage.getUnratedStarColor(4)).toBe(averageStarColor);
|
||||
await likePage.clickUnlike();
|
||||
await expect(await likePage.getLikeCounter()).toBe('0');
|
||||
await likePage.removeHoverFromLikeButton();
|
||||
await expect(await likePage.getUnLikedIconColor()).toBe(greyLikeColor);
|
||||
});
|
||||
|
||||
});
|
||||
@@ -123,32 +122,32 @@ describe('Social component', () => {
|
||||
await navigationBarPage.clickSocialButton();
|
||||
});
|
||||
|
||||
it('[C260324] Should be able to like and unlike a component', () => {
|
||||
socialPage.writeCustomNodeId(emptyFile.entry.id);
|
||||
expect(socialPage.getNodeIdFieldValue()).toEqual(emptyFile.entry.id);
|
||||
expect(likePage.getLikeCounter()).toEqual('0');
|
||||
expect(likePage.getUnLikedIconColor()).toBe(greyLikeColor);
|
||||
likePage.clickLike();
|
||||
expect(likePage.getLikeCounter()).toBe('1');
|
||||
likePage.removeHoverFromLikeButton();
|
||||
expect(likePage.getLikedIconColor()).toBe(blueLikeColor);
|
||||
likePage.clickUnlike();
|
||||
expect(likePage.getLikeCounter()).toBe('0');
|
||||
likePage.removeHoverFromLikeButton();
|
||||
expect(likePage.getUnLikedIconColor()).toBe(greyLikeColor);
|
||||
it('[C260324] Should be able to like and unlike a component', async () => {
|
||||
await socialPage.writeCustomNodeId(emptyFile.entry.id);
|
||||
await expect(await socialPage.getNodeIdFieldValue()).toEqual(emptyFile.entry.id);
|
||||
await expect(await likePage.getLikeCounter()).toEqual('0');
|
||||
await expect(await likePage.getUnLikedIconColor()).toBe(greyLikeColor);
|
||||
await likePage.clickLike();
|
||||
await expect(await likePage.getLikeCounter()).toBe('1');
|
||||
await likePage.removeHoverFromLikeButton();
|
||||
await expect(await likePage.getLikedIconColor()).toBe(blueLikeColor);
|
||||
await likePage.clickUnlike();
|
||||
await expect(await likePage.getLikeCounter()).toBe('0');
|
||||
await likePage.removeHoverFromLikeButton();
|
||||
await expect(await likePage.getUnLikedIconColor()).toBe(greyLikeColor);
|
||||
});
|
||||
|
||||
it('[C310198] Should be able to rate and unRate a component', () => {
|
||||
socialPage.writeCustomNodeId(emptyFile.entry.id);
|
||||
expect(socialPage.getNodeIdFieldValue()).toEqual(emptyFile.entry.id);
|
||||
expect(ratePage.getRatingCounter()).toBe('0');
|
||||
ratePage.rateComponent(4);
|
||||
expect(ratePage.getRatingCounter()).toBe('1');
|
||||
expect(ratePage.isStarRated(4));
|
||||
expect(ratePage.getRatedStarColor(4)).toBe(yellowRatedStarColor);
|
||||
ratePage.removeRating(4);
|
||||
expect(ratePage.getRatingCounter()).toBe('0');
|
||||
expect(ratePage.isNotStarRated(4));
|
||||
it('[C310198] Should be able to rate and unRate a component', async () => {
|
||||
await socialPage.writeCustomNodeId(emptyFile.entry.id);
|
||||
await expect(await socialPage.getNodeIdFieldValue()).toEqual(emptyFile.entry.id);
|
||||
await expect(await ratePage.getRatingCounter()).toBe('0');
|
||||
await ratePage.rateComponent(4);
|
||||
await expect(await ratePage.getRatingCounter()).toBe('1');
|
||||
await expect(await ratePage.isStarRated(4));
|
||||
await expect(await ratePage.getRatedStarColor(4)).toBe(yellowRatedStarColor);
|
||||
await ratePage.removeRating(4);
|
||||
await expect(await ratePage.getRatingCounter()).toBe('0');
|
||||
await expect(await ratePage.isNotStarRated(4));
|
||||
});
|
||||
|
||||
});
|
||||
@@ -161,48 +160,48 @@ describe('Social component', () => {
|
||||
});
|
||||
|
||||
it('[C310197] Should be able to like, unLike, display total likes', async () => {
|
||||
socialPage.writeCustomNodeId(emptyFile.entry.id);
|
||||
expect(socialPage.getNodeIdFieldValue()).toEqual(emptyFile.entry.id);
|
||||
expect(likePage.getUnLikedIconColor()).toBe(greyLikeColor);
|
||||
likePage.clickLike();
|
||||
expect(likePage.getLikeCounter()).toBe('1');
|
||||
likePage.removeHoverFromLikeButton();
|
||||
expect(likePage.getLikedIconColor()).toBe(blueLikeColor);
|
||||
await socialPage.writeCustomNodeId(emptyFile.entry.id);
|
||||
await expect(await socialPage.getNodeIdFieldValue()).toEqual(emptyFile.entry.id);
|
||||
await expect(await likePage.getUnLikedIconColor()).toBe(greyLikeColor);
|
||||
await likePage.clickLike();
|
||||
await expect(await likePage.getLikeCounter()).toBe('1');
|
||||
await likePage.removeHoverFromLikeButton();
|
||||
await expect(await likePage.getLikedIconColor()).toBe(blueLikeColor);
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(secondComponentVisitor);
|
||||
navigationBarPage.clickSocialButton();
|
||||
socialPage.writeCustomNodeId(emptyFile.entry.id);
|
||||
expect(likePage.getUnLikedIconColor()).toBe(greyLikeColor);
|
||||
likePage.clickLike();
|
||||
expect(likePage.getLikeCounter()).toEqual('2');
|
||||
likePage.removeHoverFromLikeButton();
|
||||
expect(likePage.getLikedIconColor()).toBe(blueLikeColor);
|
||||
likePage.clickUnlike();
|
||||
expect(likePage.getLikeCounter()).toEqual('1');
|
||||
likePage.removeHoverFromLikeButton();
|
||||
expect(likePage.getUnLikedIconColor()).toBe(greyLikeColor);
|
||||
await navigationBarPage.clickSocialButton();
|
||||
await socialPage.writeCustomNodeId(emptyFile.entry.id);
|
||||
await expect(await likePage.getUnLikedIconColor()).toBe(greyLikeColor);
|
||||
await likePage.clickLike();
|
||||
await expect(await likePage.getLikeCounter()).toEqual('2');
|
||||
await likePage.removeHoverFromLikeButton();
|
||||
await expect(await likePage.getLikedIconColor()).toBe(blueLikeColor);
|
||||
await likePage.clickUnlike();
|
||||
await expect(await likePage.getLikeCounter()).toEqual('1');
|
||||
await likePage.removeHoverFromLikeButton();
|
||||
await expect(await likePage.getUnLikedIconColor()).toBe(greyLikeColor);
|
||||
});
|
||||
|
||||
it('[C260327] Should be able to rate, unRate, display total ratings, display average rating', async () => {
|
||||
socialPage.writeCustomNodeId(emptyFile.entry.id);
|
||||
expect(socialPage.getNodeIdFieldValue()).toEqual(emptyFile.entry.id);
|
||||
ratePage.rateComponent(4);
|
||||
expect(ratePage.getRatingCounter()).toEqual('1');
|
||||
expect(ratePage.isStarRated(4));
|
||||
expect(ratePage.getRatedStarColor(4)).toBe(yellowRatedStarColor);
|
||||
await socialPage.writeCustomNodeId(emptyFile.entry.id);
|
||||
await expect(await socialPage.getNodeIdFieldValue()).toEqual(emptyFile.entry.id);
|
||||
await ratePage.rateComponent(4);
|
||||
await expect(await ratePage.getRatingCounter()).toEqual('1');
|
||||
await expect(await ratePage.isStarRated(4));
|
||||
await expect(await ratePage.getRatedStarColor(4)).toBe(yellowRatedStarColor);
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(secondComponentVisitor);
|
||||
navigationBarPage.clickSocialButton();
|
||||
socialPage.writeCustomNodeId(emptyFile.entry.id);
|
||||
expect(socialPage.getNodeIdFieldValue()).toEqual(emptyFile.entry.id);
|
||||
expect(ratePage.getRatingCounter()).toEqual('1');
|
||||
expect(ratePage.getAverageStarColor(4)).toBe(averageStarColor);
|
||||
ratePage.rateComponent(0);
|
||||
expect(ratePage.getRatingCounter()).toEqual('2');
|
||||
expect(ratePage.isStarRated(2));
|
||||
ratePage.removeRating(0);
|
||||
expect(ratePage.getRatingCounter()).toEqual('1');
|
||||
expect(ratePage.getAverageStarColor(4)).toBe(averageStarColor);
|
||||
await navigationBarPage.clickSocialButton();
|
||||
await socialPage.writeCustomNodeId(emptyFile.entry.id);
|
||||
await expect(await socialPage.getNodeIdFieldValue()).toEqual(emptyFile.entry.id);
|
||||
await expect(await ratePage.getRatingCounter()).toEqual('1');
|
||||
await expect(await ratePage.getAverageStarColor(4)).toBe(averageStarColor);
|
||||
await ratePage.rateComponent(0);
|
||||
await expect(await ratePage.getRatingCounter()).toEqual('2');
|
||||
await expect(await ratePage.isStarRated(2));
|
||||
await ratePage.removeRating(0);
|
||||
await expect(await ratePage.getRatingCounter()).toEqual('1');
|
||||
await expect(await ratePage.getAverageStarColor(4)).toBe(averageStarColor);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user