mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-3828] - e2e add assignee tests (#4221)
* add identity host * add test for assign user * clear assignee input field * added hostIdentity parameter * add test for default assignee user * add hostIdentity parameter * add test for remove assignee * add a new constant for start task name * add hostIdentitty in setProviderBpmSso method * remove duplicated method * fix test C291799 * fix test C291872
This commit is contained in:
committed by
Eugenio Romano
parent
673b0f6b5c
commit
2badd81634
@@ -251,10 +251,6 @@ export class DataTablePage {
|
||||
return this;
|
||||
}
|
||||
|
||||
checkSpinnerIsNotDisplayed() {
|
||||
Util.waitUntilElementIsNotOnPage(this.spinner);
|
||||
}
|
||||
|
||||
checkRowIsDisplayedByName(filename) {
|
||||
Util.waitUntilElementIsVisible(element.all(by.css(`div[filename="${filename}"]`)).first());
|
||||
}
|
||||
|
@@ -152,4 +152,18 @@ export class EditTaskFilterCloudComponent {
|
||||
return this;
|
||||
}
|
||||
|
||||
clearAssignment() {
|
||||
this.clearField(this.assignment);
|
||||
return this;
|
||||
}
|
||||
|
||||
clearField(locator) {
|
||||
Util.waitUntilElementIsVisible(locator);
|
||||
locator.getAttribute('value').then((result) => {
|
||||
for (let i = result.length; i >= 0; i--) {
|
||||
locator.sendKeys(protractor.Key.BACK_SPACE);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -57,6 +57,7 @@ export class StartTasksCloudComponent {
|
||||
|
||||
addAssignee(name) {
|
||||
Util.waitUntilElementIsVisible(this.assignee);
|
||||
this.assignee.clear();
|
||||
this.assignee.sendKeys(name);
|
||||
this.selectAssigneeFromList(name);
|
||||
return this;
|
||||
@@ -72,7 +73,7 @@ export class StartTasksCloudComponent {
|
||||
|
||||
getAssignee() {
|
||||
Util.waitUntilElementIsVisible(this.assignee);
|
||||
return this.assignee.getAttribute('placeholder');
|
||||
return this.assignee.getAttribute('value');
|
||||
}
|
||||
|
||||
clickStartButton() {
|
||||
|
@@ -44,8 +44,9 @@ 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"]'));
|
||||
ssoRadioButton = element(by.cssContainingText('mat-radio-button[id*="mat-radio"]', 'SSO'));
|
||||
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'));
|
||||
silentLoginToggleLabel = element(by.css('mat-slide-toggle[name="silentLogin"] label'));
|
||||
silentLoginToggleElement = element(by.css('mat-slide-toggle[name="silentLogin"]'));
|
||||
implicitFlowLabel = element(by.css('mat-slide-toggle[name="implicitFlow"] label'));
|
||||
@@ -139,7 +140,7 @@ export class SettingsPage {
|
||||
await this.ssoRadioButton.click();
|
||||
}
|
||||
|
||||
async setProviderBpmSso (processServiceURL, authHost, silentLogin = true, implicitFlow = true ) {
|
||||
async setProviderBpmSso (processServiceURL, authHost, identityHost, silentLogin = true, implicitFlow = true ) {
|
||||
this.goToSettingsPage();
|
||||
this.setProvider(this.bpm.option, this.bpm.text);
|
||||
Util.waitUntilElementIsVisible(this.bpmText);
|
||||
@@ -148,6 +149,7 @@ export class SettingsPage {
|
||||
await this.setClientId();
|
||||
await this.setProcessServicesURL(processServiceURL);
|
||||
await this.setAuthHost(authHost);
|
||||
await this.setIdentityHost(identityHost);
|
||||
await this.setSilentLogin(silentLogin);
|
||||
await this.setImplicitFlow(implicitFlow);
|
||||
await this.clickApply();
|
||||
@@ -191,6 +193,12 @@ export class SettingsPage {
|
||||
await this.authHostText.sendKeys(authHostURL);
|
||||
}
|
||||
|
||||
async setIdentityHost (identityHost) {
|
||||
Util.waitUntilElementIsVisible(this.identityHostText);
|
||||
await this.identityHostText.clear();
|
||||
await this.identityHostText.sendKeys(identityHost);
|
||||
}
|
||||
|
||||
async clickApply () {
|
||||
Util.waitUntilElementIsVisible(this.applyButton);
|
||||
await this.applyButton.click();
|
||||
|
Reference in New Issue
Block a user