mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
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:
30
e2e/suite1/specs/trace-view-scrolling.spec.ts
Normal file
30
e2e/suite1/specs/trace-view-scrolling.spec.ts
Normal 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);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user