mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[Dashboard] Fix flaky landing page test (#160066)
Closes https://github.com/elastic/kibana/issues/160057 ## Summary It **seems** like the failure was a one-off or, at the very least, very rare - I [ran the test through the flaky test runner](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2423) without any changes and it passed 100 times. That being said, I was able to replicate the failure locally by switching to the preset "Slow 3G" network before running the test - this means, if the CI environment is running especially slow for any given reason, this test has the potential to fail again. So, to be safe, I added an extra `await` for the Kibana **chrome** to show up after every hard refresh - previously we were only waiting for the header loading state to go away, which doesn't work when Kibana itself is taking a little longer than expected to load and the Kibana chrome (where the header loading state is located) isn't yet visible. This **also** [passed the flaky test runner 100 times](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2425) but, as a bonus, the test **passed locally** when throttling the network using the same "Slow 3G" preset as before - hopefully this means that the test is less likely to fail even when the CI environment is running slow 👍 ### Checklist - [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 - [ ] 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)
This commit is contained in:
parent
8d67824556
commit
0fcd4e88d3
1 changed files with 7 additions and 0 deletions
|
@ -121,6 +121,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
const useTimeStamp = true;
|
||||
await browser.get(newUrl.toString(), useTimeStamp);
|
||||
|
||||
await PageObjects.header.awaitKibanaChrome();
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
const onDashboardLandingPage = await PageObjects.dashboard.onDashboardLandingPage();
|
||||
expect(onDashboardLandingPage).to.equal(false);
|
||||
});
|
||||
|
@ -133,6 +135,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
const useTimeStamp = true;
|
||||
await browser.get(newUrl.toString(), useTimeStamp);
|
||||
|
||||
await PageObjects.header.awaitKibanaChrome();
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
const onDashboardLandingPage = await PageObjects.dashboard.onDashboardLandingPage();
|
||||
expect(onDashboardLandingPage).to.equal(false);
|
||||
});
|
||||
|
@ -145,6 +149,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
const useTimeStamp = true;
|
||||
await browser.get(newUrl.toString(), useTimeStamp);
|
||||
|
||||
await PageObjects.header.awaitKibanaChrome();
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
const onDashboardLandingPage = await PageObjects.dashboard.onDashboardLandingPage();
|
||||
expect(onDashboardLandingPage).to.equal(true);
|
||||
|
@ -165,6 +170,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
const useTimeStamp = true;
|
||||
await browser.get(newUrl.toString(), useTimeStamp);
|
||||
|
||||
await PageObjects.header.awaitKibanaChrome();
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
const onDashboardLandingPage = await PageObjects.dashboard.onDashboardLandingPage();
|
||||
expect(onDashboardLandingPage).to.equal(true);
|
||||
|
@ -188,6 +194,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
const useTimeStamp = true;
|
||||
await browser.get(newUrl.toString(), useTimeStamp);
|
||||
|
||||
await PageObjects.header.awaitKibanaChrome();
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
const onDashboardLandingPage = await PageObjects.dashboard.onDashboardLandingPage();
|
||||
expect(onDashboardLandingPage).to.equal(false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue