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 edit tags flaky tests #175763

Merged
merged 3 commits into from
Jan 29, 2024
Merged

Conversation

cnasikas
Copy link
Member

Summary

Fixes: #175655, #175623, #175622, #175619, #175618

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@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.13.0 labels Jan 29, 2024
@cnasikas cnasikas self-assigned this Jan 29, 2024
@cnasikas cnasikas requested a review from a team as a code owner January 29, 2024 08:02
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

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


userEvent.type(screen.getByRole('combobox'), `${sampleTags[0]}{enter}`);
userEvent.type(screen.getByRole('combobox'), `${sampleTags[0]}{enter}`);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
userEvent.type(screen.getByRole('combobox'), `${sampleTags[0]}{enter}`);
userEvent.type(await screen.findByRole('combobox'), `${sampleTags[0]}{enter}`);

Copy link
Member Author

Choose a reason for hiding this comment

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

I forgot them, thanks!

Copy link
Member Author

Choose a reason for hiding this comment

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

Done!


await waitFor(() => {
expect(screen.getByText('A tag must contain at least one non-space character.'));
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
expect(screen.getByText('A tag must contain at least one non-space character.'));
expect(await screen.findByText('A tag must contain at least one non-space character.'));

Copy link
Member Author

Choose a reason for hiding this comment

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

Done!

expect(
screen.getByText('The length of the tag is too long. The maximum length is 256 characters.')
);
await waitFor(() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the await waitFor(... still necessary?

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for catching this. I forgot them. I fixed it in 26389a4 (#175763)


userEvent.paste(screen.getByRole('combobox'), `${longTag}`);
userEvent.keyboard('{enter}');
userEvent.paste(screen.getByRole('combobox'), `${longTag}`);
Copy link
Contributor

Choose a reason for hiding this comment

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

findByRole


userEvent.type(screen.getByRole('combobox'), ' {enter}');
userEvent.type(screen.getByRole('combobox'), ' {enter}');
Copy link
Contributor

Choose a reason for hiding this comment

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

findByRole


userEvent.type(screen.getByRole('combobox'), 'new{enter}');
userEvent.type(screen.getByRole('combobox'), 'new{enter}');
Copy link
Contributor

Choose a reason for hiding this comment

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

findByRole

@cnasikas cnasikas requested a review from adcoelho January 29, 2024 08:12
@cnasikas cnasikas enabled auto-merge (squash) January 29, 2024 10:29
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #95 / APM API tests services/agent.spec.ts basic apm_8.0.0 Agent name when data is loaded returns the agent name

Metrics [docs]

✅ unchanged

History

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

cc @cnasikas

@cnasikas cnasikas merged commit 57b4efa into elastic:main Jan 29, 2024
21 checks passed
@cnasikas cnasikas deleted the fix_tags_flaky_tests branch January 29, 2024 11:44
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Jan 29, 2024
CoenWarmer pushed a commit to CoenWarmer/kibana that referenced this pull request Feb 15, 2024
## Summary

Fixes: elastic#175655,
elastic#175623,
elastic#175622,
elastic#175619,
elastic#175618

### 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)
fkanout pushed a commit to fkanout/kibana that referenced this pull request Mar 4, 2024
## Summary

Fixes: elastic#175655,
elastic#175623,
elastic#175622,
elastic#175619,
elastic#175618

### 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment