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()
|
|
|
|
.intercept('GET', '/api/traces/long-trace', {
|
|
|
|
fixture: 'long-trace-response.json',
|
|
|
|
})
|
|
|
|
.as('longTrace');
|
2021-02-02 03:17:38 -06:00
|
|
|
|
|
|
|
e2e.pages.Explore.visit();
|
|
|
|
|
|
|
|
e2e.components.DataSourcePicker.container()
|
|
|
|
.should('be.visible')
|
|
|
|
.within(() => {
|
|
|
|
e2e.components.Select.input().should('be.visible').click();
|
|
|
|
|
|
|
|
e2e().contains('gdev-jaeger').scrollIntoView().should('be.visible').click();
|
|
|
|
});
|
|
|
|
|
2021-05-11 03:38:10 -05:00
|
|
|
e2e.components.DataSource.Jaeger.traceIDInput().should('be.visible').type('long-trace');
|
2021-02-02 03:17:38 -06:00
|
|
|
|
|
|
|
e2e.components.RefreshPicker.runButton().should('be.visible').click();
|
|
|
|
|
2021-02-24 07:18:52 -06:00
|
|
|
e2e().wait('@longTrace');
|
|
|
|
|
2021-02-02 03:17:38 -06:00
|
|
|
e2e.components.TraceViewer.spanBar().should('have.length', 100);
|
2021-02-24 07:18:52 -06:00
|
|
|
|
2021-02-02 03:17:38 -06:00
|
|
|
e2e.pages.Explore.General.scrollBar().scrollTo('center');
|
|
|
|
|
2021-05-26 08:11:47 -05:00
|
|
|
// After scrolling we should load more spans
|
|
|
|
e2e.components.TraceViewer.spanBar().should('have.length', 140);
|
2021-02-02 03:17:38 -06:00
|
|
|
});
|
|
|
|
});
|