mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Variables: Adds loading state and indicators (#27917)
* Refactor: Replaces initLock with state machine * Refactor: removes some states for now * Refactor: adds loading state in OptionsPicker * Refactor: major refactor of load state * Refactor: fixes updating graph in parallell * Refactor: moves error handling to updateOptions * Refactor: fixes the last cases * Tests: disables variable e2e again * Chore: removes nova config * Refactor: small changes when going through the code again * Refactor: fixes typings * Refactor: changes after PR comments * Refactor: split up onTimeRangeUpdated and fixed some error handling * Tests: removes unused func * Tests: fixes typing
This commit is contained in:
@@ -30,15 +30,11 @@ describe.skip('Variables', () => {
|
||||
if (!lastUid || !lastData) {
|
||||
e2e.flows.addDataSource();
|
||||
e2e.flows.addDashboard();
|
||||
lastUid = 'test';
|
||||
lastData = 'test';
|
||||
} else {
|
||||
e2e.setScenarioContext({ lastAddedDataSource: lastData, lastAddedDashboardUid: lastUid });
|
||||
e2e.flows.openDashboard();
|
||||
}
|
||||
|
||||
e2e.getScenarioContext().then(({ lastAddedDashboardUid, lastAddedDataSource }: any) => {
|
||||
e2e.flows.openDashboard({ uid: lastAddedDashboardUid });
|
||||
lastUid = lastAddedDashboardUid;
|
||||
lastData = lastAddedDataSource;
|
||||
});
|
||||
});
|
||||
|
||||
it(`asserts defaults`, () => {
|
||||
@@ -254,7 +250,7 @@ const createQueryVariable = ({ name, label, dataSourceName, query }: CreateQuery
|
||||
expect(input.attr('placeholder')).equals('blank = auto');
|
||||
expect(input.val()).equals('');
|
||||
});
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.addButton().click();
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.submitButton().click();
|
||||
};
|
||||
|
||||
const assertVariableLabelAndComponent = ({ label, options, selectedOption }: VariablesData) => {
|
||||
|
||||
Reference in New Issue
Block a user