Skip to content
Merged
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 @@ -47,11 +47,6 @@ const actionTypeRegistry = actionTypeRegistryMock.create();
const ruleTypeRegistry = ruleTypeRegistryMock.create();
const useKibanaMock = useKibana as jest.Mocked<typeof useKibana>;

const delay = (wait: number = 1000) =>
new Promise((resolve) => {
setTimeout(resolve, wait);
});

export const TestExpression: FunctionComponent<any> = () => {
return (
<EuiFormLabel>
Expand All @@ -64,8 +59,7 @@ export const TestExpression: FunctionComponent<any> = () => {
);
};

// FLAKY: https://github.com/elastic/kibana/issues/g
describe.skip('alert_add', () => {
describe('alert_add', () => {
let wrapper: ReactWrapper<any>;

async function setup(
Expand Down Expand Up @@ -179,7 +173,6 @@ describe.skip('alert_add', () => {
it('renders alert add flyout', async () => {
const onClose = jest.fn();
await setup({}, onClose);
await delay(1000);

expect(wrapper.find('[data-test-subj="addAlertFlyoutTitle"]').exists()).toBeTruthy();
expect(wrapper.find('[data-test-subj="saveAlertButton"]').exists()).toBeTruthy();
Expand Down Expand Up @@ -209,8 +202,6 @@ describe.skip('alert_add', () => {
onClose
);

await delay(1000);

expect(wrapper.find('input#alertName').props().value).toBe('Simple status alert');

expect(wrapper.find('[data-test-subj="tagsComboBox"]').first().text()).toBe('uptimelogs');
Expand Down Expand Up @@ -249,7 +240,6 @@ describe.skip('alert_add', () => {

it('should enforce any default inteval', async () => {
await setup({ alertTypeId: 'my-alert-type' }, jest.fn(), '3h');
await delay(1000);

// Wait for handlers to fire
await act(async () => {
Expand Down