[ADF-4547] Fixing flaky tests in Content Services and Core (#4743)

This commit is contained in:
Marouan Bentaleb
2019-05-22 14:57:20 +01:00
committed by Denys Vuika
parent 58cf10be5f
commit 5e7aabfaea
9 changed files with 44 additions and 59 deletions

View File

@@ -72,16 +72,14 @@ describe('Document List Component - Actions', () => {
folder5 = await uploadActions.createFolder(alfrescoJsApi, 'E' + folderModel5.name, '-my-');
folder6 = await uploadActions.createFolder(alfrescoJsApi, 'F' + folderModel6.name, '-my-');
folders = [folder1, folder2, folder3, folder4, folder5, folder6];
done();
});
beforeEach(async (done) => {
await loginPage.loginToContentServicesUsingUserModel(contentServicesUser);
contentServicesPage.goToDocumentList();
contentServicesPage.waitForTableBody();
paginationPage.selectItemsPerPage('5');
contentServicesPage.checkAcsContainer();
contentListPage.waitForTableBody();
done();
});
@@ -93,7 +91,7 @@ describe('Document List Component - Actions', () => {
done();
});
xit('[C260132] Move action on folder with - Load more', () => {
it('[C260132] Move action on folder with - Load more', () => {
expect(paginationPage.getCurrentItemsPerPage()).toEqual('5');
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + 5 + ' of ' + 6);

View File

@@ -93,6 +93,8 @@ describe('Permissions Component', function () {
await alfrescoJsApi.core.peopleApi.addPerson(managerUser);
await alfrescoJsApi.login(folderOwnerUser.id, folderOwnerUser.password);
browser.sleep(15000);
const publicSiteName = `PUBLIC_TEST_SITE_${StringUtil.generateRandomString(5)}`;
const privateSiteName = `PRIVATE_TEST_SITE_${StringUtil.generateRandomString(5)}`;
@@ -168,11 +170,9 @@ describe('Permissions Component', function () {
done();
});
xit('[C277002] Should display the Role Site dropdown', async () => {
it('[C277002] Should display the Role Site dropdown', async () => {
contentServicesPage.checkContentIsDisplayed(folderName);
contentServicesPage.checkSelectedSiteIsDisplayed('My files');
contentList.rightClickOnRow(folderName);
contentServicesPage.pressContextMenuActionNamed('Permission');
@@ -183,8 +183,6 @@ describe('Permissions Component', function () {
permissionsPage.checkAddPermissionDialogIsDisplayed();
permissionsPage.checkSearchUserInputIsDisplayed();
browser.sleep(10000);
permissionsPage.searchUserOrGroup(consumerUser.getId());
permissionsPage.clickUserOrGroup(consumerUser.getFirstName());
permissionsPage.checkUserOrGroupIsAdded(consumerUser.getId());
@@ -194,17 +192,17 @@ describe('Permissions Component', function () {
permissionsPage.clickRoleDropdownByUserOrGroupName(consumerUser.getId());
expect(permissionsPage.getRoleDropdownOptions().count()).toBe(4);
expect(permissionsPage.getRoleDropdownOptions().get(0).getText()).toBe('SiteCollaborator');
expect(permissionsPage.getRoleDropdownOptions().get(1).getText()).toBe('SiteConsumer');
expect(permissionsPage.getRoleDropdownOptions().get(2).getText()).toBe('SiteContributor');
expect(permissionsPage.getRoleDropdownOptions().get(3).getText()).toBe('SiteManager');
expect(permissionsPage.getRoleDropdownOptions().get(0).getText()).toBe(CONSTANTS.CS_USER_ROLES.COLLABORATOR);
expect(permissionsPage.getRoleDropdownOptions().get(1).getText()).toBe(CONSTANTS.CS_USER_ROLES.CONSUMER);
expect(permissionsPage.getRoleDropdownOptions().get(2).getText()).toBe(CONSTANTS.CS_USER_ROLES.CONTRIBUTOR);
expect(permissionsPage.getRoleDropdownOptions().get(3).getText()).toBe(CONSTANTS.CS_USER_ROLES.MANAGER);
});
});
describe('Roles: SiteConsumer, SiteCollaborator, SiteContributor, SiteManager', function () {
xit('[C276994] Role SiteConsumer', async () => {
it('[C276994] Role SiteConsumer', async () => {
await loginPage.loginToContentServicesUsingUserModel(siteConsumerUser);

View File

@@ -190,7 +190,7 @@ describe('Tag component', () => {
tagPage.checkDeleteTagFromTagListByNodeIdIsNotDisplayed(tagList[3]);
});
xit('[C286472] Should be able to click Show more/less button on List Tags Content Services', () => {
it('[C286472] Should be able to click Show more/less button on List Tags Content Services', () => {
tagPage.insertNodeId(pdfFileModel.id);
tagPage.checkShowMoreButtonIsDisplayed();

View File

@@ -128,19 +128,15 @@ describe('Datatable component', () => {
notificationPage.checkNotificationSnackBarIsNotDisplayed();
});
xit('[C307040] A column value with copyContent set to true is copied when clicking on it', () => {
it('[C307040] A column value with copyContent set to true is copied when clicking on it', () => {
dataTablePage.mouseOverIdColumn('1');
expect(dataTablePage.getCopyContentTooltip()).toEqual('Click to copy');
dataTablePage.clickOnIdColumn('1');
notificationPage.checkNotifyContains('Text copied to clipboard');
dataTablePage.pasteClipboard();
expect(dataTablePage.getClipboardInputText()).toEqual('1');
dataTablePage.clickOnIdColumn('2');
notificationPage.checkNotifyContains('Text copied to clipboard');
dataTablePage.clickOnIdColumn('3');
notificationPage.checkNotifyContains('Text copied to clipboard');
dataTablePage.pasteClipboard();
expect(dataTablePage.getClipboardInputText()).toEqual('3');
expect(dataTablePage.getClipboardInputText()).toEqual('2');
});
it('[C307072] A tooltip is displayed when mouseOver a column with copyContent set to true', () => {
@@ -164,20 +160,15 @@ describe('Datatable component', () => {
notificationPage.checkNotificationSnackBarIsNotDisplayed();
});
xit('[C307073] A column value with copyContent set to true is copied when clicking on it', () => {
it('[C307073] A column value with copyContent set to true is copied when clicking on it', () => {
copyContentDataTablePage.mouseOverIdColumn('1');
expect(copyContentDataTablePage.getCopyContentTooltip()).toEqual('Click to copy');
copyContentDataTablePage.clickOnIdColumn('1');
notificationPage.checkNotifyContains('Text copied to clipboard');
copyContentDataTablePage.pasteClipboard();
expect(copyContentDataTablePage.getClipboardInputText()).toEqual('1');
copyContentDataTablePage.clickOnIdColumn('2');
notificationPage.checkNotifyContains('Text copied to clipboard');
copyContentDataTablePage.mouseOverIdColumn('3');
copyContentDataTablePage.clickOnIdColumn('3');
notificationPage.checkNotifyContains('Text copied to clipboard');
copyContentDataTablePage.pasteClipboard();
expect(copyContentDataTablePage.getClipboardInputText()).toEqual('3');
expect(copyContentDataTablePage.getClipboardInputText()).toEqual('2');
});
it('[C307100] A column value of type text and with copyContent set to true is copied when clicking on it', () => {

View File

@@ -25,7 +25,6 @@ import { LoginSSOPage, SettingsPage, AppListCloudPage, TaskHeaderCloudPage, Task
import { TasksCloudDemoPage } from '../pages/adf/demo-shell/process-services/tasksCloudDemoPage';
import { TaskDetailsCloudDemoPage } from '../pages/adf/demo-shell/process-services/taskDetailsCloudDemoPage';
import resources = require('../util/resources');
import { browser } from 'protractor';
describe('Task Header cloud component', () => {
@@ -142,11 +141,10 @@ describe('Task Header cloud component', () => {
.toEqual(subTask.entry.parentTaskId === null ? '' : subTask.entry.parentTaskId);
});
xit('[C307032] Should display the appropriate title for the unclaim option of a Task', async () => {
it('[C307032] Should display the appropriate title for the unclaim option of a Task', async () => {
tasksCloudDemoPage.myTasksFilter().clickTaskFilter();
tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(basicCreatedTaskName);
tasksCloudDemoPage.taskListCloudComponent().selectRow(basicCreatedTaskName);
browser.driver.sleep(30000);
expect(taskDetailsCloudDemoPage.getReleaseButtonText()).toBe('RELEASE');
});
});