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

[FTR] Refactor toasts svc #174222

Merged
merged 87 commits into from
Feb 14, 2024
Merged

Conversation

wayneseymour
Copy link
Member

@wayneseymour wayneseymour commented Jan 3, 2024

Summary

Refactoring general ui service (test helpers), to a kbn package.

  • Optimize methods and drop some code duplication.

Why

  • Makes the service easily available from multiple code areas.
  • This is a preparation to potentially moving tests to plugins / packages, where they would no longer be able to import thing from test or x-pack/test but only from a package.

@wayneseymour wayneseymour self-assigned this Jan 3, 2024
@wayneseymour
Copy link
Member Author

/ci

@wayneseymour
Copy link
Member Author

/ci

@wayneseymour
Copy link
Member Author

wayneseymour commented Jan 10, 2024

My IDE found zero usages of dismissToast(). So, my first thought is to rename it to something more descriptive, like dismissToastByIndex().
The reason being is that the common pages's closeToast() method will be refactored into this PR's shared package.

  • It has many uses.
  • Seems cleaner to call the refactored toasts service directly

\cc @pheyos

@wayneseymour
Copy link
Member Author

/ci

2 similar comments
@wayneseymour
Copy link
Member Author

/ci

@wayneseymour
Copy link
Member Author

/ci

@wayneseymour
Copy link
Member Author

/ci

1 similar comment
@wayneseymour
Copy link
Member Author

/ci

@wayneseymour
Copy link
Member Author

/ci

@wayneseymour
Copy link
Member Author

/ci

@wayneseymour
Copy link
Member Author

/ci

@wayneseymour
Copy link
Member Author

@elasticmachine merge upstream

@wayneseymour
Copy link
Member Author

@elasticmachine merge upstream

@wayneseymour
Copy link
Member Author

dismiss() method from within
getTitleAndDismiss().
@wayneseymour
Copy link
Member Author

@wayneseymour
Copy link
Member Author

50x again, after changing getTitleAndDismiss method to contain the original implementation.

@wayneseymour
Copy link
Member Author

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/ftr-common-functional-ui-services 510 511 +1

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
@kbn/ftr-common-functional-ui-services 2 3 +1
Unknown metric groups

API count

id before after diff
@kbn/ftr-common-functional-ui-services 550 551 +1

History

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

cc @wayneseymour

@wayneseymour wayneseymour requested a review from pheyos February 13, 2024 11:56
Copy link
Member

@pheyos pheyos left a comment

Choose a reason for hiding this comment

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

LGTM

@wayneseymour wayneseymour merged commit 9861161 into elastic:main Feb 14, 2024
17 checks passed
@wayneseymour wayneseymour deleted the refactor-toasts-svc branch February 14, 2024 09:24
CoenWarmer pushed a commit to CoenWarmer/kibana that referenced this pull request Feb 15, 2024
### Summary

Refactoring general ui service (test helpers), to a kbn package.
  - Optimize methods and drop some code duplication.
  
### Why 

  - Makes the service easily available from multiple code areas. 
- This is a preparation to potentially moving tests to plugins /
packages, where they would no longer be able to import thing from test
or x-pack/test but only from a package.

---------

Co-authored-by: kibanamachine <[email protected]>
wayneseymour added a commit that referenced this pull request Feb 19, 2024
## Summary

Refactor `toastMessageByTestSubj` method to two methods, instead of
being nested.


## Why

We feel that the this method is not ergonomic to our purposes.
So, let's simplify it so that our devs can make use of it, easily.
This is apart of myriad efforts to clean things up and centralize.

Lastly, it's a follow up pr to [[FTR] Refactor toasts svc
](#174222)

Note: The flaky runner was [run against the only config that uses these
two additional methods,
successfully](#176889 (comment)).

Resolves #176570

---------

Co-authored-by: Kibana Machine <[email protected]>
Co-authored-by: Dzmitry Lemechko <[email protected]>
fkanout pushed a commit to fkanout/kibana that referenced this pull request Mar 4, 2024
### Summary

Refactoring general ui service (test helpers), to a kbn package.
  - Optimize methods and drop some code duplication.
  
### Why 

  - Makes the service easily available from multiple code areas. 
- This is a preparation to potentially moving tests to plugins /
packages, where they would no longer be able to import thing from test
or x-pack/test but only from a package.

---------

Co-authored-by: kibanamachine <[email protected]>
fkanout pushed a commit to fkanout/kibana that referenced this pull request Mar 4, 2024
## Summary

Refactor `toastMessageByTestSubj` method to two methods, instead of
being nested.


## Why

We feel that the this method is not ergonomic to our purposes.
So, let's simplify it so that our devs can make use of it, easily.
This is apart of myriad efforts to clean things up and centralize.

Lastly, it's a follow up pr to [[FTR] Refactor toasts svc
](elastic#174222)

Note: The flaky runner was [run against the only config that uses these
two additional methods,
successfully](elastic#176889 (comment)).

Resolves elastic#176570

---------

Co-authored-by: Kibana Machine <[email protected]>
Co-authored-by: Dzmitry Lemechko <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:review backport:skip This commit does not require backporting FTR release_note:skip Skip the PR/issue when compiling release notes v8.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.