ChangeTracker: Unified unsaved changes handling with library panels (#34989) (#35091)

* UnsavedChanges: Move Change tracker to use Prompt

* Fix a lot of race conditions and stacking of changes in onConfirm and onDismiss

* Listen to save event

* add missing delay argument

* migrated the change tracker unit tests

* Updated snapshot

* Removed unessary action

* removed updateSourcePanel

* Fix hiding save library panel modal prompt when clicking discard

* change saved libray panel title and buttons so they are a bit different as Prompt and when used from save button

* Fixed issue with saving new dashboard

* Now all scenarios work

* increase wait time

* Fixed one more race condition

(cherry picked from commit e6f2b10a36)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
This commit is contained in:
Grot (@grafanabot)
2021-06-02 13:20:13 +02:00
committed by GitHub
co-authored by Torkel Ödegaard
parent 38f58cc42b
commit ebe4596c75
15 changed files with 538 additions and 328 deletions
@@ -77,6 +77,7 @@ export const addDashboard = (config?: Partial<AddDashboardConfig>) => {
return e2e()
.url()
.should('contain', '/d/')
.then((url: string) => {
const uid = getDashboardUid(url);