diff --git a/cypress/integration/basic.ts b/cypress/integration/basic.ts index ebd0b98fa6..4997d20a59 100644 --- a/cypress/integration/basic.ts +++ b/cypress/integration/basic.ts @@ -18,6 +18,15 @@ describe('basic test', () => { cy.location('pathname').should('eq', '/'); }); + it('updates flamegraph on app name change', () => { + cy.visit('/') + waitInDevMode(100); + + cy.findByTestId('app-name-selector').select('pyroscope.server.cpu'); + waitInDevMode(100); + cy.findByTestId('flamegraph-canvas').invoke('attr', 'data-appname').should('eq', 'pyroscope.server.cpu{}'); + }); + it('view buttons should change view when clicked', () => { cy.visit('/') cy.findByTestId('btn-table-view').click(); diff --git a/webapp/__tests__/__snapshots__/NameSelector.spec.js.snap b/webapp/__tests__/__snapshots__/NameSelector.spec.js.snap index ab8a29a484..fe8d8f1155 100644 --- a/webapp/__tests__/__snapshots__/NameSelector.spec.js.snap +++ b/webapp/__tests__/__snapshots__/NameSelector.spec.js.snap @@ -5,6 +5,7 @@ exports[`NameSelector render correctly NameSelector component 1`] = ` Application: