mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
@grafana/e2e: improvements (#25677)
* Minor changes * Fixed data source selection issue … where it appeared as though the wrong one was selected * Fixed “executing a canceled action” issue ... thrown from RxJS
This commit is contained in:
parent
cf109df887
commit
5b5b247cb1
@ -38,12 +38,21 @@ export const addPanel = (config?: Partial<AddPanelConfig>): any =>
|
|||||||
.route('POST', '/api/ds/query')
|
.route('POST', '/api/ds/query')
|
||||||
.as('chartData');
|
.as('chartData');
|
||||||
|
|
||||||
e2e()
|
e2e.components.DataSourcePicker.container().within(() => {
|
||||||
.get('.ds-picker')
|
e2e()
|
||||||
.click()
|
.get('[class$="-input-suffix"]')
|
||||||
.contains('[id^="react-select-"][id*="-option-"]', dataSourceName)
|
.click();
|
||||||
.scrollIntoView()
|
e2e.components.Select.option()
|
||||||
.click();
|
.filter(`:contains("${dataSourceName}")`)
|
||||||
|
.scrollIntoView()
|
||||||
|
.click();
|
||||||
|
e2e()
|
||||||
|
.root()
|
||||||
|
.scrollIntoView();
|
||||||
|
});
|
||||||
|
|
||||||
|
// @todo instead wait for '@pluginModule'
|
||||||
|
e2e().wait(2000);
|
||||||
|
|
||||||
openOptions();
|
openOptions();
|
||||||
|
|
||||||
@ -56,8 +65,7 @@ export const addPanel = (config?: Partial<AddPanelConfig>): any =>
|
|||||||
closeOptionsGroup('settings');
|
closeOptionsGroup('settings');
|
||||||
|
|
||||||
openOptionsGroup('type');
|
openOptionsGroup('type');
|
||||||
e2e()
|
e2e.components.PluginVisualization.item(visualizationName)
|
||||||
.get(`[aria-label="Plugin visualization item ${visualizationName}"]`)
|
|
||||||
.scrollIntoView()
|
.scrollIntoView()
|
||||||
.click();
|
.click();
|
||||||
closeOptionsGroup('type');
|
closeOptionsGroup('type');
|
||||||
@ -77,6 +85,11 @@ export const addPanel = (config?: Partial<AddPanelConfig>): any =>
|
|||||||
.get('button[title="Apply changes and go back to dashboard"]')
|
.get('button[title="Apply changes and go back to dashboard"]')
|
||||||
.click();
|
.click();
|
||||||
|
|
||||||
|
e2e().wait('@chartData');
|
||||||
|
|
||||||
|
// Wait for RxJS
|
||||||
|
e2e().wait(500);
|
||||||
|
|
||||||
// @todo remove `wrap` when possible
|
// @todo remove `wrap` when possible
|
||||||
return e2e().wrap({ config: fullConfig });
|
return e2e().wrap({ config: fullConfig });
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user