mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
@@ -17,10 +17,10 @@
|
||||
|
||||
import { browser } from 'protractor';
|
||||
import { ModelsActions, createApiService, ApplicationsUtil, LoginPage, UsersActions } from '@alfresco/adf-testing';
|
||||
import { ProcessServicesPage } from './../pages/process-services.page';
|
||||
import { ProcessServicesPage } from '../pages/process-services.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { AppDefinitionsApi } from '@alfresco/js-api';
|
||||
import { AppDefinitionRepresentation, AppDefinitionsApi } from '@alfresco/js-api';
|
||||
|
||||
describe('Modify applications', () => {
|
||||
|
||||
@@ -39,7 +39,8 @@ describe('Modify applications', () => {
|
||||
const applicationService = new ApplicationsUtil(apiService);
|
||||
const appsApi = new AppDefinitionsApi(apiService.getInstance());
|
||||
|
||||
let firstApp; let appVersionToBeDeleted;
|
||||
let firstApp: AppDefinitionRepresentation;
|
||||
let appVersionToBeDeleted: AppDefinitionRepresentation;
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
@@ -131,7 +132,7 @@ describe('Modify applications', () => {
|
||||
name: appToBeDeleted.title,
|
||||
description: newDescription,
|
||||
definition: {
|
||||
models: [firstApp.definition.models[0]],
|
||||
models: [firstApp['definition'].models[0]],
|
||||
theme: 'theme-4',
|
||||
icon: 'glyphicon-user'
|
||||
}
|
||||
|
||||
@@ -15,16 +15,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createApiService, ApplicationsUtil, LoginPage, TaskUtil, UsersActions } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from './../pages/tasks.page';
|
||||
import { ProcessServicesPage } from './../pages/process-services.page';
|
||||
import { ChecklistDialog } from './../pages/dialog/create-checklist-dialog.page';
|
||||
import { createApiService, ApplicationsUtil, LoginPage, TaskUtil, UsersActions, UserModel } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../pages/tasks.page';
|
||||
import { ProcessServicesPage } from '../pages/process-services.page';
|
||||
import { ChecklistDialog } from '../pages/dialog/create-checklist-dialog.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import { browser } from 'protractor';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
|
||||
describe('Checklist component', () => {
|
||||
|
||||
const app = browser.params.resources.Files.SIMPLE_APP_WITH_USER_FORM;
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
@@ -38,11 +37,16 @@ describe('Checklist component', () => {
|
||||
const applicationService = new ApplicationsUtil(apiService);
|
||||
const taskUtil = new TaskUtil(apiService);
|
||||
|
||||
let processUserModel;
|
||||
let processUserModel: UserModel;
|
||||
|
||||
const tasks = ['no checklist created task', 'checklist number task', 'remove running checklist', 'remove completed checklist', 'hierarchy'];
|
||||
const checklists = ['cancelCheckList', 'dialogChecklist', 'addFirstChecklist', 'addSecondChecklist'];
|
||||
const removeChecklist = ['removeFirstRunningChecklist', 'removeSecondRunningChecklist', 'removeFirstCompletedChecklist', 'removeSecondCompletedChecklist'];
|
||||
const removeChecklist = [
|
||||
'removeFirstRunningChecklist',
|
||||
'removeSecondRunningChecklist',
|
||||
'removeFirstCompletedChecklist',
|
||||
'removeSecondCompletedChecklist'
|
||||
];
|
||||
const hierarchyChecklist = ['checklistOne', 'checklistTwo', 'checklistOneChild', 'checklistTwoChild'];
|
||||
|
||||
beforeAll(async () => {
|
||||
@@ -54,19 +58,18 @@ describe('Checklist component', () => {
|
||||
|
||||
await apiService.login(processUserModel.username, processUserModel.password);
|
||||
|
||||
for (let i = 0; i < tasks.length; i++) {
|
||||
await taskUtil.createStandaloneTask(tasks[i]);
|
||||
for (const item of tasks) {
|
||||
await taskUtil.createStandaloneTask(item);
|
||||
}
|
||||
|
||||
await loginPage.login(processUserModel.username, processUserModel.password);
|
||||
});
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await navigationBarPage.navigateToProcessServicesPage();
|
||||
await (await processServices.goToTaskApp()).clickTasksButton();
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
});
|
||||
});
|
||||
|
||||
it('[C279976] Should no checklist be created when no title is typed', async () => {
|
||||
await taskPage.tasksListPage().checkContentIsDisplayed(tasks[0]);
|
||||
@@ -93,7 +96,7 @@ describe('Checklist component', () => {
|
||||
await taskPage.tasksListPage().checkContentIsDisplayed(tasks[0]);
|
||||
await taskPage.tasksListPage().selectRow(tasks[0]);
|
||||
|
||||
await (await taskPage.clickOnAddChecklistButton());
|
||||
await await taskPage.clickOnAddChecklistButton();
|
||||
await taskPage.checkChecklistDialogIsDisplayed();
|
||||
await expect(await taskPage.usingCheckListDialog().getDialogTitle()).toEqual('New Check');
|
||||
await expect(await taskPage.usingCheckListDialog().getNameFieldPlaceholder()).toEqual('Name');
|
||||
@@ -122,7 +125,7 @@ describe('Checklist component', () => {
|
||||
await taskPage.tasksListPage().checkContentIsDisplayed(tasks[2]);
|
||||
await taskPage.tasksListPage().selectRow(tasks[2]);
|
||||
|
||||
await (await taskPage.clickOnAddChecklistButton());
|
||||
await await taskPage.clickOnAddChecklistButton();
|
||||
await taskPage.checkChecklistDialogIsDisplayed();
|
||||
await checklistDialog.addName(removeChecklist[0]);
|
||||
await checklistDialog.clickCreateChecklistButton();
|
||||
|
||||
@@ -15,21 +15,23 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createApiService,
|
||||
import {
|
||||
createApiService,
|
||||
ApplicationsUtil,
|
||||
DatePickerCalendarPage,
|
||||
DateUtil,
|
||||
LoginPage, ModelsActions,
|
||||
LoginPage,
|
||||
ModelsActions,
|
||||
UsersActions,
|
||||
Widget
|
||||
Widget,
|
||||
UserModel
|
||||
} from '@alfresco/adf-testing';
|
||||
import { ProcessFiltersPage } from './../pages/process-filters.page';
|
||||
import { ProcessServiceTabBarPage } from './../pages/process-service-tab-bar.page';
|
||||
import { ProcessFiltersPage } from '../pages/process-filters.page';
|
||||
import { ProcessServiceTabBarPage } from '../pages/process-service-tab-bar.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import { browser } from 'protractor';
|
||||
|
||||
describe('Dynamic Table', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const processFiltersPage = new ProcessFiltersPage();
|
||||
const processServiceTabBarPage = new ProcessServiceTabBarPage();
|
||||
@@ -41,18 +43,20 @@ describe('Dynamic Table', () => {
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const modelsActions = new ModelsActions(apiService);
|
||||
|
||||
let user; let tenantId; let appId;
|
||||
let user: UserModel;
|
||||
let tenantId: number;
|
||||
let appId: number;
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
user = await usersActions.createUser();
|
||||
tenantId = user.tenantId;
|
||||
});
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await usersActions.deleteTenant(tenantId);
|
||||
});
|
||||
});
|
||||
|
||||
describe('Date Picker', () => {
|
||||
const app = browser.params.resources.Files.DYNAMIC_TABLE_APP;
|
||||
|
||||
@@ -15,11 +15,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createApiService, FormPage, LoginPage, UsersActions, Widget } from '@alfresco/adf-testing';
|
||||
import { createApiService, FormPage, LoginPage, UserModel, UsersActions, Widget } from '@alfresco/adf-testing';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
|
||||
describe('Form Component', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const formPage = new FormPage();
|
||||
@@ -28,7 +27,8 @@ describe('Form Component', () => {
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
||||
let tenantId; let user;
|
||||
let tenantId: number;
|
||||
let user: UserModel;
|
||||
|
||||
const fields = {
|
||||
dateWidgetId: 'label7',
|
||||
@@ -92,5 +92,5 @@ describe('Form Component', () => {
|
||||
await formPage.checkErrorMessageForWidgetIsNotDisplayed(message.warningDate);
|
||||
await formPage.checkErrorMessageIsNotDisplayed(message.errorLogDate);
|
||||
await formPage.checkErrorLogMessage(message.errorLabel);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user