mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[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:
@@ -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', () => {
|
||||
|
Reference in New Issue
Block a user