-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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] UI validation for assignees, tags and categories filters #162411
[Cases] UI validation for assignees, tags and categories filters #162411
Conversation
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.
Creat job 🚀!!
x-pack/plugins/cases/public/components/all_cases/table_filters.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/cases/public/components/all_cases/translations.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/cases/public/components/filter_popover/index.tsx
Outdated
Show resolved
Hide resolved
appMockRender.render(<AssigneesFilterPopover {...props} />); | ||
|
||
await waitFor(async () => { | ||
userEvent.click(screen.getByTestId('options-filter-popover-button-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.
nit: we use the old "@testing-library/user-event": "^13.5.0",
which doesn't return a promise(I think it is here) so this could be moved outside.
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.
I tried to move userEvent.click(screen.getByTestId('options-filter-popover-button-assignees'));
out of waitFor
but test fails due to it.
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.
Weird, in the documentation for this version they don't use it. I don't know what to believe anymore 😆
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.
yeah, we also don't put it in waitFor in other components tests. Maybe something wrong in rendering this component.
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.
FWIW, we can convert it to userEvent.click(await screen.findByTestId('options-filter-popover-button-assignees'));
and remove the waitFor
. All flavors of find*
await for the element to appear.
x-pack/plugins/cases/public/components/filter_popover/index.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/cases/public/components/all_cases/assignees_filter.test.tsx
Show resolved
Hide resolved
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.
Looks great!
💚 Build Succeeded
Metrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
…stic#162411) ## Summary Connected to elastic#146945 This PR adds UI validations for `assignees`, `tags` and `categories` filter on cases list table and cases selector modal: Description | Limit | Done? | Documented? | UI? -- | -- | -- | -- | -- Maximum number of assignees to filter | 100 | ✅ | Yes | :white_check_mark: Maximum number of tags to filter | 100 | ✅ | Yes | :white_check_mark: Maximum number of categories to filter | 100 | ✅ | Yes | :white_check_mark: **Selector modal:** ![image](https://github.com/elastic/kibana/assets/117571355/69945b0a-57af-42c0-85e0-7df497d8796b) **Case list table:** ![image](https://github.com/elastic/kibana/assets/117571355/05c882f8-c160-40c3-aa9c-70ad4801e837) ![image](https://github.com/elastic/kibana/assets/117571355/e8e3eef8-81cf-46a2-8c8c-ee0d1f65a8ec) ![image](https://github.com/elastic/kibana/assets/117571355/a30bd780-d36f-437f-bf29-6eafed6accca) _Note:_ _screenshots are taken with 5 as maximum limit for `assignees`, `tags` and `categories` filter:_ ### Checklist Delete any items that are not applicable to this PR. - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [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 - [x] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) ### For maintainers - [x] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
Summary
Connected to #146945
This PR adds UI validations for
assignees
,tags
andcategories
filter on cases list table and cases selector modal:Selector modal:
Case list table:
Note: screenshots are taken with 5 as maximum limit for
assignees
,tags
andcategories
filter:Checklist
Delete any items that are not applicable to this PR.
For maintainers
Release notes
The Find Cases API now limits