-
Notifications
You must be signed in to change notification settings - Fork 8k
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
[Fix] Additional tests and clean up for share modal redesign initiative #183643
base: main
Are you sure you want to change the base?
Conversation
/ci |
1 similar comment
/ci |
Pinging @elastic/appex-sharedux (Team:SharedUX) |
@elastic/kibana-operations or @elastic/kibana-qa Lens app - group 4 show underlying data should show the open button for a compatible saved visualization is passing for me locally. Any ideas what I might be missing? Thank you in advance for the help 🙇🏻 |
@rshen91 It looks like the default short URL is causing some flakiness with this test: #183752 Running it locally, you can see that, when clicking copy link, the Screen.Recording.2024-05-21.at.10.08.55.AM.movThis is causing flakiness because sometimes the test is fetching it in time to get the long URL, but other times it's too slow and it grabs the short URL instead. In this case, this test is specifically expecting the long URL. Do you mind taking a look into this test here as well? 🙇 Thanks so much!! |
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've been testing various scenarios here and catched a bug.
Will list of the tested scenarios:
-
Create a visualization via
Visualize library
- ✅ Create a chart in Lens and share it before saving
- ✅ Create a chart in Lens, save the chart in library then share it
- ❌ Create a chart in Lens, save the chart in a new dashboard, then edit the panel and share it
- the URL leads to an empty editor
-
Create a visualization via
Dashboard
- ✅ Create a chart in Lens and share it before saving
- ✅ Create a chart in Lens and click on
Save in library
, then share it - ❌ Create a chart in Lens, save and return to dashboard, then edit the panel again and share it
- the URL leads to an empty editor
I think the problem root of both scenarios are the same. Mind that in that case the shared chart is not a SO, rather a snapshot with short URL.
@dej611 Can lens make these into saved objects vs the snapshot url? I think this is the expected behavior with snapshot urls (which is why we were discussing only saved object urls at one point). I don't think this is something that the share modal can really control for on our side. Thanks |
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.
Unskipping of Dashboard tests LGTM 🙇 I am running the two test suites through the FTR just to make sure they aren't introducing flakiness, but still approving to unblock. Thanks so much!!
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#6166[✅] test/functional/apps/dashboard/group3/config.ts: 50/50 tests passed. |
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.
Just left a few comments, but overall this is really great!
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.
Looking good overall, just left a few questions about the Data Discovery test changes.
Also I see that discover_security.ts
is checked off in the summary list, but it doesn't look like these tests have been restored yet.
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'm a bit confused about the changes here. In #180406 some of the tests in this file were removed because the new share modal defaulted to short URLs, but is that no longer the case?
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.
Good question - we are setting the data-share-url param to be long urls for their tests but yes they're going to be short urls for users.
@@ -103,8 +103,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { | |||
await PageObjects.discover.selectIndexPattern('ecommerce'); | |||
}); | |||
|
|||
// Discover defaults to short urls - is this test helpful? Clarify in separate PR | |||
xit('generates a report with single timefilter', async () => { | |||
it('generates a report with single timefilter', async () => { |
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.
It looks like the serverless version of this test in x-pack/test_serverless/functional/test_suites/common/discover/x_pack/reporting.ts
hasn't been unskipped yet.
Also there were some other minor changes to these files in #180406, like removing gte:now-24h/h,lte:now))))
from the reportURL
check, and removing await PageObjects.reporting.checkForReportingToasts()
between tests. Can any of these be restored, or is the behaviour different now?
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 like this question has been partially resolved: the serverless test isn't skipped.
I also wonder about the minor change, and wonder if we can restore the validation of the sharing URL that @davismcphee wrote about:
diff --git x-pack/test/functional/apps/discover/reporting.ts x-pack/test/functional/apps/discover/reporting.ts
index 0b193e5b850..ab5ee99448b 100644
--- x-pack/test/functional/apps/discover/reporting.ts
+++ x-pack/test/functional/apps/discover/reporting.ts
@@ -130,7 +130,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
expect(timeFiltersNumberInReportURL).to.be(1);
expect(
decodeURIComponent(reportURL).includes(
- 'query:(range:(order_date:(format:strict_date_optional_time'
+ 'query:(range:(order_date:(format:strict_date_optional_time,gte:now-24h/h,lte:now))))'
)
).to.be(true);
diff --git x-pack/test_serverless/functional/test_suites/common/discover/x_pack/reporting.ts x-pack/test_serverless/functional/test_suites/common/discover/x_pack/reporting.ts
index c0e99978750..1a500817ddd 100644
--- x-pack/test_serverless/functional/test_suites/common/discover/x_pack/reporting.ts
+++ x-pack/test_serverless/functional/test_suites/common/discover/x_pack/reporting.ts
@@ -143,7 +143,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
expect(timeFiltersNumberInReportURL).to.be(1);
expect(
decodeURIComponent(reportURL).includes(
- 'query:(range:(order_date:(format:strict_date_optional_time'
+ 'query:(range:(order_date:(format:strict_date_optional_time,gte:now-24h/h,lte:now))))'
)
).to.be(true);
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.
Thank you for pointing this out @davismcphee! Turns out you found a potential issue and now is fixed in 510d054. The tests are restored to show the absolute time of now etc. as it should be for watcher. Thanks!!
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.
LGTM, great work!
💚 Build Succeeded
Metrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @rshen91 |
Summary
Closes #181066
Closes epic https://github.com/elastic/kibana-team/issues/735
Closes #183752
Checklist