2021-02-02 03:17:38 -06:00
|
|
|
import { e2e } from '@grafana/e2e';
|
|
|
|
|
|
|
|
describe('Trace view', () => {
|
|
|
|
it('Can lazy load big traces', () => {
|
|
|
|
e2e.flows.login('admin', 'admin');
|
2021-02-24 07:18:52 -06:00
|
|
|
e2e()
|
2021-06-16 07:34:56 -05:00
|
|
|
.intercept('GET', '**/api/traces/long-trace', {
|
2021-02-24 07:18:52 -06:00
|
|
|
fixture: 'long-trace-response.json',
|
|
|
|
})
|
|
|
|
.as('longTrace');
|
2021-02-02 03:17:38 -06:00
|
|
|
|
|
|
|
e2e.pages.Explore.visit();
|
|
|
|
|
2021-11-26 09:38:48 -06:00
|
|
|
e2e.components.DataSourcePicker.container().should('be.visible').type('gdev-jaeger{enter}');
|
2021-07-14 08:04:23 -05:00
|
|
|
|
2021-08-25 04:30:32 -05:00
|
|
|
e2e.components.QueryField.container().should('be.visible').type('long-trace');
|
2021-02-02 03:17:38 -06:00
|
|
|
|
2021-08-27 03:36:18 -05:00
|
|
|
e2e().wait(500);
|
|
|
|
|
2021-11-10 04:01:06 -06:00
|
|
|
e2e.components.RefreshPicker.runButtonV2().should('be.visible').click();
|
2021-02-02 03:17:38 -06:00
|
|
|
|
2021-02-24 07:18:52 -06:00
|
|
|
e2e().wait('@longTrace');
|
|
|
|
|
2021-08-25 04:30:32 -05:00
|
|
|
e2e.components.TraceViewer.spanBar().should('be.visible');
|
2021-02-24 07:18:52 -06:00
|
|
|
|
2021-09-15 10:26:23 -05:00
|
|
|
e2e.components.TraceViewer.spanBar()
|
|
|
|
.its('length')
|
|
|
|
.then((oldLength) => {
|
2022-05-03 09:28:40 -05:00
|
|
|
e2e.pages.Explore.General.scrollView().children('.scrollbar-view').scrollTo('center');
|
2021-02-02 03:17:38 -06:00
|
|
|
|
2021-09-15 10:26:23 -05:00
|
|
|
// After scrolling we should load more spans
|
|
|
|
e2e.components.TraceViewer.spanBar().its('length').should('be.gt', oldLength);
|
|
|
|
});
|
2021-02-02 03:17:38 -06:00
|
|
|
});
|
|
|
|
});
|