forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expand coverage of dashboard tests (elastic#17703)
* Expand coverage of dashboard tests and decrease time * Fix timing error when sub urls fail to save from too fast app link clicking * discover doesn't have breadcrumbs * Check top nav text so it works on both listing and saved object edit/view pages * need to do the add panel operations one at a time * Need both types of input in filter * Give test data a title * Remove incorrect and unnecessary comment * Move data around and get rid of 6_3 specific naming as we will end up migrating the data as we progress * Remove code accidentally checked in
- Loading branch information
1 parent
538b58c
commit afaff1b
Showing
50 changed files
with
2,167 additions
and
661 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
test/functional/apps/dashboard/_create_and_add_embeddables.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import expect from 'expect.js'; | ||
|
||
import { | ||
VisualizeConstants | ||
} from '../../../../src/core_plugins/kibana/public/visualize/visualize_constants'; | ||
|
||
export default function ({ getService, getPageObjects }) { | ||
const retry = getService('retry'); | ||
const PageObjects = getPageObjects(['dashboard', 'header', 'visualize']); | ||
const remote = getService('remote'); | ||
const dashboardAddPanel = getService('dashboardAddPanel'); | ||
|
||
describe('create and add embeddables', async () => { | ||
before(async () => { | ||
await PageObjects.dashboard.loadSavedDashboard('few panels'); | ||
}); | ||
|
||
describe('add new visualization link', () => { | ||
it('adds a new visualization', async () => { | ||
const originalPanelCount = await PageObjects.dashboard.getPanelCount(); | ||
await PageObjects.dashboard.clickEdit(); | ||
await dashboardAddPanel.ensureAddPanelIsShowing(); | ||
await dashboardAddPanel.clickAddNewEmbeddableLink(); | ||
await PageObjects.visualize.clickAreaChart(); | ||
await PageObjects.visualize.clickNewSearch(); | ||
await PageObjects.visualize.saveVisualization('visualization from add new link'); | ||
|
||
return retry.try(async () => { | ||
const panelCount = await PageObjects.dashboard.getPanelCount(); | ||
expect(panelCount).to.eql(originalPanelCount + 1); | ||
}); | ||
}); | ||
|
||
it('saves the saved visualization url to the app link', async () => { | ||
await PageObjects.header.clickVisualize(); | ||
const currentUrl = await remote.getCurrentUrl(); | ||
expect(currentUrl).to.contain(VisualizeConstants.EDIT_PATH); | ||
}); | ||
|
||
after(async () => { | ||
await PageObjects.header.clickDashboard(); | ||
}); | ||
}); | ||
}); | ||
} | ||
|
Oops, something went wrong.