-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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 failed jest tests for all_cases_list #149005
Conversation
…-ref HEAD~1..HEAD --fix'
…-ref HEAD~1..HEAD --fix'
…ibana into jest-failed-test
<AllCasesList /> | ||
</TestProviders> | ||
); | ||
expect(wrapper.find('[data-test-subj="cases-count-stats"]')).toBeTruthy(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
data-test-subj="cases-count-stats"
doesn't exist anywhere in all_cases_list
and it's child components.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
// Flaky: https://github.com/elastic/kibana/issues/148490 | ||
describe.skip('Assignees', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This block was outside of main describe block which caused timeout to get mock data of useGetCases
); | ||
expect( | ||
screen.getAllByTestId('case-table-column-createdAt')[0].querySelector('.euiToolTipAnchor') | ||
).toHaveTextContent(removeMsFromDate(useGetCasesMockState.data.cases[0].createdAt)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we are removing milliseconds in CreatedAt
column in use_cases_columns
hook, while mock data is with milliseconds.
Pinging @elastic/response-ops (Team:ResponseOps) |
Pinging @elastic/response-ops-cases (Feature:Cases) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the refactoring!
Just left one comment about removing a line 👍
<AllCasesList /> | ||
</TestProviders> | ||
); | ||
expect(wrapper.find('[data-test-subj="cases-count-stats"]')).toBeTruthy(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -1020,37 +943,35 @@ describe.skip('AllCasesListGeneric', () => { | |||
}); | |||
}); | |||
|
|||
it.each(severityTests)('update the status of a case: %s', async (severity) => { | |||
const res = appMockRenderer.render(<AllCasesList />); | |||
it.each(severityTests)('update the severity of a case: %s', async (severity) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙇
it('should hide the assignees column on basic license', async () => { | ||
useLicenseMock.mockReturnValue({ isAtLeastPlatinum: () => false }); | ||
// Flaky: https://github.com/elastic/kibana/issues/148490 | ||
describe('Assignees', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove the comment above this
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: |
Summary
This PR fixes failed jest tests for
all_cases_list
component.Fixes: #139676, #142763, #148094, #148095, #148096, #148485, #148486, #148487, #148488, #148490, #148491, #148492, #148493, #148343