Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.x] [ML] Transform: Fix <DefinePivotSummary /> jest test. (#195998) #203129

Merged
merged 1 commit into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,14 @@ dataStart.search.search = jest.fn(({ params }: IKibanaSearchRequest) => {
}) as ISearchGeneric;

// Replace mock to support tests for `use_index_data`.
coreSetup.http.post = jest.fn().mockResolvedValue([]);
coreSetup.http.post = jest.fn().mockImplementation((endpoint) => {
if (endpoint === '/internal/transform/transforms/_preview') {
return Promise.resolve({
generated_dest_index: { mappings: { properties: {} } },
preview: [],
});
}
});

const appDependencies: AppDependencies = {
analytics: coreStart.analytics,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ import { StepDefineSummary } from './step_define_summary';

jest.mock('../../../../app_dependencies');

// Failing: https://github.com/elastic/kibana/issues/195992
describe.skip('Transform: <DefinePivotSummary />', () => {
// Using the async/await wait()/done() pattern to avoid act() errors.
describe('Transform: <DefinePivotSummary />', () => {
test('Minimal initialization', async () => {
// Arrange
const queryClient = new QueryClient();
Expand Down
Loading