Skip to content

Commit

Permalink
[Cases] Unskip flaky tests (#178370)
Browse files Browse the repository at this point in the history
## Summary

This PR unskip below flaky tests to confirm the fix made in
#177798

Fixes #174682
Fixes #176336
Fixes #177334
Fixes #171600
Fixes #171601
Fixes #177791
Fixes #177792
Fixes #177793
Fixes #177794
Fixes #177795
Fixes #177796
Fixes #171605
Fixes #171606
Fixes #171607
Fixes #171608
Fixes #178119
Fixes #174525
Fixes #174526
Fixes #174527
Fixes #174528
Fixes #146394
Fixes #176805
Fixes #175112
Fixes #176671
Fixes #176672
Fixes #175841
Fixes #174667
Fixes #174384
Fixes #175310


### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
  • Loading branch information
js-jankisalvi authored Mar 11, 2024
1 parent aded174 commit 8be837a
Show file tree
Hide file tree
Showing 15 changed files with 27 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ import type { AppMockRenderer } from '../../common/mock';
import { createAppMockRenderer } from '../../common/mock';
import { ColumnsPopover } from './columns_popover';

// FLAKY: https://github.com/elastic/kibana/issues/174682
describe.skip('ColumnsPopover', () => {
describe('ColumnsPopover', () => {
let appMockRenderer: AppMockRenderer;

beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ import { screen, waitFor } from '@testing-library/react';
import { waitForEuiPopoverOpen } from '@elastic/eui/lib/test/rtl';
import { SeverityFilter } from './severity_filter';

// FLAKY: https://github.com/elastic/kibana/issues/176336
describe.skip('Severity form field', () => {
describe('Severity form field', () => {
const onChange = jest.fn();
let appMockRender: AppMockRenderer;
const props = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ const LABELS = {
inProgress: i18n.STATUS_IN_PROGRESS,
};

// FLAKY: https://github.com/elastic/kibana/issues/177334
describe.skip('StatusFilter', () => {
describe('StatusFilter', () => {
const onChange = jest.fn();
const defaultProps = {
selectedOptionKeys: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ import type { AssigneeWithProfile } from '../../user_profiles/types';

jest.mock('../../../containers/user_profiles/api');

// FLAKY: https://github.com/elastic/kibana/issues/171600
// FLAKY: https://github.com/elastic/kibana/issues/171601
describe.skip('SuggestUsersPopover', () => {
describe('SuggestUsersPopover', () => {
let appMockRender: AppMockRenderer;
let defaultProps: SuggestUsersPopoverProps;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,7 @@ import { categories } from '../../containers/mock';
import { MAX_CATEGORY_LENGTH } from '../../../common/constants';
import { FormTestComponent } from '../../common/test_utils';

// FLAKY: https://github.com/elastic/kibana/issues/177791
// FLAKY: https://github.com/elastic/kibana/issues/177792
// FLAKY: https://github.com/elastic/kibana/issues/177793
// FLAKY: https://github.com/elastic/kibana/issues/177794
// FLAKY: https://github.com/elastic/kibana/issues/177795
// FLAKY: https://github.com/elastic/kibana/issues/177796
// FLAKY: https://github.com/elastic/kibana/issues/171605
// FLAKY: https://github.com/elastic/kibana/issues/171606
// FLAKY: https://github.com/elastic/kibana/issues/171607
// FLAKY: https://github.com/elastic/kibana/issues/171608
describe.skip('Category', () => {
describe('Category', () => {
let appMockRender: AppMockRenderer;
const onSubmit = jest.fn();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ jest.mock('./api');

const useKibanaMock = useKibana as jest.Mocked<typeof useKibana>;

// FLAKY: https://github.com/elastic/kibana/issues/178119
describe.skip('useGetIncidentTypes', () => {
describe('useGetIncidentTypes', () => {
const { http } = useKibanaMock().services;
let appMockRender: AppMockRenderer;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,7 @@ const defaultProps = {
owner: 'securitySolution',
};

// FLAKY: https://github.com/elastic/kibana/issues/174525
// FLAKY: https://github.com/elastic/kibana/issues/174526
// FLAKY: https://github.com/elastic/kibana/issues/174527
// FLAKY: https://github.com/elastic/kibana/issues/174528
describe.skip('CreateCaseFlyout', () => {
describe('CreateCaseFlyout', () => {
let appMockRenderer: AppMockRenderer;

beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,7 @@ const waitForFormToRender = async (renderer: Screen) => {
});
};

// Failing: See https://github.com/elastic/kibana/issues/146394
describe.skip('Create case', () => {
describe('Create case', () => {
const refetch = jest.fn();
const onFormSubmitSuccess = jest.fn();
const afterCaseCreated = jest.fn();
Expand Down Expand Up @@ -466,26 +465,31 @@ describe.skip('Create case', () => {
const textField = customFieldsConfigurationMock[0];
const toggleField = customFieldsConfigurationMock[1];

expect(screen.getByTestId('create-case-custom-fields')).toBeInTheDocument();
expect(await screen.findByTestId('create-case-custom-fields')).toBeInTheDocument();

userEvent.paste(
screen.getByTestId(`${textField.key}-${textField.type}-create-custom-field`),
'My text test value 1'
const textCustomFieldEle = await screen.findByTestId(
`${textField.key}-${textField.type}-create-custom-field`
);

userEvent.clear(textCustomFieldEle);
userEvent.paste(textCustomFieldEle, 'My text test value 1!!');

userEvent.click(
screen.getByTestId(`${toggleField.key}-${toggleField.type}-create-custom-field`)
await screen.findByTestId(`${toggleField.key}-${toggleField.type}-create-custom-field`)
);

userEvent.click(screen.getByTestId('create-case-submit'));
userEvent.click(await screen.findByTestId('create-case-submit'));

await waitFor(() => expect(postCase).toHaveBeenCalled());

expect(postCase).toBeCalledWith({
request: {
...sampleDataWithoutTags,
customFields: [
...customFieldsMock,
{ ...customFieldsMock[0], value: 'My text test value 1!!' },
{ ...customFieldsMock[1], value: false },
{ ...customFieldsMock[2] },
{ ...customFieldsMock[3], value: false },
{
key: 'my_custom_field_key',
type: CustomFieldTypes.TEXT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ import { MAX_CUSTOM_FIELDS_PER_CASE } from '../../../common/constants';
import { CustomFields } from '.';
import * as i18n from './translations';

// FLAKY: https://github.com/elastic/kibana/issues/176805
describe.skip('CustomFields', () => {
describe('CustomFields', () => {
let appMockRender: AppMockRenderer;

const props = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ import { customFieldsMock, customFieldsConfigurationMock } from '../../../contai
import userEvent from '@testing-library/user-event';
import type { CaseCustomFieldToggle } from '../../../../common/types/domain';

// FLAKY: https://github.com/elastic/kibana/issues/175112
describe.skip('Edit ', () => {
describe('Edit ', () => {
const onSubmit = jest.fn();

beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ const defaultProps = {
pushToService,
};

// FLAKY: https://github.com/elastic/kibana/issues/176671
// FLAKY: https://github.com/elastic/kibana/issues/176672
describe.skip('PushButton ', () => {
describe('PushButton ', () => {
let appMockRender: AppMockRenderer;

beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ import { basicCase, basicFileMock } from '../../containers/mock';
import { getFileType } from './file_type';
import { FILE_ATTACHMENT_TYPE } from '../../../common/constants';

// Failing: See https://github.com/elastic/kibana/issues/175841
describe.skip('getFileType', () => {
describe('getFileType', () => {
const fileType = getFileType();

it('invalid props return blank FileAttachmentViewObject', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ import {
} from '../../../common/mock';
import { AlertPropertyActions } from './alert_property_actions';

// FLAKY: https://github.com/elastic/kibana/issues/174667
describe.skip('AlertPropertyActions', () => {
describe('AlertPropertyActions', () => {
let appMock: AppMockRenderer;

const props = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ import {
import { RegisteredAttachmentsPropertyActions } from './registered_attachments_property_actions';
import { AttachmentActionType } from '../../../client/attachment_framework/types';

// FLAKY: https://github.com/elastic/kibana/issues/174384
describe.skip('RegisteredAttachmentsPropertyActions', () => {
describe('RegisteredAttachmentsPropertyActions', () => {
let appMock: AppMockRenderer;

const props = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ import {
import { UserCommentPropertyActions } from './user_comment_property_actions';
import { waitFor } from '@testing-library/react';

// FLAKY: https://github.com/elastic/kibana/issues/175310
describe.skip('UserCommentPropertyActions', () => {
describe('UserCommentPropertyActions', () => {
let appMock: AppMockRenderer;

const props = {
Expand Down

0 comments on commit 8be837a

Please sign in to comment.