mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
This commit is contained in:
parent
7bd9876453
commit
ff9caf9675
4 changed files with 13 additions and 7 deletions
|
@ -22,7 +22,8 @@ export default function ({ getPageObjects }) {
|
|||
it('is saved', async function () {
|
||||
await PageObjects.dashboard.clickNewDashboard();
|
||||
await PageObjects.dashboard.addVisualizations([PageObjects.dashboard.getTestVisualizationNames()[0]]);
|
||||
await PageObjects.dashboard.saveDashboard(dashboardName, { storeTimeWithDashboard: false });
|
||||
const isDashboardSaved = await PageObjects.dashboard.saveDashboard(dashboardName, { storeTimeWithDashboard: false });
|
||||
expect(isDashboardSaved).to.eql(true);
|
||||
});
|
||||
|
||||
it('Does not set the time picker on open', async function () {
|
||||
|
@ -41,7 +42,8 @@ export default function ({ getPageObjects }) {
|
|||
it('is saved with quick time', async function () {
|
||||
await PageObjects.dashboard.clickEdit();
|
||||
await PageObjects.header.setQuickTime('Today');
|
||||
await PageObjects.dashboard.saveDashboard(dashboardName, { storeTimeWithDashboard: true });
|
||||
const isDashboardSaved = await PageObjects.dashboard.saveDashboard(dashboardName, { storeTimeWithDashboard: true });
|
||||
expect(isDashboardSaved).to.eql(true);
|
||||
});
|
||||
|
||||
it('sets quick time on open', async function () {
|
||||
|
@ -56,7 +58,8 @@ export default function ({ getPageObjects }) {
|
|||
it('is saved with absolute time', async function () {
|
||||
await PageObjects.dashboard.clickEdit();
|
||||
await PageObjects.header.setAbsoluteRange(fromTime, toTime);
|
||||
await PageObjects.dashboard.saveDashboard(dashboardName, { storeTimeWithDashboard: true });
|
||||
const isDashboardSaved = await PageObjects.dashboard.saveDashboard(dashboardName, { storeTimeWithDashboard: true });
|
||||
expect(isDashboardSaved).to.eql(true);
|
||||
});
|
||||
|
||||
it('sets absolute time on open', async function () {
|
||||
|
|
|
@ -29,7 +29,8 @@ export default function ({ getService, getPageObjects }) {
|
|||
await PageObjects.dashboard.gotoDashboardLandingPage();
|
||||
await PageObjects.dashboard.clickNewDashboard();
|
||||
await PageObjects.dashboard.addVisualizations(PageObjects.dashboard.getTestVisualizationNames());
|
||||
await PageObjects.dashboard.saveDashboard(dashboardName);
|
||||
const isDashboardSaved = await PageObjects.dashboard.saveDashboard(dashboardName);
|
||||
expect(isDashboardSaved).to.eql(true);
|
||||
});
|
||||
|
||||
it('existing dashboard opens in view mode', async function () {
|
||||
|
|
|
@ -79,7 +79,8 @@ export default function ({ getService, getPageObjects }) {
|
|||
});
|
||||
|
||||
it('gets copied to clipboard', async function () {
|
||||
return await PageObjects.discover.clickCopyToClipboard();
|
||||
const isCopiedToClipboard = await PageObjects.discover.clickCopyToClipboard();
|
||||
expect(isCopiedToClipboard).to.eql(true);
|
||||
});
|
||||
|
||||
// TODO: verify clipboard contents
|
||||
|
@ -98,7 +99,8 @@ export default function ({ getService, getPageObjects }) {
|
|||
|
||||
// NOTE: This test has to run immediately after the test above
|
||||
it('copies short URL to clipboard', async function () {
|
||||
return await PageObjects.discover.clickCopyToClipboard();
|
||||
const isCopiedToClipboard = await PageObjects.discover.clickCopyToClipboard();
|
||||
expect(isCopiedToClipboard).to.eql(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -201,7 +201,7 @@ export function DiscoverPageProvider({ getService, getPageObjects }) {
|
|||
}
|
||||
|
||||
async clickCopyToClipboard() {
|
||||
testSubjects.click('sharedSnapshotCopyButton');
|
||||
await testSubjects.click('sharedSnapshotCopyButton');
|
||||
|
||||
// Confirm that the content was copied to the clipboard.
|
||||
return await testSubjects.exists('shareCopyToClipboardSuccess');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue