TraceViewer: Fix lazy loading (#30700)

* Trace: Fix lazy loading

* Add e2e test for trace view lazy load scrolling

* Remove sensitive information

* Update e2e/suite1/specs/trace-view-scrolling.ts

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>

* Address review comments

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
This commit is contained in:
Zoltán Bedi
2021-02-02 10:17:38 +01:00
committed by GitHub
parent ffc6eda351
commit 76d02048fa
8 changed files with 7644 additions and 17 deletions

View File

@@ -0,0 +1,30 @@
import { e2e } from '@grafana/e2e';
describe('Trace view', () => {
it('Can lazy load big traces', () => {
e2e.flows.login('admin', 'admin');
e2e().intercept('GET', '/api/datasources/proxy/29/api/traces/long-trace', {
fixture: 'long-trace-response.json',
});
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();
});
e2e.components.QueryField.container().should('be.visible').type('long-trace');
e2e.components.RefreshPicker.runButton().should('be.visible').click();
e2e.components.TraceViewer.spanBar().should('have.length', 100);
e2e.pages.Explore.General.scrollBar().scrollTo('center');
// After scrolling we should have 140 spans instead of the first 100
e2e.components.TraceViewer.spanBar().should('have.length', 140);
});
});