mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
* Remove support for scripted fields for all controls
* Remove support only for options list
* Add functional test
(cherry picked from commit 508f0127e3
)
This commit is contained in:
parent
adf074014b
commit
91edd82b92
2 changed files with 12 additions and 2 deletions
|
@ -56,8 +56,9 @@ export class OptionsListEmbeddableFactory
|
|||
|
||||
public isFieldCompatible = (dataControlField: DataControlField) => {
|
||||
if (
|
||||
(dataControlField.field.aggregatable && dataControlField.field.type === 'string') ||
|
||||
dataControlField.field.type === 'boolean'
|
||||
!dataControlField.field.spec.scripted &&
|
||||
((dataControlField.field.aggregatable && dataControlField.field.type === 'string') ||
|
||||
dataControlField.field.type === 'boolean')
|
||||
) {
|
||||
dataControlField.compatibleControlTypes.push(this.type);
|
||||
}
|
||||
|
|
|
@ -172,6 +172,15 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
await dashboard.clearUnsavedChanges();
|
||||
});
|
||||
|
||||
it('cannot create options list for scripted field', async () => {
|
||||
expect(await dashboardControls.optionsListEditorGetCurrentDataView(true)).to.eql(
|
||||
'animals-*'
|
||||
);
|
||||
await dashboardControls.openCreateControlFlyout();
|
||||
await testSubjects.missingOrFail('field-picker-select-isDog');
|
||||
await dashboardControls.controlEditorCancel(true);
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
await dashboardControls.clearAllControls();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue