@grafana/e2e: avoid query data flakiness (#27511)

This commit is contained in:
Steven Vachon 2020-09-10 11:40:44 -04:00 committed by GitHub
parent ee91fc365e
commit d9320e37f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -127,9 +127,15 @@ export const configurePanel = (config: PartialAddPanelConfig | PartialEditPanelC
// @todo instead wait for '@pluginModule'
e2e().wait(2000);
e2e().wait('@chartData');
if (!isExplore) {
// Avoid cache flakiness (where @chartData isn't requested)
e2e()
.get('.refresh-picker-buttons .btn')
.first()
.click({ force: true });
e2e().wait('@chartData');
// `panelTitle` is needed to edit the panel, and unlikely to have its value changed at that point
const changeTitle = panelTitle && !isEdit;