mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-19 17:14:57 +00:00
[ADF-3284] ProcessFilter - the method ngOnChange doesn't check the property filterParam (e2e) (#3660)
* E2E for process filters urls * Putting the test in an existing spec
This commit is contained in:
parent
eff7c4dfb5
commit
dc797feacb
e2e
@ -29,6 +29,7 @@ import AlfrescoApi = require('alfresco-js-api-node');
|
||||
|
||||
import { AppsActions } from '../actions/APS/apps.actions';
|
||||
import { UsersActions } from '../actions/users.actions';
|
||||
import { browser } from 'protractor';
|
||||
|
||||
describe('Process Filters Test', () => {
|
||||
|
||||
@ -39,6 +40,7 @@ describe('Process Filters Test', () => {
|
||||
let processFiltersPage = new ProcessFiltersPage();
|
||||
let appNavigationBarPage = new AppNavigationBarPage();
|
||||
let processDetailsPage = new ProcessDetailsPage();
|
||||
let appModel;
|
||||
|
||||
let app = resources.Files.APP_WITH_DATE_FIELD_FORM;
|
||||
|
||||
@ -67,7 +69,7 @@ describe('Process Filters Test', () => {
|
||||
|
||||
await this.alfrescoJsApi.login(user.email, user.password);
|
||||
|
||||
await apps.importPublishDeployApp(this.alfrescoJsApi, app.file_location);
|
||||
appModel = await apps.importPublishDeployApp(this.alfrescoJsApi, app.file_location);
|
||||
|
||||
await loginPage.loginToProcessServicesUsingUserModel(user);
|
||||
|
||||
@ -124,4 +126,32 @@ describe('Process Filters Test', () => {
|
||||
processFiltersPage.selectFromProcessList(processTitle.completed);
|
||||
processDetailsPage.checkProcessDetailsCard();
|
||||
});
|
||||
|
||||
it('[C280407] Should be able to access the filters with URL', async () => {
|
||||
|
||||
let defaultFiltersNumber = 3;
|
||||
let deployedApp, processFilterUrl;
|
||||
|
||||
let taskAppFilters = await browser.controlFlow().execute(async() => {
|
||||
|
||||
let appDefinitions = await this.alfrescoJsApi.activiti.appsApi.getAppDefinitions();
|
||||
|
||||
deployedApp = appDefinitions.data.find((currentApp) => {
|
||||
|
||||
return currentApp.modelId === appModel.id;
|
||||
});
|
||||
|
||||
processFilterUrl = TestConfig.adf.url + '/activiti/apps/' + deployedApp.id + '/processes/';
|
||||
|
||||
return this.alfrescoJsApi.activiti.userFiltersApi.getUserProcessInstanceFilters({appId: deployedApp.id});
|
||||
});
|
||||
|
||||
expect(taskAppFilters.size).toBe(defaultFiltersNumber);
|
||||
|
||||
taskAppFilters.data.forEach((filter) => {
|
||||
browser.get(processFilterUrl + filter.id);
|
||||
processServicesPage.checkProcessListIsDisplayed();
|
||||
processFiltersPage.checkFilterIsHighlighted(filter.name);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -16,17 +16,12 @@
|
||||
*/
|
||||
|
||||
var exports = module.exports = {};
|
||||
var http = require('http');
|
||||
var https = require('https');
|
||||
|
||||
var fs = require('fs');
|
||||
var FormData = require('form-data');
|
||||
var path = require('path');
|
||||
|
||||
var until = protractor.ExpectedConditions;
|
||||
var TestConfig = require('../test.config');
|
||||
var moment = require('moment');
|
||||
var CONSTANTS = require('./constants');
|
||||
|
||||
var DEFAULT_TIMEOUT = parseInt(TestConfig.main.timeout);
|
||||
/**
|
||||
@ -35,9 +30,6 @@ var DEFAULT_TIMEOUT = parseInt(TestConfig.main.timeout);
|
||||
* @class util.Util
|
||||
*/
|
||||
|
||||
// Dynamically load http or https library based on protocol chosen
|
||||
var apiRequest = TestConfig.main.protocol !== 'http' ? https : http;
|
||||
|
||||
/**
|
||||
* creates an absolute path string if multiple file uploads are required
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user