Skip to content

Commit

Permalink
fix dashboard duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
thmsobrmlr committed Dec 22, 2023
1 parent a91781d commit 916381c
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions cypress/e2e/dashboard-duplication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ describe('duplicating dashboards', () => {
cy.get('[data-attr="more-button"]').click()
})
duplicateDashboardFromMenu()
cy.get('h1.page-title').should('have.text', expectedCopiedDashboardName)
cy.get('[data-attr="top-bar-name"] .EditableField__display').should(
'have.text',
expectedCopiedDashboardName
)

cy.wait('@createDashboard').then(() => {
cy.get('.CardMeta h4').should('have.text', insightName).should('not.have.text', '(Copy)')
Expand All @@ -50,7 +53,10 @@ describe('duplicating dashboards', () => {
cy.get('[data-attr="more-button"]').click()
})
duplicateDashboardFromMenu(true)
cy.get('h1.page-title').should('have.text', expectedCopiedDashboardName)
cy.get('[data-attr="top-bar-name"] .EditableField__display').should(
'have.text',
expectedCopiedDashboardName
)

cy.wait('@createDashboard').then(() => {
cy.contains('h4', expectedCopiedInsightName).click()
Expand All @@ -69,7 +75,10 @@ describe('duplicating dashboards', () => {

cy.get('[data-attr="dashboard-three-dots-options-menu"]').click()
duplicateDashboardFromMenu()
cy.get('h1.page-title').should('have.text', expectedCopiedDashboardName)
cy.get('[data-attr="top-bar-name"] .EditableField__display').should(
'have.text',
expectedCopiedDashboardName
)

cy.wait('@createDashboard').then(() => {
cy.get('.CardMeta h4').should('have.text', insightName).should('not.have.text', '(Copy)')
Expand All @@ -86,7 +95,10 @@ describe('duplicating dashboards', () => {

cy.get('[data-attr="dashboard-three-dots-options-menu"]').click()
duplicateDashboardFromMenu(true)
cy.get('h1.page-title').should('have.text', expectedCopiedDashboardName)
cy.get('[data-attr="top-bar-name"] .EditableField__display').should(
'have.text',
expectedCopiedDashboardName
)

cy.wait('@createDashboard').then(() => {
cy.contains('h4', expectedCopiedInsightName).click()
Expand Down

0 comments on commit 916381c

Please sign in to comment.