Add complete task tests (#4639)

This commit is contained in:
cristinaj
2019-04-25 02:27:45 +03:00
committed by Eugenio Romano
parent 0f63122a27
commit 83cb98f435
4 changed files with 217 additions and 0 deletions

View File

@@ -27,5 +27,6 @@ export * from './process-list-cloud-component.page';
export * from './task-filters-cloud-component.page';
export * from './task-list-cloud-component.page';
export * from './start-process-cloud-component.page';
export * from './task-form-cloud-component.page';
export * from './dialog/public-api';

View File

@@ -0,0 +1,48 @@
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { element, by } from 'protractor';
import { BrowserVisibility } from '../../core/utils/browser-visibility';
export class TaskFormCloudComponent {
cancelButton = element(by.css("button[id='adf-cloud-cancel-task']"));
completeButton = element(by.css('button[adf-cloud-complete-task]'));
checkCompleteButtonIsDisplayed() {
BrowserVisibility.waitUntilElementIsVisible(this.completeButton);
return this;
}
checkCompleteButtonIsNotDisplayed() {
BrowserVisibility.waitUntilElementIsNotVisible(this.completeButton);
return this;
}
clickCompleteButton() {
BrowserVisibility.waitUntilElementIsVisible(this.completeButton);
this.completeButton.click();
return this;
}
clickCancelButton() {
BrowserVisibility.waitUntilElementIsVisible(this.cancelButton);
this.cancelButton.click();
return this;
}
}