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] Enhance log wrapper for page objects #199810

Merged
merged 3 commits into from
Nov 19, 2024

Conversation

dej611
Copy link
Contributor

@dej611 dej611 commented Nov 12, 2024

Summary

This small improvement reports the spent time for a given page object using the logWrapper.

Currently lensPage is the only one using this logger, but it could be easily extended to others.

New logs with this change:

└-> does not show a warning
           └-> "before each" hook: global before each for "does not show a warning"
           │ debg lensPage.openDimensionEditor('lnsXY_yDimensionPanel')
           │ debg TestSubjects.findAll(lns-layerPanel-0 > lnsXY_yDimensionPanel)
           │ debg Find.allByCssSelector('[data-test-subj="lns-layerPanel-0"] [data-test-subj="lnsXY_yDimensionPanel"]') with timeout=10000
           │ debg lensPage.openDimensionEditor('lnsXY_yDimensionPanel') - (Took 166 ms)     <==== new line
           │ debg TestSubjects.missingOrFail(median-partial-warning)
           │ debg Find.waitForDeletedByCssSelector('[data-test-subj="median-partial-warning"]') with timeout=2500
           │ debg lensPage.assertNoEditorWarning()
           │ debg TestSubjects.missingOrFail(lens-editor-warning)
           │ debg Find.waitForDeletedByCssSelector('[data-test-subj="lens-editor-warning"]') with timeout=2500
           │ debg lensPage.assertNoEditorWarning() - (Took 533 ms)    <==== new line
           │ debg lensPage.closeDimensionEditor()
           │ debg TestSubjects.click(lns-indexPattern-dimensionContainerClose)
           │ debg Find.clickByCssSelector('[data-test-subj="lns-indexPattern-dimensionContainerClose"]') with timeout=10000
           │ debg Find.findByCssSelector('[data-test-subj="lns-indexPattern-dimensionContainerClose"]') with timeout=10000
           │ debg TestSubjects.missingOrFail(lns-indexPattern-dimensionContainerClose)
           │ debg Find.waitForDeletedByCssSelector('[data-test-subj="lns-indexPattern-dimensionContainerClose"]') with timeout=2500
           │ debg lensPage.closeDimensionEditor() - (Took 583 ms)    <==== new line

@dej611 dej611 added Team:QA Team label for QA Team Feature:Functional Testing labels Nov 12, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/appex-qa (Team:QA)

@dej611 dej611 added release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting labels Nov 12, 2024
@dej611 dej611 requested a review from a team as a code owner November 19, 2024 09:58
Copy link
Member

@markov00 markov00 left a comment

Choose a reason for hiding this comment

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

Thanks I love that, is also nice because creates an enclosure of each page object that is very helpful to understand what command are executed within each page object.
Do you know if we can also add them as a collapsable logs? it will be a 💣

@dej611 dej611 enabled auto-merge (squash) November 19, 2024 10:28
@dej611 dej611 merged commit fe03c61 into elastic:main Nov 19, 2024
22 checks passed
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #41 / Discover discover async search relative timerange works
  • [job] [logs] FTR Configs #27 / serverless search UI connectors has embedded dev console

Metrics [docs]

✅ unchanged

History

paulinashakirova pushed a commit to paulinashakirova/kibana that referenced this pull request Nov 26, 2024
## Summary

This small improvement reports the spent time for a given page object
using the `logWrapper`.
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 12, 2024
## Summary

This small improvement reports the spent time for a given page object
using the `logWrapper`.
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:Functional Testing release_note:skip Skip the PR/issue when compiling release notes Team:QA Team label for QA Team v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants