diff --git a/cypress/productAnalytics/index.ts b/cypress/productAnalytics/index.ts index be38c6e01b393..fb6a2e3f029f7 100644 --- a/cypress/productAnalytics/index.ts +++ b/cypress/productAnalytics/index.ts @@ -103,9 +103,9 @@ export const insight = { cy.get('[data-attr="insight-save-button"]').click() // Save the insight cy.url().should('not.include', '/new') // wait for insight to complete and update URL - cy.get('[data-attr="edit-prop-name"]').click({ force: true }) // Rename insight, out of view, must force - cy.get('[data-attr="insight-name"] input').type(insightName) - cy.get('[data-attr="insight-name"] [title="Save"]').click() + cy.get('[data-attr="top-bar-name"] button').click() + cy.get('[data-attr="top-bar-name"] input').clear().type(insightName) + cy.get('[data-attr="top-bar-name"] [title="Save"]').click() }, addInsightToDashboard: (dashboardName: string, options: { visitAfterAdding: boolean }): void => { cy.intercept('PATCH', /api\/projects\/\d+\/insights\/\d+\/.*/).as('patchInsight') @@ -155,17 +155,18 @@ export const dashboards = { createDashboardFromDefaultTemplate: (dashboardName: string): void => { cy.get('[data-attr="new-dashboard"]').click() cy.get('[data-attr="create-dashboard-from-template"]').click() - cy.get('[data-attr="dashboard-name"]').contains('Product analytics').should('exist') - cy.get('[data-attr="dashboard-name"] button').click() - cy.get('[data-attr="dashboard-name"] input').clear().type(dashboardName).blur() + cy.get('[data-attr="top-bar-name"]').contains('Product analytics').should('exist') + cy.get('[data-attr="top-bar-name"] button').click() + cy.get('[data-attr="top-bar-name"] input').clear().type(dashboardName).blur() cy.contains(dashboardName).should('exist') }, createAndGoToEmptyDashboard: (dashboardName: string): void => { cy.get('[data-attr="new-dashboard"]').click() cy.get('[data-attr="create-dashboard-blank"]').click() - cy.get('[data-attr="dashboard-name"]').should('exist') - cy.get('[data-attr="dashboard-name"] button').click() - cy.get('[data-attr="dashboard-name"] input').clear().type(dashboardName).blur() + cy.get('[data-attr="top-bar-name"]').should('exist') + cy.get('[data-attr="top-bar-name"] button').click() + cy.get('[data-attr="top-bar-name"] input').clear().type(dashboardName) + cy.get('[data-attr="top-bar-name"] [title="Save"]').click() cy.contains(dashboardName).should('exist') }, visitDashboard: (dashboardName: string): void => { @@ -185,10 +186,10 @@ export const dashboard = { cy.get('[data-attr=toast-close-button]').click({ multiple: true }) if (insightName) { - cy.get('[data-attr="insight-name"] [data-attr="edit-prop-name"]').click() - cy.get('[data-attr="insight-name"] input').type(insightName) - cy.get('[data-attr="insight-name"] [title="Save"]').click() - cy.get('h1.page-title').should('have.text', insightName) + cy.get('[data-attr="top-bar-name"] button').click() + cy.get('[data-attr="top-bar-name"] input').clear().type(insightName) + cy.get('[data-attr="top-bar-name"] [title="Save"]').click() + cy.get('[data-attr="top-bar-name"]').should('have.text', insightName) } cy.get('[data-attr=insight-save-button]').contains('Save & add to dashboard').click() diff --git a/frontend/src/layout/navigation-3000/components/TopBar.tsx b/frontend/src/layout/navigation-3000/components/TopBar.tsx index af640b56fcf41..97bcf22130150 100644 --- a/frontend/src/layout/navigation-3000/components/TopBar.tsx +++ b/frontend/src/layout/navigation-3000/components/TopBar.tsx @@ -201,7 +201,7 @@ function Here({ breadcrumb }: HereProps): JSX.Element { const { tentativelyRename, finishRenaming } = useActions(breadcrumbsLogic) return ( -

+

{breadcrumb.name == null ? ( ) : breadcrumb.onRename ? (