Skip to content

Commit

Permalink
[Uptime] increase timeout and clear mocks for UptimeDatePicker flaky …
Browse files Browse the repository at this point in the history
…test (elastic#117346) (elastic#117416)

Co-authored-by: Dominique Clarke <doclarke71@gmail.com>
  • Loading branch information
kibanamachine and dominiqueclarke committed Nov 3, 2021
1 parent 6fe0e50 commit 7f44486
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,13 @@ import { createMemoryHistory } from 'history';
import { render } from '../../lib/helper/rtl_helpers';
import { fireEvent } from '@testing-library/dom';

// FLAKY: https://github.com/elastic/kibana/issues/114396
describe.skip('UptimeDatePicker component', () => {
describe('UptimeDatePicker component', () => {
jest.setTimeout(10_000);

beforeEach(() => {
jest.clearAllMocks();
});

it('renders properly with mock data', async () => {
const { findByText } = render(<UptimeDatePicker />);
expect(await findByText('Last 15 minutes')).toBeInTheDocument();
Expand Down Expand Up @@ -86,7 +91,7 @@ describe.skip('UptimeDatePicker component', () => {

// it should update shared state

expect(startPlugins.data.query.timefilter.timefilter.setTime).toHaveBeenCalledTimes(3);
expect(startPlugins.data.query.timefilter.timefilter.setTime).toHaveBeenCalledTimes(2);

expect(startPlugins.data.query.timefilter.timefilter.setTime).toHaveBeenCalledWith({
from: 'now-10m',
Expand Down

0 comments on commit 7f44486

Please sign in to comment.