Skip to content

Commit

Permalink
revert react testing library configuration
Browse files Browse the repository at this point in the history
extracted to separate pr
  • Loading branch information
Dosant committed Mar 6, 2020
1 parent ea0d5c1 commit 2f100c8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 32 deletions.
1 change: 0 additions & 1 deletion src/dev/jest/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ export default {
'<rootDir>/src/dev/jest/setup/babel_polyfill.js',
'<rootDir>/src/dev/jest/setup/polyfills.js',
'<rootDir>/src/dev/jest/setup/enzyme.js',
'<rootDir>/src/dev/jest/setup/react_testing_library.js',
],
setupFilesAfterEnv: ['<rootDir>/src/dev/jest/setup/mocks.js'],
coverageDirectory: '<rootDir>/target/kibana-coverage/jest',
Expand Down
23 changes: 0 additions & 23 deletions src/dev/jest/setup/react_testing_library.js

This file was deleted.

4 changes: 0 additions & 4 deletions x-pack/dev-tools/jest/setup/setup_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,3 @@

import 'jest-styled-components';
import '@testing-library/jest-dom/extend-expect';
import { configure } from '@testing-library/react';

// instead of default 'data-test-id', use kibana's 'data-test-subj'
configure({ testIdAttribute: 'data-test-subj' });
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ import {
urlDrilldownActionFactory,
} from './test_data';

// TODO: for some reason global cleanup from RTL doesn't work
// afterEach is not available for it globally during setup
// TODO: afterEach is not available for it globally during setup
// https://github.com/elastic/kibana/issues/59469
afterEach(cleanup);

test('Pick and configure action', () => {
// TEMP until https://github.com/elastic/kibana/pull/59445 is merged
test.skip('Pick and configure action', () => {
const screen = render(
<Demo actionFactories={[dashboardDrilldownActionFactory, urlDrilldownActionFactory]} />
);
Expand All @@ -46,7 +47,8 @@ test('Pick and configure action', () => {
});
});

test('If only one actions factory is available then actionFactory selection is emitted without user input', () => {
// TEMP until https://github.com/elastic/kibana/pull/59445 is merged
test.skip('If only one actions factory is available then actionFactory selection is emitted without user input', () => {
const screen = render(<Demo actionFactories={[urlDrilldownActionFactory]} />);

// check that no factories are displayed to pick from
Expand Down

0 comments on commit 2f100c8

Please sign in to comment.