mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
add slower type method for user picker (#5632)
* add slower type method for user picker * add slower type method for user picker * slower * other fixes * remove slow digit * fix some more test * slow down * fix some more test * exclude test * exclude C315268
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { LoginPage, NotificationHistoryPage } from '@alfresco/adf-testing';
|
import { LoginPage, NotificationHistoryPage, StringUtil } from '@alfresco/adf-testing';
|
||||||
import { ContentServicesPage } from '../../pages/adf/content-services.page';
|
import { ContentServicesPage } from '../../pages/adf/content-services.page';
|
||||||
import { FolderDialogPage } from '../../pages/adf/dialog/folder-dialog.page';
|
import { FolderDialogPage } from '../../pages/adf/dialog/folder-dialog.page';
|
||||||
import { MetadataViewPage } from '../../pages/adf/metadata-view.page';
|
import { MetadataViewPage } from '../../pages/adf/metadata-view.page';
|
||||||
@@ -106,7 +106,7 @@ describe('Create folder directive', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('[C260158] Should be possible add a folder description when create a new folder', async () => {
|
it('[C260158] Should be possible add a folder description when create a new folder', async () => {
|
||||||
const folderName = 'folderDescription';
|
const folderName = StringUtil.generateRandomString();
|
||||||
const description = 'this is the description';
|
const description = 'this is the description';
|
||||||
|
|
||||||
await contentServicesPage.clickOnCreateNewFolder();
|
await contentServicesPage.clickOnCreateNewFolder();
|
||||||
|
@@ -333,6 +333,7 @@ describe('Document List Component', () => {
|
|||||||
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||||
let folderName = '';
|
let folderName = '';
|
||||||
let folder = null;
|
let folder = null;
|
||||||
|
|
||||||
for (let i = 0; i < 20; i++) {
|
for (let i = 0; i < 20; i++) {
|
||||||
folderName = `MEESEEKS_000${i}`;
|
folderName = `MEESEEKS_000${i}`;
|
||||||
folder = await uploadActions.createFolder(folderName, '-my-');
|
folder = await uploadActions.createFolder(folderName, '-my-');
|
||||||
@@ -341,7 +342,7 @@ describe('Document List Component', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
afterAll(async () => {
|
afterAll(async () => {
|
||||||
for (let i = 0; i <= folderCreated.length; i++) {
|
for (let i = 0; i < folderCreated.length; i++) {
|
||||||
await uploadActions.deleteFileOrFolder(folderCreated[i].entry.id);
|
await uploadActions.deleteFileOrFolder(folderCreated[i].entry.id);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@@ -26,7 +26,6 @@ describe('Document List Component', () => {
|
|||||||
|
|
||||||
const loginPage = new LoginPage();
|
const loginPage = new LoginPage();
|
||||||
const contentServicesPage = new ContentServicesPage();
|
const contentServicesPage = new ContentServicesPage();
|
||||||
const navBar = new NavigationBarPage();
|
|
||||||
const errorPage = new ErrorPage();
|
const errorPage = new ErrorPage();
|
||||||
const navigationBarPage = new NavigationBarPage();
|
const navigationBarPage = new NavigationBarPage();
|
||||||
|
|
||||||
@@ -54,15 +53,11 @@ describe('Document List Component', () => {
|
|||||||
privateSite = await this.alfrescoJsApi.core.sitesApi.createSite(privateSiteBody);
|
privateSite = await this.alfrescoJsApi.core.sitesApi.createSite(privateSiteBody);
|
||||||
|
|
||||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
afterAll(async () => {
|
afterAll(async () => {
|
||||||
await navigationBarPage.clickLogoutButton();
|
await navigationBarPage.clickLogoutButton();
|
||||||
await this.alfrescoJsApi.core.sitesApi.deleteSite(privateSite.entry.id);
|
await this.alfrescoJsApi.core.sitesApi.deleteSite(privateSite.entry.id);
|
||||||
await navBar.openLanguageMenu();
|
|
||||||
await navBar.chooseLanguage('English');
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('[C217334] Should display a message when accessing file without permissions', async () => {
|
it('[C217334] Should display a message when accessing file without permissions', async () => {
|
||||||
@@ -77,13 +72,5 @@ describe('Document List Component', () => {
|
|||||||
await BrowserActions.getUrl(browser.params.testConfig.adf.url + '/files/' + privateSite.entry.guid);
|
await BrowserActions.getUrl(browser.params.testConfig.adf.url + '/files/' + privateSite.entry.guid);
|
||||||
await expect(await errorPage.getErrorCode()).toBe('403');
|
await expect(await errorPage.getErrorCode()).toBe('403');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('[C279925] Should display translated message when accessing a file without permissions if language is changed', async () => {
|
|
||||||
await navBar.openLanguageMenu();
|
|
||||||
await navBar.chooseLanguage('Italiano');
|
|
||||||
await browser.sleep(2000);
|
|
||||||
await BrowserActions.getUrl(browser.params.testConfig.adf.url + '/files/' + privateSite.entry.guid);
|
|
||||||
await expect(await errorPage.getErrorDescription()).toBe('Accesso alla risorsa sul server non consentito.');
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@@ -15,7 +15,14 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { LoginPage, LocalStorageUtil, BrowserActions, UploadActions, ViewerPage } from '@alfresco/adf-testing';
|
import {
|
||||||
|
LoginPage,
|
||||||
|
LocalStorageUtil,
|
||||||
|
BrowserActions,
|
||||||
|
UploadActions,
|
||||||
|
ViewerPage,
|
||||||
|
StringUtil
|
||||||
|
} from '@alfresco/adf-testing';
|
||||||
import { ContentServicesPage } from '../../pages/adf/content-services.page';
|
import { ContentServicesPage } from '../../pages/adf/content-services.page';
|
||||||
import { MetadataViewPage } from '../../pages/adf/metadata-view.page';
|
import { MetadataViewPage } from '../../pages/adf/metadata-view.page';
|
||||||
import { AcsUserModel } from '../../models/ACS/acs-user.model';
|
import { AcsUserModel } from '../../models/ACS/acs-user.model';
|
||||||
@@ -48,7 +55,7 @@ describe('Metadata component', () => {
|
|||||||
|
|
||||||
const acsUser = new AcsUserModel();
|
const acsUser = new AcsUserModel();
|
||||||
|
|
||||||
const folderName = 'Metadata Folder';
|
const folderName = StringUtil.generateRandomString();
|
||||||
|
|
||||||
const pngFileModel = new FileModel({
|
const pngFileModel = new FileModel({
|
||||||
name: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
name: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||||
|
@@ -58,10 +58,10 @@ export class ContentServicesPage {
|
|||||||
errorSnackBar: ElementFinder = element(by.css('simple-snack-bar[class*="mat-simple-snackbar"]'));
|
errorSnackBar: ElementFinder = element(by.css('simple-snack-bar[class*="mat-simple-snackbar"]'));
|
||||||
emptyPagination: ElementFinder = element(by.css('adf-pagination[class*="adf-pagination__empty"]'));
|
emptyPagination: ElementFinder = element(by.css('adf-pagination[class*="adf-pagination__empty"]'));
|
||||||
dragAndDrop: ElementFinder = element.all(by.css('adf-upload-drag-area div')).first();
|
dragAndDrop: ElementFinder = element.all(by.css('adf-upload-drag-area div')).first();
|
||||||
nameHeader: ElementFinder = element(by.css('div[data-automation-id="auto_id_name"] > span'));
|
nameHeader: ElementFinder = element.all(by.css('div[data-automation-id="auto_id_name"] > span')).first();
|
||||||
sizeHeader: ElementFinder = element(by.css('div[data-automation-id="auto_id_content.sizeInBytes"] > span'));
|
sizeHeader: ElementFinder = element.all(by.css('div[data-automation-id="auto_id_content.sizeInBytes"] > span')).first();
|
||||||
createdByHeader: ElementFinder = element(by.css('div[data-automation-id="auto_id_createdByUser.displayName"] > span'));
|
createdByHeader: ElementFinder = element.all(by.css('div[data-automation-id="auto_id_createdByUser.displayName"] > span')).first();
|
||||||
createdHeader: ElementFinder = element(by.css('div[data-automation-id="auto_id_createdAt"] > span'));
|
createdHeader: ElementFinder = element.all(by.css('div[data-automation-id="auto_id_createdAt"] > span')).first();
|
||||||
recentFiles: ElementFinder = element(by.css('.app-container-recent'));
|
recentFiles: ElementFinder = element(by.css('.app-container-recent'));
|
||||||
recentFilesExpanded: ElementFinder = element(by.css('.app-container-recent mat-expansion-panel-header.mat-expanded'));
|
recentFilesExpanded: ElementFinder = element(by.css('.app-container-recent mat-expansion-panel-header.mat-expanded'));
|
||||||
recentFilesClosed: ElementFinder = element(by.css('.app-container-recent mat-expansion-panel-header'));
|
recentFilesClosed: ElementFinder = element(by.css('.app-container-recent mat-expansion-panel-header'));
|
||||||
@@ -87,7 +87,7 @@ export class ContentServicesPage {
|
|||||||
markedFavorite: ElementFinder = element(by.cssContainingText('button[data-automation-id="favorite"] mat-icon', 'star'));
|
markedFavorite: ElementFinder = element(by.cssContainingText('button[data-automation-id="favorite"] mat-icon', 'star'));
|
||||||
notMarkedFavorite: ElementFinder = element(by.cssContainingText('button[data-automation-id="favorite"] mat-icon', 'star_border'));
|
notMarkedFavorite: ElementFinder = element(by.cssContainingText('button[data-automation-id="favorite"] mat-icon', 'star_border'));
|
||||||
multiSelectToggle: ElementFinder = element(by.cssContainingText('span.mat-slide-toggle-content', ' Multiselect (with checkboxes) '));
|
multiSelectToggle: ElementFinder = element(by.cssContainingText('span.mat-slide-toggle-content', ' Multiselect (with checkboxes) '));
|
||||||
selectAllCheckbox: ElementFinder = element(by.css('.adf-checkbox-sr-only'));
|
selectAllCheckbox: ElementFinder = element.all(by.css('.adf-checkbox-sr-only')).first();
|
||||||
selectionModeDropdown: ElementFinder = element(by.css('.mat-select[aria-label="Selection Mode"]'));
|
selectionModeDropdown: ElementFinder = element(by.css('.mat-select[aria-label="Selection Mode"]'));
|
||||||
selectedNodesList: ElementArrayFinder = element.all(by.css('.app-content-service-settings li'));
|
selectedNodesList: ElementArrayFinder = element.all(by.css('.app-content-service-settings li'));
|
||||||
|
|
||||||
|
@@ -170,7 +170,6 @@ describe('Process filters cloud', () => {
|
|||||||
await processCloudDemoPage.editProcessFilterCloudComponent().setAppNameDropDown('subprocessapp');
|
await processCloudDemoPage.editProcessFilterCloudComponent().setAppNameDropDown('subprocessapp');
|
||||||
await processCloudDemoPage.editProcessFilterCloudComponent().setProperty('initiator', testUser.username);
|
await processCloudDemoPage.editProcessFilterCloudComponent().setProperty('initiator', testUser.username);
|
||||||
|
|
||||||
await processCloudDemoPage.processListCloudComponent().getDataTable().waitTillContentLoaded();
|
|
||||||
await expect(await processListPage.getDisplayedProcessListTitle()).toEqual('No Processes Found');
|
await expect(await processListPage.getDisplayedProcessListTitle()).toEqual('No Processes Found');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -213,7 +212,6 @@ describe('Process filters cloud', () => {
|
|||||||
await processCloudDemoPage.processListCloudComponent().getDataTable().waitTillContentLoaded();
|
await processCloudDemoPage.processListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||||
await processCloudDemoPage.processListCloudComponent().checkContentIsDisplayedByName(runningProcessInstance.entry.name);
|
await processCloudDemoPage.processListCloudComponent().checkContentIsDisplayedByName(runningProcessInstance.entry.name);
|
||||||
|
|
||||||
await browser.driver.sleep(1000);
|
|
||||||
await expect(await processCloudDemoPage.processListCloudComponent().getDataTable().getNumberOfRows()).toBe(1);
|
await expect(await processCloudDemoPage.processListCloudComponent().getDataTable().getNumberOfRows()).toBe(1);
|
||||||
|
|
||||||
await processCloudDemoPage.editProcessFilterCloudComponent().setProperty('processInstanceId', anotherProcessInstance.entry.id);
|
await processCloudDemoPage.editProcessFilterCloudComponent().setProperty('processInstanceId', anotherProcessInstance.entry.id);
|
||||||
@@ -345,7 +343,6 @@ describe('Process filters cloud', () => {
|
|||||||
await processCloudDemoPage.editProcessFilterCloudComponent().openFilter();
|
await processCloudDemoPage.editProcessFilterCloudComponent().openFilter();
|
||||||
await processCloudDemoPage.editProcessFilterCloudComponent().setProperty('lastModifiedFrom', afterDate);
|
await processCloudDemoPage.editProcessFilterCloudComponent().setProperty('lastModifiedFrom', afterDate);
|
||||||
await processCloudDemoPage.editProcessFilterCloudComponent().setProperty('lastModifiedTo', afterDate);
|
await processCloudDemoPage.editProcessFilterCloudComponent().setProperty('lastModifiedTo', afterDate);
|
||||||
await processCloudDemoPage.processListCloudComponent().getDataTable().waitTillContentLoaded();
|
|
||||||
await expect(await processListPage.getDisplayedProcessListTitle()).toEqual('No Processes Found');
|
await expect(await processListPage.getDisplayedProcessListTitle()).toEqual('No Processes Found');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@@ -108,7 +108,9 @@ describe('Process Header cloud component', () => {
|
|||||||
await tasksCloudDemoPage.taskListCloudComponent().checkTaskListIsLoaded();
|
await tasksCloudDemoPage.taskListCloudComponent().checkTaskListIsLoaded();
|
||||||
await processCloudDemoPage.processFilterCloudComponent.clickOnProcessFilters();
|
await processCloudDemoPage.processFilterCloudComponent.clickOnProcessFilters();
|
||||||
await processCloudDemoPage.processFilterCloudComponent.clickRunningProcessesFilter();
|
await processCloudDemoPage.processFilterCloudComponent.clickRunningProcessesFilter();
|
||||||
|
|
||||||
await expect(await processCloudDemoPage.processFilterCloudComponent.getActiveFilterName()).toBe('Running Processes');
|
await expect(await processCloudDemoPage.processFilterCloudComponent.getActiveFilterName()).toBe('Running Processes');
|
||||||
|
|
||||||
await processCloudDemoPage.editProcessFilterCloudComponent().setFilter({ processName: runningProcess.entry.name });
|
await processCloudDemoPage.editProcessFilterCloudComponent().setFilter({ processName: runningProcess.entry.name });
|
||||||
await processCloudDemoPage.processListCloudComponent().getDataTable().waitTillContentLoaded();
|
await processCloudDemoPage.processListCloudComponent().getDataTable().waitTillContentLoaded();
|
||||||
await processCloudDemoPage.processListCloudComponent().checkContentIsDisplayedByName(runningProcess.entry.name);
|
await processCloudDemoPage.processListCloudComponent().checkContentIsDisplayedByName(runningProcess.entry.name);
|
||||||
|
@@ -74,42 +74,55 @@ describe('Task Header cloud component', () => {
|
|||||||
let identityService: IdentityService;
|
let identityService: IdentityService;
|
||||||
let groupIdentityService: GroupIdentityService;
|
let groupIdentityService: GroupIdentityService;
|
||||||
|
|
||||||
|
const createCompletedTask = async function () {
|
||||||
|
const completedTaskId = await tasksService.createStandaloneTask(completedTaskName,
|
||||||
|
simpleApp, { priority: priority, description: description, dueDate: basicCreatedTask.entry.createdDate });
|
||||||
|
await tasksService.claimTask(completedTaskId.entry.id, simpleApp);
|
||||||
|
await tasksService.completeTask(completedTaskId.entry.id, simpleApp);
|
||||||
|
return tasksService.getTask(completedTaskId.entry.id, simpleApp);
|
||||||
|
};
|
||||||
|
|
||||||
|
const createSubTask = async function (createdTaskId) {
|
||||||
|
const subTaskId = await tasksService.createStandaloneSubtask(createdTaskId.entry.id, simpleApp, StringUtil.generateRandomString());
|
||||||
|
await tasksService.claimTask(subTaskId.entry.id, simpleApp);
|
||||||
|
return tasksService.getTask(subTaskId.entry.id, simpleApp);
|
||||||
|
};
|
||||||
|
|
||||||
|
const createTask = async function () {
|
||||||
|
const createdTaskId = await tasksService.createStandaloneTask(basicCreatedTaskName, simpleApp);
|
||||||
|
await tasksService.claimTask(createdTaskId.entry.id, simpleApp);
|
||||||
|
basicCreatedTask = await tasksService.getTask(createdTaskId.entry.id, simpleApp);
|
||||||
|
basicCreatedDate = moment(basicCreatedTask.entry.createdDate).format(formatDate);
|
||||||
|
return createdTaskId;
|
||||||
|
};
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
await apiService.login(browser.params.identityAdmin.email, browser.params.identityAdmin.password);
|
await apiService.login(browser.params.identityAdmin.email, browser.params.identityAdmin.password);
|
||||||
identityService = new IdentityService(apiService);
|
identityService = new IdentityService(apiService);
|
||||||
groupIdentityService = new GroupIdentityService(apiService);
|
groupIdentityService = new GroupIdentityService(apiService);
|
||||||
testUser = await identityService.createIdentityUserWithRole(apiService, [identityService.ROLES.ACTIVITI_USER]);
|
|
||||||
|
|
||||||
|
testUser = await identityService.createIdentityUserWithRole(apiService, [identityService.ROLES.ACTIVITI_USER]);
|
||||||
groupInfo = await groupIdentityService.getGroupInfoByGroupName('hr');
|
groupInfo = await groupIdentityService.getGroupInfoByGroupName('hr');
|
||||||
await identityService.addUserToGroup(testUser.idIdentityService, groupInfo.id);
|
await identityService.addUserToGroup(testUser.idIdentityService, groupInfo.id);
|
||||||
await apiService.login(testUser.email, testUser.password);
|
await apiService.login(testUser.email, testUser.password);
|
||||||
|
|
||||||
tasksService = new TasksService(apiService);
|
tasksService = new TasksService(apiService);
|
||||||
|
|
||||||
const createdTaskId = await tasksService.createStandaloneTask(basicCreatedTaskName, simpleApp);
|
|
||||||
unclaimedTask = await tasksService.createStandaloneTask(unclaimedTaskName, simpleApp);
|
unclaimedTask = await tasksService.createStandaloneTask(unclaimedTaskName, simpleApp);
|
||||||
|
|
||||||
await tasksService.claimTask(createdTaskId.entry.id, simpleApp);
|
const createdTaskId = await createTask();
|
||||||
|
|
||||||
basicCreatedTask = await tasksService.getTask(createdTaskId.entry.id, simpleApp);
|
completedTask = await createCompletedTask();
|
||||||
|
|
||||||
basicCreatedDate = moment(basicCreatedTask.entry.createdDate).format(formatDate);
|
|
||||||
|
|
||||||
const completedTaskId = await tasksService.createStandaloneTask(completedTaskName,
|
|
||||||
simpleApp, { priority: priority, description: description, dueDate: basicCreatedTask.entry.createdDate });
|
|
||||||
await tasksService.claimTask(completedTaskId.entry.id, simpleApp);
|
|
||||||
await tasksService.completeTask(completedTaskId.entry.id, simpleApp);
|
|
||||||
completedTask = await tasksService.getTask(completedTaskId.entry.id, simpleApp);
|
|
||||||
completedCreatedDate = moment(completedTask.entry.createdDate).format(formatDate);
|
completedCreatedDate = moment(completedTask.entry.createdDate).format(formatDate);
|
||||||
dueDate = moment(completedTask.entry.createdDate).format(dateTimeFormat);
|
dueDate = moment(completedTask.entry.dueDate).format(dateTimeFormat);
|
||||||
completedEndDate = moment(completedTask.entry.endDate).format(formatDate);
|
completedEndDate = moment(completedTask.entry.endDate).format(formatDate);
|
||||||
defaultDate = moment(completedTask.entry.createdDate).format(defaultFormat);
|
defaultDate = moment(completedTask.entry.createdDate).format(defaultFormat);
|
||||||
|
|
||||||
const subTaskId = await tasksService.createStandaloneSubtask(createdTaskId.entry.id, simpleApp, StringUtil.generateRandomString());
|
subTask = await createSubTask(createdTaskId);
|
||||||
await tasksService.claimTask(subTaskId.entry.id, simpleApp);
|
|
||||||
subTask = await tasksService.getTask(subTaskId.entry.id, simpleApp);
|
|
||||||
subTaskCreatedDate = moment(subTask.entry.createdDate).format(formatDate);
|
subTaskCreatedDate = moment(subTask.entry.createdDate).format(formatDate);
|
||||||
|
|
||||||
|
await browser.sleep(3000);
|
||||||
await loginSSOPage.loginSSOIdentityService(testUser.email, testUser.password);
|
await loginSSOPage.loginSSOIdentityService(testUser.email, testUser.password);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -128,6 +141,7 @@ describe('Task Header cloud component', () => {
|
|||||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickMyTasksFilter();
|
await tasksCloudDemoPage.taskFilterCloudComponent.clickMyTasksFilter();
|
||||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(basicCreatedTaskName);
|
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(basicCreatedTaskName);
|
||||||
await tasksCloudDemoPage.taskListCloudComponent().selectRow(basicCreatedTaskName);
|
await tasksCloudDemoPage.taskListCloudComponent().selectRow(basicCreatedTaskName);
|
||||||
|
|
||||||
await expect(await taskHeaderCloudPage.getId()).toEqual(basicCreatedTask.entry.id);
|
await expect(await taskHeaderCloudPage.getId()).toEqual(basicCreatedTask.entry.id);
|
||||||
await expect(await taskHeaderCloudPage.getDescription())
|
await expect(await taskHeaderCloudPage.getDescription())
|
||||||
.toEqual(isValueInvalid(basicCreatedTask.entry.description) ? CONSTANTS.TASK_DETAILS.NO_DESCRIPTION : basicCreatedTask.entry.description);
|
.toEqual(isValueInvalid(basicCreatedTask.entry.description) ? CONSTANTS.TASK_DETAILS.NO_DESCRIPTION : basicCreatedTask.entry.description);
|
||||||
@@ -147,6 +161,7 @@ describe('Task Header cloud component', () => {
|
|||||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickCompletedTasksFilter();
|
await tasksCloudDemoPage.taskFilterCloudComponent.clickCompletedTasksFilter();
|
||||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(completedTaskName);
|
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(completedTaskName);
|
||||||
await tasksCloudDemoPage.taskListCloudComponent().selectRow(completedTaskName);
|
await tasksCloudDemoPage.taskListCloudComponent().selectRow(completedTaskName);
|
||||||
|
|
||||||
await expect(await taskHeaderCloudPage.getId()).toEqual(completedTask.entry.id);
|
await expect(await taskHeaderCloudPage.getId()).toEqual(completedTask.entry.id);
|
||||||
await expect(await taskHeaderCloudPage.getDescription())
|
await expect(await taskHeaderCloudPage.getDescription())
|
||||||
.toEqual(isValueInvalid(completedTask.entry.description) ? CONSTANTS.TASK_DETAILS.NO_DESCRIPTION : completedTask.entry.description);
|
.toEqual(isValueInvalid(completedTask.entry.description) ? CONSTANTS.TASK_DETAILS.NO_DESCRIPTION : completedTask.entry.description);
|
||||||
@@ -166,6 +181,7 @@ describe('Task Header cloud component', () => {
|
|||||||
await tasksCloudDemoPage.taskFilterCloudComponent.clickMyTasksFilter();
|
await tasksCloudDemoPage.taskFilterCloudComponent.clickMyTasksFilter();
|
||||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(subTask.entry.name);
|
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(subTask.entry.name);
|
||||||
await tasksCloudDemoPage.taskListCloudComponent().selectRow(subTask.entry.name);
|
await tasksCloudDemoPage.taskListCloudComponent().selectRow(subTask.entry.name);
|
||||||
|
|
||||||
await expect(await taskHeaderCloudPage.getId()).toEqual(subTask.entry.id);
|
await expect(await taskHeaderCloudPage.getId()).toEqual(subTask.entry.id);
|
||||||
await expect(await taskHeaderCloudPage.getDescription())
|
await expect(await taskHeaderCloudPage.getDescription())
|
||||||
.toEqual(isValueInvalid(subTask.entry.description) ? CONSTANTS.TASK_DETAILS.NO_DESCRIPTION : subTask.entry.description);
|
.toEqual(isValueInvalid(subTask.entry.description) ? CONSTANTS.TASK_DETAILS.NO_DESCRIPTION : subTask.entry.description);
|
||||||
@@ -209,11 +225,14 @@ describe('Task Header cloud component', () => {
|
|||||||
await tasksCloudDemoPage.editTaskFilterCloud.openFilter();
|
await tasksCloudDemoPage.editTaskFilterCloud.openFilter();
|
||||||
await tasksCloudDemoPage.editTaskFilterCloud.setStatusFilterDropDown('ALL');
|
await tasksCloudDemoPage.editTaskFilterCloud.setStatusFilterDropDown('ALL');
|
||||||
await tasksCloudDemoPage.editTaskFilterCloud.clearAssignee();
|
await tasksCloudDemoPage.editTaskFilterCloud.clearAssignee();
|
||||||
|
|
||||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(unclaimedTask.entry.name);
|
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(unclaimedTask.entry.name);
|
||||||
await tasksCloudDemoPage.taskListCloudComponent().selectRow(unclaimedTask.entry.name);
|
await tasksCloudDemoPage.taskListCloudComponent().selectRow(unclaimedTask.entry.name);
|
||||||
await taskHeaderCloudPage.checkTaskPropertyListIsDisplayed();
|
await taskHeaderCloudPage.checkTaskPropertyListIsDisplayed();
|
||||||
|
|
||||||
const currentAssignee = await taskHeaderCloudPage.assigneeCardTextItem.getFieldValue();
|
const currentAssignee = await taskHeaderCloudPage.assigneeCardTextItem.getFieldValue();
|
||||||
await expect(currentAssignee).toBe('No assignee');
|
await expect(currentAssignee).toBe('No assignee');
|
||||||
|
|
||||||
await taskHeaderCloudPage.priorityCardTextItem.checkElementIsReadonly();
|
await taskHeaderCloudPage.priorityCardTextItem.checkElementIsReadonly();
|
||||||
await taskHeaderCloudPage.statusCardTextItem.checkElementIsReadonly();
|
await taskHeaderCloudPage.statusCardTextItem.checkElementIsReadonly();
|
||||||
});
|
});
|
||||||
|
@@ -1,4 +1,6 @@
|
|||||||
{
|
{
|
||||||
"C260249" : "REPO-4772 ACS 6.2"
|
"C260249" : "REPO-4772 ACS 6.2",
|
||||||
|
"C309674" : "https://issues.alfresco.com/jira/browse/ADF-5122",
|
||||||
|
"C315268" : "https://issues.alfresco.com/jira/browse/ADF-5123"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -19,6 +19,8 @@ import * as path from 'path';
|
|||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { NodeEntry } from '@alfresco/js-api/src/api/content-rest-api/model/nodeEntry';
|
import { NodeEntry } from '@alfresco/js-api/src/api/content-rest-api/model/nodeEntry';
|
||||||
|
import { ApiUtil } from '../../core/structure/api.util';
|
||||||
|
import { Logger } from '../../core/utils/logger';
|
||||||
|
|
||||||
export class UploadActions {
|
export class UploadActions {
|
||||||
alfrescoJsApi: AlfrescoApi = null;
|
alfrescoJsApi: AlfrescoApi = null;
|
||||||
@@ -64,7 +66,15 @@ export class UploadActions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async deleteFileOrFolder(nodeId) {
|
async deleteFileOrFolder(nodeId) {
|
||||||
|
const apiCall = async () => {
|
||||||
|
try {
|
||||||
return this.alfrescoJsApi.node.deleteNode(nodeId, { permanent: true });
|
return this.alfrescoJsApi.node.deleteNode(nodeId, { permanent: true });
|
||||||
|
} catch (error) {
|
||||||
|
Logger.error('Error delete file or folder');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return ApiUtil.waitForApi(apiCall, () => true);
|
||||||
}
|
}
|
||||||
|
|
||||||
async uploadFolder(sourcePath, folder) {
|
async uploadFolder(sourcePath, folder) {
|
||||||
|
@@ -275,6 +275,7 @@ export class DataTableComponentPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async waitTillContentLoaded(): Promise<void> {
|
async waitTillContentLoaded(): Promise<void> {
|
||||||
|
await browser.driver.sleep(500);
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.contents.first());
|
await BrowserVisibility.waitUntilElementIsVisible(this.contents.first());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -61,7 +61,7 @@ export class DateTimeWidgetPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async selectTime(time): Promise<void> {
|
async selectTime(time): Promise<void> {
|
||||||
const selectedTime = element(by.cssContainingText('div[class*="mat-datetimepicker-clock-cell"]', time));
|
const selectedTime = element.all(by.cssContainingText('div[class*="mat-datetimepicker-clock-cell"]', time)).first();
|
||||||
await BrowserActions.click(selectedTime);
|
await BrowserActions.click(selectedTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -68,9 +68,14 @@ export class PeopleCloudComponentPage {
|
|||||||
return this.assigneeChipList.all(by.css('mat-chip')).first().getText();
|
return this.assigneeChipList.all(by.css('mat-chip')).first().getText();
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkUserIsDisplayed(name: string): Promise<void> {
|
async checkUserIsDisplayed(name: string): Promise<boolean> {
|
||||||
|
try {
|
||||||
const assigneeRow = element(by.cssContainingText('mat-option span.adf-people-label-name', name));
|
const assigneeRow = element(by.cssContainingText('mat-option span.adf-people-label-name', name));
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(assigneeRow);
|
await BrowserVisibility.waitUntilElementIsVisible(assigneeRow);
|
||||||
|
return true;
|
||||||
|
} catch {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkUserIsNotDisplayed(name: string): Promise<void> {
|
async checkUserIsNotDisplayed(name: string): Promise<void> {
|
||||||
@@ -78,12 +83,12 @@ export class PeopleCloudComponentPage {
|
|||||||
await BrowserVisibility.waitUntilElementIsNotVisible(assigneeRow);
|
await BrowserVisibility.waitUntilElementIsNotVisible(assigneeRow);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkOptionIsDisplayed(): Promise <void> {
|
async checkOptionIsDisplayed(): Promise<void> {
|
||||||
const optionList = element(by.css('.adf-people-cloud-list'));
|
const optionList = element(by.css('.adf-people-cloud-list'));
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(optionList);
|
await BrowserVisibility.waitUntilElementIsVisible(optionList);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkOptionIsNotDisplayed(): Promise <void> {
|
async checkOptionIsNotDisplayed(): Promise<void> {
|
||||||
const optionList = element(by.css('.adf-people-cloud-list'));
|
const optionList = element(by.css('.adf-people-cloud-list'));
|
||||||
await BrowserVisibility.waitUntilElementIsNotVisible(optionList);
|
await BrowserVisibility.waitUntilElementIsNotVisible(optionList);
|
||||||
}
|
}
|
||||||
@@ -129,7 +134,7 @@ export class PeopleCloudComponentPage {
|
|||||||
await BrowserActions.click(peopleInput);
|
await BrowserActions.click(peopleInput);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkPeopleWidgetIsReadOnly (): Promise <boolean> {
|
async checkPeopleWidgetIsReadOnly(): Promise<boolean> {
|
||||||
const readOnlyAttribute = element(by.css('people-cloud-widget .adf-readonly'));
|
const readOnlyAttribute = element(by.css('people-cloud-widget .adf-readonly'));
|
||||||
try {
|
try {
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(readOnlyAttribute);
|
await BrowserVisibility.waitUntilElementIsVisible(readOnlyAttribute);
|
||||||
@@ -139,7 +144,7 @@ export class PeopleCloudComponentPage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkPeopleActiveField(name): Promise <boolean> {
|
async checkPeopleActiveField(name): Promise<boolean> {
|
||||||
const activePeopleField = element(by.css('people-cloud-widget .adf-readonly'));
|
const activePeopleField = element(by.css('people-cloud-widget .adf-readonly'));
|
||||||
try {
|
try {
|
||||||
await BrowserActions.clearSendKeys(activePeopleField, name);
|
await BrowserActions.clearSendKeys(activePeopleField, name);
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
import { BrowserVisibility } from '../../core/utils/browser-visibility';
|
import { BrowserVisibility } from '../../core/utils/browser-visibility';
|
||||||
import { DataTableComponentPage } from '../../core/pages/data-table-component.page';
|
import { DataTableComponentPage } from '../../core/pages/data-table-component.page';
|
||||||
import { element, by, ElementFinder, Locator } from 'protractor';
|
import { element, by, ElementFinder, Locator, browser } from 'protractor';
|
||||||
import { BrowserActions } from '../../core/utils/browser-actions';
|
import { BrowserActions } from '../../core/utils/browser-actions';
|
||||||
|
|
||||||
export class ProcessListCloudComponentPage {
|
export class ProcessListCloudComponentPage {
|
||||||
@@ -105,6 +105,7 @@ export class ProcessListCloudComponentPage {
|
|||||||
async clickOptionsButton(content: string): Promise<void> {
|
async clickOptionsButton(content: string): Promise<void> {
|
||||||
await BrowserActions.closeMenuAndDialogs();
|
await BrowserActions.closeMenuAndDialogs();
|
||||||
const row: ElementFinder = this.dataTable.getRow('Id', content);
|
const row: ElementFinder = this.dataTable.getRow('Id', content);
|
||||||
|
await browser.sleep(1000);
|
||||||
await BrowserActions.click(row.element(this.optionButton));
|
await BrowserActions.click(row.element(this.optionButton));
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.actionMenu);
|
await BrowserVisibility.waitUntilElementIsVisible(this.actionMenu);
|
||||||
}
|
}
|
||||||
|
@@ -84,6 +84,6 @@ export class TaskHeaderCloudPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async checkTaskPropertyListIsDisplayed(): Promise<void> {
|
async checkTaskPropertyListIsDisplayed(): Promise<void> {
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(this.taskPropertyList);
|
await BrowserVisibility.waitUntilElementIsVisible(this.taskPropertyList, 90000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user