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 participants tests #162612

Merged
merged 6 commits into from
Jul 28, 2023
Merged

Conversation

cnasikas
Copy link
Member

@cnasikas cnasikas commented Jul 27, 2023

Summary

I removed the participants' tests from x-pack/plugins/cases/public/components/case_view/components/case_view_activity.test.tsx

There were a few things being tested:

Old Test Where is it covered
should render the participants correctly Moved to an e2e test
should render Unknown users correctly Moved to UserList
should render assignees in the participants section Moved to an e2e test

I also added a small test for reporters.

Fixes #152204
Flaky test runner: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2734

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@@ -971,6 +971,81 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
expect(lastBreadcrumb).to.be(theCase.title);
});
});

describe('reporter', () => {
Copy link
Member Author

Choose a reason for hiding this comment

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

@cnasikas cnasikas self-assigned this Jul 27, 2023
@cnasikas cnasikas added release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) Feature:Cases Cases feature v8.10.0 labels Jul 27, 2023
@cnasikas cnasikas marked this pull request as ready for review July 27, 2023 08:54
@cnasikas cnasikas requested a review from a team as a code owner July 27, 2023 08:54
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops-cases (Feature:Cases)

@cnasikas
Copy link
Member Author

@elasticmachine merge upstream

Copy link
Contributor

@js-jankisalvi js-jankisalvi left a comment

Choose a reason for hiding this comment

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

looks good 👍

});

after(async () => {
await cases.api.deleteAllCases();
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: since we do it too in afterEach, this one is redundant no?

const elasticUserText = await participants[1].getVisibleText();
const testUserText = await participants[2].getVisibleText();

expect(casesAllUserText).to.be('cases all_user');
Copy link
Contributor

Choose a reason for hiding this comment

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

Which of them is the assignee?

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 casesAllUserText. I will put a comment.

Copy link
Contributor

@adcoelho adcoelho left a comment

Choose a reason for hiding this comment

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

lgtm, thank you for the reporters test!

@cnasikas cnasikas enabled auto-merge (squash) July 28, 2023 07:37
@kibana-ci
Copy link
Collaborator

kibana-ci commented Jul 28, 2023

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] Serverless Observability Tests / serverless observability UI navigation active sidenav section is auto opened on load

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
cases 421.6KB 421.6KB +43.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @cnasikas

@cnasikas cnasikas merged commit 08db8ee into elastic:main Jul 28, 2023
@cnasikas cnasikas deleted the fix_152204 branch July 28, 2023 08:40
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Jul 28, 2023
ThomThomson pushed a commit to ThomThomson/kibana that referenced this pull request Aug 1, 2023
## Summary

I removed the participants' tests from
`x-pack/plugins/cases/public/components/case_view/components/case_view_activity.test.tsx`

There were a few things being tested:

| Old Test  | Where is it covered |
| ------------- | ------------- |
| should render the participants correctly  | Moved to an e2e test |
| should render Unknown users correctly  | Moved to  `UserList` |
| should render assignees in the participants section | Moved to an e2e
test |

I also added a small test for reporters.

Fixes elastic#152204
Flaky test runner:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2734

### Checklist

Delete any items that are not applicable to this PR.

- [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

### 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)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Cases Cases feature release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v8.10.0
Projects
None yet
6 participants