mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
remove not needed spaces (#5495)
* remove not usefull spaces * increase timeout * increase timeout * fix
This commit is contained in:
@@ -1,60 +0,0 @@
|
||||
/*!
|
||||
* @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 {
|
||||
LoginSSOPage,
|
||||
BrowserActions, FormPage, ProcessCloudWidgetPage, FormCloudComponentPage
|
||||
} from '@alfresco/adf-testing';
|
||||
import { browser } from 'protractor';
|
||||
import { customDateFormAPS2 } from '../../resources/forms/custom-date-form';
|
||||
|
||||
describe('Form Field Component - Dropdown Widget', () => {
|
||||
const loginSSOPage = new LoginSSOPage();
|
||||
const widget = new ProcessCloudWidgetPage();
|
||||
const dateWidget = widget.dateWidget();
|
||||
|
||||
const formDemoPage = new FormCloudComponentPage();
|
||||
const formJson = JSON.parse(customDateFormAPS2);
|
||||
const formPage = new FormPage();
|
||||
|
||||
beforeAll(async () => {
|
||||
await loginSSOPage.loginSSOIdentityService(browser.params.testConfig.hrUser.email, browser.params.testConfig.hrUser.password);
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlFormDemoPage = `${browser.params.testConfig.adf.url}/form-cloud`;
|
||||
await BrowserActions.getUrl(urlFormDemoPage);
|
||||
});
|
||||
|
||||
it('[C313199] Should display the validation for min and max date values with custom date format', async () => {
|
||||
await formDemoPage.setConfigToEditor(formJson);
|
||||
await dateWidget.setDateInput('datefield', '18-7-19');
|
||||
await formPage.saveForm();
|
||||
await expect(await dateWidget.getErrorMessage('datefield'))
|
||||
.toBe('Can\'t be less than 19-7-19', 'Min date validation is not working');
|
||||
await dateWidget.clearDateInput('datefield');
|
||||
await dateWidget.setDateInput('datefield', '20-7-19');
|
||||
await formPage.saveForm();
|
||||
await expect(await dateWidget.getErrorMessage('datefield'))
|
||||
.toBe('Can\'t be greater than 19-8-19', 'Max date validation is not working');
|
||||
await dateWidget.clearDateInput('datefield');
|
||||
await dateWidget.setDateInput('datefield', '19-7-19');
|
||||
await formPage.saveForm();
|
||||
await dateWidget.checkErrorMessageIsNotDisplayed('datefield');
|
||||
});
|
||||
|
||||
});
|
||||
@@ -83,8 +83,7 @@ describe('Form Field Component - Dropdown Widget', () => {
|
||||
afterAll(async () => {
|
||||
await apiService.login(browser.params.identityAdmin.email, browser.params.identityAdmin.password);
|
||||
await identityService.deleteIdentityUser(testUser.idIdentityService);
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.navigateToProcessServicesCloudPage();
|
||||
@@ -118,5 +117,4 @@ describe('Form Field Component - Dropdown Widget', () => {
|
||||
await expect(await dropdown.getSelectedOptionText('Dropdown097maj')).toBe('Clementine Bauch');
|
||||
await taskFormCloudComponent.checkCompleteButtonIsNotDisplayed();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -185,5 +185,4 @@ describe('People and Group of people Widgets', () => {
|
||||
await expect(await formPage.isSaveButtonDisabled()).toBe(false);
|
||||
await expect(await formPage.isValidationIconBlue()).toBe(true);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -163,5 +163,4 @@ describe('Task cloud visibility', async () => {
|
||||
|
||||
await taskFormCloudComponent.clickCompleteButton();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -205,5 +205,4 @@ describe('Visibility conditions on tabs - cloud', () => {
|
||||
await widget.textWidget().setValue(widgets.textThreeId, value.notDisplayTab);
|
||||
await widget.tab().checkTabIsDisplayedByLabel(tab.tabNextOperators);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -183,8 +183,7 @@ describe('Visibility conditions - cloud', () => {
|
||||
|
||||
await widget.checkboxWidget().clickCheckboxInput('Checkbox2');
|
||||
await widget.checkboxWidget().isCheckboxHidden(checkbox.checkbox1);
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
it('[C309650] Should be able to see Checkbox widget when has multiple visibility conditions and next condition operators', async () => {
|
||||
let text1, text2;
|
||||
@@ -266,8 +265,7 @@ describe('Visibility conditions - cloud', () => {
|
||||
|
||||
const textDisplayWidgetNoCondition = await widget.displayValueWidget().getFieldValue(displayValueString.displayValueNoConditionField);
|
||||
await expect(textDisplayWidgetNoCondition).toEqual('No cats');
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
it('[C309869] Should be able to see Display text widget when visibility condition refers to a form variable and a field', async () => {
|
||||
await formCloudDemoPage.setConfigToEditor(displayValueTextJson);
|
||||
@@ -288,8 +286,7 @@ describe('Visibility conditions - cloud', () => {
|
||||
textOneField = await widget.textWidget().getFieldValue(widgets.textOneDisplay);
|
||||
await expect(textOneField).toEqual('dog');
|
||||
await widget.displayValueWidget().checkDisplayValueWidgetIsHidden(displayValueString.displayValueSingleConditionField);
|
||||
|
||||
});
|
||||
});
|
||||
it('[C309871] Should be able to see Display text widget when has multiple visibility conditions and next condition operators', async () => {
|
||||
await formCloudDemoPage.setConfigToEditor(displayValueTextJson);
|
||||
|
||||
@@ -331,6 +328,5 @@ describe('Visibility conditions - cloud', () => {
|
||||
await expect(textTwoField).toEqual('dog');
|
||||
await widget.displayValueWidget().isDisplayValueWidgetVisible(displayValueString.displayValueMultipleConditionsField);
|
||||
await expect(textDisplayWidgetMultipleCondition).toEqual('more cats');
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user