mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
* This function will be flaky if the page is still loading and newItemButton does not exist but will soon. * Skip only the other flaky test, this PR should fix the one
This commit is contained in:
parent
7bb2017389
commit
e526e0404f
2 changed files with 16 additions and 12 deletions
|
@ -34,9 +34,7 @@ export default function ({ getService, getPageObjects }) {
|
|||
const dashboardPanelActions = getService('dashboardPanelActions');
|
||||
const PageObjects = getPageObjects(['dashboard', 'header', 'visualize']);
|
||||
|
||||
// FLAKY: https://github.com/elastic/kibana/issues/41088
|
||||
// FLAKY: https://github.com/elastic/kibana/issues/41087
|
||||
describe.skip('dashboard filtering', async function () {
|
||||
describe('dashboard filtering', async function () {
|
||||
this.tags('smoke');
|
||||
before(async () => {
|
||||
await PageObjects.dashboard.gotoDashboardLandingPage();
|
||||
|
@ -219,7 +217,8 @@ export default function ({ getService, getPageObjects }) {
|
|||
await dashboardExpect.tsvbMarkdownWithValuesExists(['7,209.286']);
|
||||
});
|
||||
|
||||
it('saved searches', async () => {
|
||||
// FLAKY: https://github.com/elastic/kibana/issues/41087
|
||||
it.skip('saved searches', async () => {
|
||||
await dashboardExpect.savedSearchRowCount(1);
|
||||
});
|
||||
|
||||
|
|
|
@ -217,15 +217,20 @@ export function DashboardPageProvider({ getService, getPageObjects }) {
|
|||
}
|
||||
|
||||
async clickNewDashboard() {
|
||||
// newItemButton button is only visible when dashboard listing table is displayed
|
||||
// (at least one dashboard).
|
||||
const exists = await testSubjects.exists('newItemButton');
|
||||
if (exists) {
|
||||
return await testSubjects.click('newItemButton');
|
||||
}
|
||||
// One or the other will eventually show up on the landing page, depending on whether there are
|
||||
// dashboards.
|
||||
await retry.try(async () => {
|
||||
const createNewItemButtonExists = await testSubjects.exists('newItemButton');
|
||||
if (createNewItemButtonExists) {
|
||||
return await testSubjects.click('newItemButton');
|
||||
}
|
||||
const createNewItemPromptExists = await this.getCreateDashboardPromptExists();
|
||||
if (createNewItemPromptExists) {
|
||||
return await this.clickCreateDashboardPrompt();
|
||||
}
|
||||
|
||||
// If no dashboards exist, then newItemButton to create a new dashboard.
|
||||
return await this.clickCreateDashboardPrompt();
|
||||
throw new Error('Page is still loading... waiting for create new prompt or button to appear');
|
||||
});
|
||||
}
|
||||
|
||||
async clickCreateDashboardPrompt() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue