[Time to Visualize] Dashboard Save As New by Default (#91761) (#91905)

* changed dashboard save as to have save as new switch on by default
This commit is contained in:
Devon Thomson 2021-02-18 16:03:15 -05:00 committed by GitHub
parent ee2e483382
commit 8537f25996
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

View file

@ -2,6 +2,7 @@
exports[`renders DashboardSaveModal 1`] = `
<SavedObjectSaveModal
initialCopyOnSave={true}
objectType="dashboard"
onClose={[Function]}
onSave={[Function]}

View file

@ -147,6 +147,7 @@ export class DashboardSaveModal extends React.Component<Props, State> {
onClose={this.props.onClose}
title={this.props.title}
showCopyOnSave={this.props.showCopyOnSave}
initialCopyOnSave={this.props.showCopyOnSave}
objectType="dashboard"
options={this.renderDashboardSaveOptions()}
showDescription={false}

View file

@ -425,8 +425,9 @@ export function DashboardPageProvider({ getService, getPageObjects }: FtrProvide
await this.setStoreTimeWithDashboard(saveOptions.storeTimeWithDashboard);
}
if (saveOptions.saveAsNew !== undefined) {
await this.setSaveAsNewCheckBox(saveOptions.saveAsNew);
const saveAsNewCheckboxExists = await testSubjects.exists('saveAsNewCheckbox');
if (saveAsNewCheckboxExists) {
await this.setSaveAsNewCheckBox(Boolean(saveOptions.saveAsNew));
}
if (saveOptions.tags) {