Files
grafana/e2e/old-arch/various-suite/trace-view-scrolling.spec.ts
Andre Pereira 4355b3ed0d Trace View: Span filters updated to use combobox filters (#112287)
* Start using adhoc filters component in trace view

* Migrate old span filters to adhoc filters

* Add support for duration filter

* Set placeholder in adhoc filters input

* Moved the span graph to the header, above the filters

* Update next and prev buttons, added filter pills, style fixes

* Fix types

* Use canary scenes version

* Remove copyright

* More duration operators

* Added tests for the controller

* More consistent spacing

* Remove unused container style from SpanGraph component

* Update scenes canary

* Update scenes to 6.42.0

* Fix all spans toggle

* Use InlineSwitch instead of Switch

* Fix critical path

* Fix duration filtering

* Add tooltips to filter pills

* Improve duration filter pill

* Improvements to backgrounds of span row. Fixed size of collapsible overview section

* Fix sticky trace view header

* Removed old span filters from panel options

* Migrate old filters to adhocfilters in panel. Use the adhoc filters component in panel options.

* i18n

* Fix tests

* Fix tests
2025-11-14 11:19:11 +00:00

48 lines
1.5 KiB
TypeScript

import { e2e } from '../utils';
describe('Trace view', () => {
beforeEach(() => {
e2e.flows.login(Cypress.env('USERNAME'), Cypress.env('PASSWORD'));
});
it('Can lazy load big traces', () => {
cy.intercept('POST', '**/api/ds/query*', (req) => {
if (!req.url.includes('ds_type=jaeger')) {
return;
}
req.reply({ fixture: 'long-trace-response-backend.json' });
}).as('longTrace');
e2e.pages.Explore.visit();
e2e.components.DataSourcePicker.container().should('be.visible').type('gdev-jaeger{enter}');
// Wait for the query editor to be set correctly
e2e.components.QueryEditorRows.rows().within(() => {
cy.contains('gdev-jaeger').should('be.visible');
});
// type this with 0 delay to prevent flaky tests due to cursor position changing between rerenders
e2e.components.QueryField.container().should('be.visible').type('trace', {
delay: 0,
});
// Use shift+enter to execute the query as it's more stable than clicking the execute button
e2e.components.QueryField.container().type('{shift+enter}');
cy.wait('@longTrace');
e2e.components.TraceViewer.spanBar().should('be.visible');
e2e.components.TraceViewer.spanBar().its('length').should('be.equal', 100);
e2e.pages.Explore.General.scrollView().children().first().scrollTo('bottom');
// After scrolling we should see 50 spans
e2e.components.TraceViewer.spanBar()
.its('length')
.should(($span) => {
expect($span).to.be.at.most(50);
});
});
});