Skip to content

Commit

Permalink
Remove ErrorEmbeddable tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Heenawter committed Sep 12, 2024
1 parent 6c714c8 commit 3917c17
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { BehaviorSubject } from 'rxjs';
import { coreMock } from '@kbn/core/public/mocks';
import { dataPluginMock } from '@kbn/data-plugin/public/mocks';
import { dataViewPluginMocks } from '@kbn/data-views-plugin/public/mocks';
import { ErrorEmbeddable } from '@kbn/embeddable-plugin/public';
import { ViewMode } from '@kbn/presentation-publishing';

import { getOptionsListControlFactory } from '../react_controls/controls/data_controls/options_list_control/get_options_list_control_factory';
Expand Down Expand Up @@ -62,14 +61,6 @@ beforeAll(async () => {
controlApi = control.api;
});

test('Action is incompatible with Error Embeddables', async () => {
const deleteControlAction = new DeleteControlAction();
const errorEmbeddable = new ErrorEmbeddable('Wow what an awful error', { id: ' 404' });
expect(await deleteControlAction.isCompatible({ embeddable: errorEmbeddable as any })).toBe(
false
);
});

test('Execute throws an error when called with an embeddable not in a parent', async () => {
const deleteControlAction = new DeleteControlAction();
const { parentApi, ...rest } = controlApi;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { coreMock } from '@kbn/core/public/mocks';
import { dataPluginMock } from '@kbn/data-plugin/public/mocks';
import { dataViewPluginMocks } from '@kbn/data-views-plugin/public/mocks';
import dateMath from '@kbn/datemath';
import { ErrorEmbeddable } from '@kbn/embeddable-plugin/public';
import type { TimeRange } from '@kbn/es-query';
import type { ViewMode } from '@kbn/presentation-publishing';

Expand Down Expand Up @@ -73,14 +72,6 @@ beforeAll(async () => {
});

describe('Incompatible embeddables', () => {
test('Action is incompatible with Error Embeddables', async () => {
const editControlAction = new EditControlAction();
const errorEmbeddable = new ErrorEmbeddable('Wow what an awful error', { id: ' 404' });
expect(await editControlAction.isCompatible({ embeddable: errorEmbeddable as any })).toBe(
false
);
});

test('Action is incompatible with embeddables that are not editable', async () => {
const timeSliderFactory = getTimesliderControlFactory({
core: mockCore,
Expand Down

0 comments on commit 3917c17

Please sign in to comment.