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

[Cases] Unskip flaky tests #178370

Merged
merged 1 commit into from
Mar 11, 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 @@ -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', () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test was skipped for a long time and was not updated after latest custom fields feature update.

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