mirror of
https://github.com/grafana/grafana.git
synced 2025-07-31 06:32:17 +08:00
Build URL params and include requestId (#65742)
* add requestId and ds_type to datasource request url
This commit is contained in:
@ -11,24 +11,30 @@ describe('MySQL datasource', () => {
|
||||
it('code editor autocomplete should handle table name escaping/quoting', () => {
|
||||
e2e.flows.login('admin', 'admin');
|
||||
|
||||
e2e().intercept('POST', '**/api/ds/query', (req) => {
|
||||
if (req.body.queries[0].refId === 'datasets') {
|
||||
req.alias = 'datasets';
|
||||
req.reply({
|
||||
body: datasetResponse,
|
||||
});
|
||||
} else if (req.body.queries[0].refId === 'tables') {
|
||||
req.alias = 'tables';
|
||||
req.reply({
|
||||
body: tablesResponse,
|
||||
});
|
||||
} else if (req.body.queries[0].refId === 'fields') {
|
||||
req.alias = 'fields';
|
||||
req.reply({
|
||||
body: fieldsResponse,
|
||||
});
|
||||
e2e().intercept(
|
||||
'POST',
|
||||
{
|
||||
pathname: '/api/ds/query',
|
||||
},
|
||||
(req) => {
|
||||
if (req.body.queries[0].refId === 'datasets') {
|
||||
req.alias = 'datasets';
|
||||
req.reply({
|
||||
body: datasetResponse,
|
||||
});
|
||||
} else if (req.body.queries[0].refId === 'tables') {
|
||||
req.alias = 'tables';
|
||||
req.reply({
|
||||
body: tablesResponse,
|
||||
});
|
||||
} else if (req.body.queries[0].refId === 'fields') {
|
||||
req.alias = 'fields';
|
||||
req.reply({
|
||||
body: fieldsResponse,
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
);
|
||||
|
||||
e2e.pages.Explore.visit();
|
||||
|
||||
|
Reference in New Issue
Block a user