[AAE-5971] [Form] Support for multi select drop down (#7321)

* [AAE-5971] [ADF][Form-cloud] Support for multi select drop down

* * fix drop down validation

* * minor changes

* * fix tests

* * minor changes

* * fix comments

* * fix e2e
This commit is contained in:
Dharan
2021-10-27 13:45:28 +05:30
committed by GitHub
parent 35ab83e929
commit b9997be4ab
11 changed files with 201 additions and 19 deletions

View File

@@ -35,7 +35,7 @@ import {
tabInvalidFormVisibility,
fakeFormChainedVisibilityJson,
fakeFormCheckBoxVisibilityJson
} from 'core/mock/form/widget-visibility.service.mock';
} from '../../mock/form/widget-visibility.service.mock';
import { CoreTestingModule } from '../../testing/core.testing.module';
import { TranslateModule } from '@ngx-translate/core';
@@ -63,10 +63,6 @@ describe('WidgetVisibilityService', () => {
jasmine.Ajax.uninstall();
});
describe('should be able to evaluate logic operations', () => {
});
describe('should be able to evaluate next condition operations', () => {
it('using == and return true', () => {
@@ -143,6 +139,26 @@ describe('WidgetVisibilityService', () => {
booleanResult = service.evaluateCondition(null, null, undefined);
expect(booleanResult).toBeUndefined();
});
it('should return true when element contains', () => {
booleanResult = service.evaluateCondition(['one', 'two'], ['one'], 'contains');
expect(booleanResult).toBe(true);
});
it('should return false when element not contains', () => {
booleanResult = service.evaluateCondition(['two'], ['one'], 'contains');
expect(booleanResult).toBe(false);
});
it('should return true when element not contains', () => {
booleanResult = service.evaluateCondition(['two'], ['one'], '!contains');
expect(booleanResult).toBe(true);
});
it('should return false when element contains', () => {
booleanResult = service.evaluateCondition(['one', 'two'], ['one'], '!contains');
expect(booleanResult).toBe(false);
});
});
describe('should retrieve the process variables', () => {