Commit abb015ba by Steven Vachon Committed by GitHub

@grafana/e2e: flaky chart data workaround (#27687)

Don't expect initial chart data when creating a panel that hasn't yet populated its query editor
parent 98f7a2ac
...@@ -127,15 +127,20 @@ export const configurePanel = (config: PartialAddPanelConfig | PartialEditPanelC ...@@ -127,15 +127,20 @@ export const configurePanel = (config: PartialAddPanelConfig | PartialEditPanelC
// @todo instead wait for '@pluginModule' // @todo instead wait for '@pluginModule'
e2e().wait(2000); e2e().wait(2000);
if (!isExplore) { // There is no usable data when the query is empty,
// and Cypress had an issue with some plugins where the request wasn't noticed, despite occuring in manual tests
if (isEdit) {
// Avoid cache flakiness (where @chartData isn't requested) // Avoid cache flakiness (where @chartData isn't requested)
// @todo this may not be necessary anymore
e2e() e2e()
.get('.refresh-picker-buttons .btn') .get('.refresh-picker-buttons .btn')
.first() .first()
.click({ force: true }); .click({ force: true });
e2e().wait('@chartData'); e2e().wait('@chartData');
}
if (!isExplore) {
// `panelTitle` is needed to edit the panel, and unlikely to have its value changed at that point // `panelTitle` is needed to edit the panel, and unlikely to have its value changed at that point
const changeTitle = panelTitle && !isEdit; const changeTitle = panelTitle && !isEdit;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment