Skip to content

Commit adb9d91

Browse files
fix(6562): update shared dashboardsView on iox (#6573)
* test(dashboardsView): skip the test for iox orgs * test(dashboardsView): check 404 page for iox orgs * test(dashboardsView):: add feature flag for pre marty release IOx account * test: check dashboards button should not show for new iox orgs
1 parent 2b50aea commit adb9d91

File tree

1 file changed

+30
-5
lines changed

1 file changed

+30
-5
lines changed

cypress/e2e/shared/dashboardsView.test.ts

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
import {Organization} from '../../../src/types'
22
import {points} from '../../support/commands'
33

4-
describe.skip('Dashboard', () => {
4+
const isIOxOrg = Boolean(Cypress.env('useIox'))
5+
const isTSMOrg = !isIOxOrg
6+
7+
describe('Dashboard - TSM and pre marty release IOx', () => {
58
beforeEach(() => {
69
cy.flush()
710
cy.signin()
8-
cy.fixture('routes').then(({orgs}) => {
9-
cy.get<Organization>('@org').then(({id: orgID}: Organization) => {
10-
cy.visit(`${orgs}/${orgID}/dashboards-list`)
11-
cy.getByTestID('tree-nav')
11+
cy.setFeatureFlags({
12+
showDashboardsInNewIOx: true,
13+
showVariablesInNewIOx: true,
14+
}).then(() => {
15+
cy.fixture('routes').then(({orgs}) => {
16+
cy.get<Organization>('@org').then(({id: orgID}: Organization) => {
17+
cy.visit(`${orgs}/${orgID}/dashboards-list`)
18+
cy.getByTestID('tree-nav')
19+
})
1220
})
1321
})
1422
})
@@ -533,3 +541,20 @@ describe.skip('Dashboard', () => {
533541
})
534542
})
535543
})
544+
545+
describe('Dashboard - post marty release IOx', () => {
546+
it('should not show Dashboard', () => {
547+
cy.skipOn(isTSMOrg)
548+
549+
cy.flush()
550+
cy.signin()
551+
cy.fixture('routes').then(({orgs}) => {
552+
cy.get<Organization>('@org').then(({id: orgID}: Organization) => {
553+
cy.visit(`${orgs}/${orgID}/dashboards-list`)
554+
cy.getByTestID('tree-nav').should('be.visible')
555+
cy.getByTestID('nav-item-dashboards').should('not.exist')
556+
})
557+
})
558+
cy.contains('404: Page Not Found')
559+
})
560+
})

0 commit comments

Comments
 (0)