mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
Merge branch 'development' into next-release-3.2.0
This commit is contained in:
@@ -25,7 +25,7 @@ import { LoginPage } from '../../../pages/adf/loginPage';
|
||||
describe('Login component - SSO', () => {
|
||||
|
||||
const settingsPage = new SettingsPage();
|
||||
const loginApsPage = new LoginSSOPage();
|
||||
const loginSSOPage = new LoginSSOPage();
|
||||
const loginPage = new LoginPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
@@ -42,13 +42,13 @@ describe('Login component - SSO', () => {
|
||||
|
||||
it('[C261050] Should be possible login with SSO', () => {
|
||||
settingsPage.setProviderEcmSso(TestConfig.adf.url, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, false, true, 'alfresco');
|
||||
loginApsPage.clickOnSSOButton();
|
||||
loginApsPage.loginSSOIdentityService(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
||||
loginSSOPage.clickOnSSOButton();
|
||||
loginSSOPage.loginSSOIdentityService(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
||||
});
|
||||
|
||||
it('[C280667] Should be redirect directly to keycloak without show the login page with silent login', () => {
|
||||
settingsPage.setProviderEcmSso(TestConfig.adf.url, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, true, true, 'alfresco');
|
||||
loginApsPage.loginSSOIdentityService(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
||||
loginSSOPage.loginSSOIdentityService(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -56,9 +56,9 @@ describe('Login component - SSO', () => {
|
||||
|
||||
it('[C299205] Should display the login error message when the SSO identity service is wrongly configured', () => {
|
||||
settingsPage.setProviderEcmSso(TestConfig.adf.url, 'http://aps22/auth/realms/alfresco', TestConfig.adf.hostIdentity, false, true, 'alfresco');
|
||||
loginApsPage.clickOnSSOButton();
|
||||
loginApsPage.checkLoginErrorIsDisplayed();
|
||||
expect(loginApsPage.getLoginErrorMessage()).toContain('SSO Authentication server unreachable');
|
||||
loginSSOPage.clickOnSSOButton();
|
||||
loginSSOPage.checkLoginErrorIsDisplayed();
|
||||
expect(loginSSOPage.getLoginErrorMessage()).toContain('SSO Authentication server unreachable');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -93,4 +93,15 @@ describe('Login component - SSO', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('[C280665] Should be possible change the logout redirect URL', () => {
|
||||
settingsPage.setProviderEcmSso(TestConfig.adf.url, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, false, true, 'alfresco', '/login');
|
||||
loginSSOPage.clickOnSSOButton();
|
||||
loginSSOPage.loginSSOIdentityService(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
||||
navigationBarPage.clickLogoutButton();
|
||||
|
||||
browser.getCurrentUrl().then((actualUrl) => {
|
||||
expect(actualUrl).toEqual(TestConfig.adf.url + '/login');
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@@ -33,7 +33,6 @@ export class NavigationBarPage {
|
||||
processServicesNestedButton = element(by.css('button[data-automation-id="App"]'));
|
||||
processServicesCloudButton = element(by.css('a[data-automation-id="Process Cloud"]'));
|
||||
processServicesCloudHomeButton = element(by.css('button[data-automation-id="Home"]'));
|
||||
processServicesCloudPeopleGroupButton = element(by.css('button[data-automation-id="People/Group Cloud"]'));
|
||||
loginButton = element(by.css('a[data-automation-id="Login"]'));
|
||||
trashcanButton = element(by.css('a[data-automation-id="Trashcan"]'));
|
||||
overlayViewerButton = element(by.css('a[data-automation-id="Overlay Viewer"]'));
|
||||
@@ -50,7 +49,7 @@ export class NavigationBarPage {
|
||||
iconsButton = element(by.css('a[data-automation-id="Icons"]'));
|
||||
customSourcesButton = element(by.css('a[data-automation-id="Custom Sources"]'));
|
||||
settingsButton = element(by.css('a[data-automation-id="Settings"]'));
|
||||
peopleGroupCloud = element(by.css('a[data-automation-id="People/Group Cloud"]'));
|
||||
peopleGroupCloudButton = element(by.css('button[data-automation-id="People/Group Cloud"]'));
|
||||
aboutButton = element(by.css('a[data-automation-id="About"]'));
|
||||
|
||||
navigateToDatatable() {
|
||||
@@ -92,8 +91,10 @@ export class NavigationBarPage {
|
||||
}
|
||||
|
||||
navigateToPeopleGroupCloudPage() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.peopleGroupCloud);
|
||||
this.peopleGroupCloud.click();
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.processServicesCloudButton);
|
||||
this.processServicesCloudButton.click();
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.peopleGroupCloudButton);
|
||||
this.peopleGroupCloudButton.click();
|
||||
return new PeopleGroupCloudComponentPage();
|
||||
}
|
||||
|
||||
|
||||
@@ -180,7 +180,7 @@ export class EditTaskFilterCloudComponent {
|
||||
}
|
||||
|
||||
clickSaveAsButton() {
|
||||
const disabledButton = element(by.css(("button[id='adf-save-as-id'][disabled]")));
|
||||
let disabledButton = element(by.css(("button[data-automation-id='adf-filter-action-saveAs'][disabled]")));
|
||||
BrowserVisibility.waitUntilElementIsClickable(this.saveAsButton);
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.saveAsButton);
|
||||
BrowserVisibility.waitUntilElementIsNotVisible(disabledButton);
|
||||
|
||||
@@ -43,7 +43,7 @@ export class TaskDetailsPage {
|
||||
involvePeopleButton = element(by.css('div[class*="add-people"]'));
|
||||
addPeopleField = element(by.css('input[data-automation-id="adf-people-search-input"]'));
|
||||
addInvolvedUserButton = element(by.css('button[id="add-people"] span'));
|
||||
emailInvolvedUser = by.xpath('following-sibling::div[@class="adf-people-email ng-star-inserted"]');
|
||||
emailInvolvedUser = by.xpath('following-sibling::div[@class="adf-people-email"]');
|
||||
editActionInvolvedUser = by.xpath('following-sibling::div[@class="adf-people-edit-label ng-star-inserted"]');
|
||||
involvedUserPic = by.xpath('ancestor::div/ancestor::div/preceding-sibling::div//div[@class="adf-people-search-people-pic ng-star-inserted"]');
|
||||
taskDetailsInfoDrawer = element(by.tagName('adf-info-drawer'));
|
||||
@@ -232,6 +232,7 @@ export class TaskDetailsPage {
|
||||
addComment(comment) {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.commentField);
|
||||
this.commentField.sendKeys(comment);
|
||||
Util.waitUntilElementIsVisible(this.addCommentButton);
|
||||
this.addCommentButton.click();
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -44,6 +44,7 @@ export class SettingsPage {
|
||||
bpmText = element(by.css('input[data-automation-id*="bpmHost"]'));
|
||||
clientIdText = element(by.css('input[id="clientId"]'));
|
||||
authHostText = element(by.css('input[id="oauthHost"]'));
|
||||
logoutUrlText = element(by.css('input[id="logout-url"]'));
|
||||
basicAuthRadioButton = element(by.cssContainingText('mat-radio-button[id*="mat-radio"]', 'Basic Authentication'));
|
||||
identityHostText = element(by.css('input[id="identityHost"]'));
|
||||
ssoRadioButton = element(by.cssContainingText('[id*="mat-radio"]', 'SSO'));
|
||||
@@ -140,7 +141,7 @@ export class SettingsPage {
|
||||
await this.ssoRadioButton.click();
|
||||
}
|
||||
|
||||
async setProviderEcmSso(contentServiceURL, authHost, identityHost, silentLogin = true, implicitFlow = true, clientId?: string) {
|
||||
async setProviderEcmSso(contentServiceURL, authHost, identityHost, silentLogin = true, implicitFlow = true, clientId?: string, logoutUr: string = '/logout') {
|
||||
this.goToSettingsPage();
|
||||
this.setProvider(this.ecm.option, this.ecm.text);
|
||||
BrowserVisibility.waitUntilElementIsNotOnPage(this.bpmText);
|
||||
@@ -152,6 +153,7 @@ export class SettingsPage {
|
||||
await this.setIdentityHost(identityHost);
|
||||
await this.setSilentLogin(silentLogin);
|
||||
await this.setImplicitFlow(implicitFlow);
|
||||
await this.setLogoutUrl(logoutUr);
|
||||
await this.clickApply();
|
||||
}
|
||||
|
||||
@@ -170,6 +172,12 @@ export class SettingsPage {
|
||||
await this.clickApply();
|
||||
}
|
||||
|
||||
async setLogoutUrl(logoutUrl) {
|
||||
Util.waitUntilElementIsPresent(this.logoutUrlText);
|
||||
this.logoutUrlText.clear();
|
||||
this.logoutUrlText.sendKeys(logoutUrl);
|
||||
}
|
||||
|
||||
async setProcessServicesURL(processServiceURL) {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.bpmText);
|
||||
this.bpmText.clear();
|
||||
|
||||
@@ -133,12 +133,12 @@ describe('Edit task filters cloud', () => {
|
||||
expect(tasksCloudDemoPage.getActiveFilterName()).toBe('New');
|
||||
tasksCloudDemoPage.editTaskFilterCloudComponent().clickCustomiseFilterHeader();
|
||||
expect(tasksCloudDemoPage.editTaskFilterCloudComponent().getSortFilterDropDownValue()).toEqual('Id');
|
||||
tasksCloudDemoPage.editTaskFilterCloudComponent().setSortFilterDropDown('PRIORITY');
|
||||
tasksCloudDemoPage.editTaskFilterCloudComponent().setSortFilterDropDown('Priority');
|
||||
tasksCloudDemoPage.editTaskFilterCloudComponent().clickSaveAsButton();
|
||||
tasksCloudDemoPage.editTaskFilterCloudComponent().editTaskFilterDialog().setFilterName('New').clickOnSaveButton();
|
||||
expect(tasksCloudDemoPage.getActiveFilterName()).toBe('New');
|
||||
tasksCloudDemoPage.editTaskFilterCloudComponent().clickCustomiseFilterHeader();
|
||||
expect(tasksCloudDemoPage.editTaskFilterCloudComponent().getSortFilterDropDownValue()).toEqual('PRIORITY');
|
||||
expect(tasksCloudDemoPage.editTaskFilterCloudComponent().getSortFilterDropDownValue()).toEqual('Priority');
|
||||
tasksCloudDemoPage.editTaskFilterCloudComponent().clickDeleteButton();
|
||||
tasksCloudDemoPage.customTaskFilter('custom-new').clickTaskFilter();
|
||||
tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkSpinnerIsNotDisplayed();
|
||||
@@ -180,8 +180,8 @@ describe('Edit task filters cloud', () => {
|
||||
|
||||
it('[C291800] Task filter should not be created when task filter dialog is closed', () => {
|
||||
tasksCloudDemoPage.myTasksFilter().clickTaskFilter();
|
||||
tasksCloudDemoPage.editTaskFilterCloudComponent().clickCustomiseFilterHeader().setSortFilterDropDown('PRIORITY');
|
||||
expect(tasksCloudDemoPage.editTaskFilterCloudComponent().getSortFilterDropDownValue()).toEqual('PRIORITY');
|
||||
tasksCloudDemoPage.editTaskFilterCloudComponent().clickCustomiseFilterHeader().setSortFilterDropDown('Priority');
|
||||
expect(tasksCloudDemoPage.editTaskFilterCloudComponent().getSortFilterDropDownValue()).toEqual('Priority');
|
||||
tasksCloudDemoPage.editTaskFilterCloudComponent().clickSaveAsButton();
|
||||
expect(tasksCloudDemoPage.editTaskFilterCloudComponent().editTaskFilterDialog().getFilterName()).toEqual('My Tasks');
|
||||
tasksCloudDemoPage.editTaskFilterCloudComponent().editTaskFilterDialog().setFilterName('Cancel');
|
||||
|
||||
@@ -57,11 +57,28 @@ describe('Process list cloud', () => {
|
||||
navigationBarPage.clickConfigEditorButton();
|
||||
configEditorPage.clickEditProcessCloudConfiguration();
|
||||
configEditorPage.clickClearButton();
|
||||
configEditorPage.enterConfiguration('{' +
|
||||
'"properties": [' +
|
||||
'"appName",' + '"state",' + '"processInstanceId",' + '"sort",' + '"order"' +
|
||||
']' +
|
||||
'}');
|
||||
configEditorPage.enterBigConfigurationText(`{
|
||||
"filterProperties": [
|
||||
"appName",
|
||||
"status",
|
||||
"processInstanceId",
|
||||
"order",
|
||||
"sort",
|
||||
"order"
|
||||
],
|
||||
"sortProperties": [
|
||||
"id",
|
||||
"name",
|
||||
"status",
|
||||
"startDate"
|
||||
],
|
||||
"actions": [
|
||||
"save",
|
||||
"saveAs",
|
||||
"delete"
|
||||
]
|
||||
}`);
|
||||
|
||||
configEditorPage.clickSaveButton();
|
||||
|
||||
const apiService = new ApiService('activiti', TestConfig.adf.url, TestConfig.adf.hostSso, 'BPM');
|
||||
|
||||
@@ -78,14 +78,36 @@ describe('Edit task filters and task list properties', () => {
|
||||
configEditorPage.clickEditTaskConfiguration();
|
||||
configEditorPage.clickClearButton();
|
||||
browser.driver.sleep(5000);
|
||||
configEditorPage.enterConfiguration('{' +
|
||||
'"properties": [' +
|
||||
'"appName",' + '"status",' + '"assignee",' +
|
||||
'"taskName",' + '"parentTaskId",' + '"priority",' +
|
||||
'"standAlone",' + '"owner",' + '"processDefinitionId",' + '"processInstanceId",' +
|
||||
'"lastModifiedFrom",' + '"lastModifiedTo",' + '"sort",' + '"order"' +
|
||||
']' +
|
||||
'}');
|
||||
configEditorPage.enterBigConfigurationText(`{
|
||||
"filterProperties": [
|
||||
"appName",
|
||||
"status",
|
||||
"assignee",
|
||||
"taskName",
|
||||
"parentTaskId",
|
||||
"priority",
|
||||
"standAlone",
|
||||
"owner",
|
||||
"processDefinitionId",
|
||||
"processInstanceId",
|
||||
"lastModified",
|
||||
"sort",
|
||||
"order"
|
||||
],
|
||||
"sortProperties": [
|
||||
"id",
|
||||
"name",
|
||||
"createdDate",
|
||||
"priority",
|
||||
"processDefinitionId"
|
||||
],
|
||||
"actions": [
|
||||
"save",
|
||||
"saveAs",
|
||||
"delete"
|
||||
]
|
||||
}`);
|
||||
|
||||
configEditorPage.clickSaveButton();
|
||||
|
||||
const apiService = new ApiService('activiti', TestConfig.adf.url, TestConfig.adf.hostSso, 'BPM');
|
||||
|
||||
@@ -159,6 +159,7 @@ describe('Search Sorting Picker', () => {
|
||||
configEditor.clickSearchConfiguration();
|
||||
configEditor.clickClearButton();
|
||||
jsonFile.sorting.options[0].ascending = false;
|
||||
jsonFile.sorting.defaults[0] = { 'key': 'Size', 'label': 'Size', 'type': 'FIELD', 'field': 'content.size', 'ascending': true };
|
||||
configEditor.enterBigConfigurationText(JSON.stringify(jsonFile));
|
||||
configEditor.clickSaveButton();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user