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] Fix case view flaky tests #160412

Merged
merged 24 commits into from
Jun 27, 2023
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 @@ -30,6 +30,7 @@ interface StartServiceArgs {

export const createStartServicesMock = ({ license }: StartServiceArgs = {}): StartServices => {
const licensingPluginMock = licensingMock.createStart();
const triggersActionsUi = triggersActionsUiMock.createStart();

const services = {
...coreMock.createStart(),
Expand All @@ -39,7 +40,11 @@ export const createStartServicesMock = ({ license }: StartServiceArgs = {}): Sta
navigateToPrefilledEditor: jest.fn(),
},
security: securityMock.createStart(),
triggersActionsUi: triggersActionsUiMock.createStart(),
triggersActionsUi: {
actionTypeRegistry: triggersActionsUi.actionTypeRegistry,
alertsTableConfigurationRegistry: triggersActionsUi.alertsTableConfigurationRegistry,
getAlertsStateTable: jest.fn().mockReturnValue(<div data-test-subj="alerts-table" />),
Comment on lines +43 to +46
Copy link
Member Author

Choose a reason for hiding this comment

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

The triggersActionsUiMock does not mock their components etc so it is not actually a mock. I mocked them here explicitly to make the tests faster and not load the whole alerts table.

},
spaces: spacesPluginMock.createStartContract(),
licensing:
license != null
Expand Down
Loading