Skip to content
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

[Dashboard] Retain Tags on Quicksave #111015

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixed missing tags api when loading saved dashboard. Added tests
  • Loading branch information
ThomThomson committed Sep 2, 2021
commit 77726fb0f9cf2a7f320f62114fd171b9afa3d4c9
Original file line number Diff line number Diff line change
@@ -127,6 +127,7 @@ export const useDashboardAppState = ({
savedDashboards,
kbnUrlStateStorage,
initializerContext,
savedObjectsTagging,
isEmbeddedExternally,
dashboardCapabilities,
dispatchDashboardStateChange,
20 changes: 13 additions & 7 deletions test/functional/page_objects/dashboard_page.ts
Original file line number Diff line number Diff line change
@@ -284,9 +284,11 @@ export class DashboardPageObject extends FtrService {
}

public async clickQuickSave() {
await this.expectQuickSaveButtonEnabled();
this.log.debug('clickQuickSave');
await this.testSubjects.click('dashboardQuickSaveMenuItem');
await this.retry.try(async () => {
await this.expectQuickSaveButtonEnabled();
this.log.debug('clickQuickSave');
await this.testSubjects.click('dashboardQuickSaveMenuItem');
});
}

public async clickNewDashboard(continueEditing = false) {
@@ -392,10 +394,11 @@ export class DashboardPageObject extends FtrService {
*/
public async saveDashboard(
dashboardName: string,
saveOptions: SaveDashboardOptions = { waitDialogIsClosed: true, exitFromEditMode: true }
saveOptions: SaveDashboardOptions = { waitDialogIsClosed: true, exitFromEditMode: true },
clickMenuItem = true
) {
await this.retry.try(async () => {
await this.enterDashboardTitleAndClickSave(dashboardName, saveOptions);
await this.enterDashboardTitleAndClickSave(dashboardName, saveOptions, clickMenuItem);

if (saveOptions.needsConfirm) {
await this.ensureDuplicateTitleCallout();
@@ -435,9 +438,12 @@ export class DashboardPageObject extends FtrService {
*/
public async enterDashboardTitleAndClickSave(
dashboardTitle: string,
saveOptions: SaveDashboardOptions = { waitDialogIsClosed: true }
saveOptions: SaveDashboardOptions = { waitDialogIsClosed: true },
clickMenuItem = true
) {
await this.testSubjects.click('dashboardSaveMenuItem');
if (clickMenuItem) {
await this.testSubjects.click('dashboardSaveMenuItem');
}
const modalDialog = await this.testSubjects.find('savedObjectSaveModal');

this.log.debug('entering new title');
5 changes: 1 addition & 4 deletions x-pack/test/functional/apps/dashboard/dashboard_tagging.ts
Original file line number Diff line number Diff line change
@@ -12,10 +12,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const listingTable = getService('listingTable');
const testSubjects = getService('testSubjects');
const esArchiver = getService('esArchiver');
const retry = getService('retry');
const find = getService('find');
const dashboardAddPanel = getService('dashboardAddPanel');
const dashboardPanelActions = getService('dashboardPanelActions');
const PageObjects = getPageObjects([
'common',
'tagManagement',
@@ -28,7 +25,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const dashboardTag = 'extremely-cool-dashboard';
const dashboardTitle = 'Coolest Blank Dashboard';

describe.only('dashboard tagging', () => {
describe('dashboard tagging', () => {
const verifyTagFromListingPage = async () => {
await PageObjects.dashboard.gotoDashboardLandingPage();
await listingTable.waitUntilTableIsLoaded();