[ADF-3282] Add tests for length validation process/task name (#4083)

* add test for task name length validation

* add test for process name length validation

* add blur method

* modify number of characters
This commit is contained in:
rgherghelas
2018-12-19 13:15:24 +02:00
committed by Eugenio Romano
parent 0357adc641
commit 6a6e9f3b39
4 changed files with 49 additions and 2 deletions

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { element, by } from 'protractor';
import { element, by, Key } from 'protractor';
import { Util } from '../../../../util/util';
export class StartTaskDialog {
@@ -103,4 +103,16 @@ export class StartTaskDialog {
Util.waitUntilElementIsClickable(this.cancelButton);
return this.cancelButton.click();
}
blur(locator) {
locator.click();
locator.sendKeys(Key.TAB);
return this;
}
checkValidationErrorIsDisplayed(error, elementRef = 'mat-error') {
const errorElement = element(by.cssContainingText(elementRef, error));
Util.waitUntilElementIsVisible(errorElement);
return this;
}
}