Skip to content

Commit 2232590

Browse files
authored
fix(6562): dashboard tests passing on iox (#6567)
* fix(6562): get cloud/dashboardsView and shared/dashboardsIndex running on iox * fix(6562): shared/dashboardsRefresh, shared/dashboardsVariables, and shared/dashboardsView are working on iox
1 parent ad893be commit 2232590

File tree

5 files changed

+96
-53
lines changed

5 files changed

+96
-53
lines changed

cypress/e2e/cloud/dashboardsView.test.ts

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
1-
describe.skip('Dashboard', () => {
1+
describe('Dashboard', () => {
22
beforeEach(() =>
33
cy.flush().then(() =>
44
cy.signin().then(() =>
5-
cy.fixture('routes').then(({orgs}) => {
6-
cy.get('@org').then(({id: orgID}: any) => {
7-
cy.visit(`${orgs}/${orgID}/dashboards-list`)
8-
cy.getByTestID('tree-nav')
5+
cy
6+
.setFeatureFlags({
7+
showDashboardsInNewIOx: true,
98
})
10-
})
9+
.then(() =>
10+
cy.fixture('routes').then(({orgs}) => {
11+
cy.get('@org').then(({id: orgID}: any) => {
12+
cy.visit(`${orgs}/${orgID}/dashboards-list`)
13+
cy.getByTestID('tree-nav')
14+
})
15+
})
16+
)
1117
)
1218
)
1319
)
@@ -40,7 +46,7 @@ describe.skip('Dashboard', () => {
4046
cy.getByTestID('cell--view-empty markdown').contains(markdownImageWarning)
4147
})
4248

43-
it.skip('escapes html in markdown editor', () => {
49+
it('escapes html in markdown editor', () => {
4450
cy.get('@org').then(({id: orgID}: any) => {
4551
cy.createDashboard(orgID).then(({body}) => {
4652
cy.fixture('routes').then(({orgs}) => {

cypress/e2e/shared/dashboardsIndex.test.ts

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,27 @@ const dashboardName = 'Bee Happy'
77
const dashboardName2 = 'test dashboard'
88
const dashSearchName = 'bEE'
99

10-
describe.skip('Dashboards', () => {
10+
describe('Dashboards', () => {
1111
beforeEach(() => {
12-
cy.flush()
13-
cy.signin()
14-
cy.fixture('routes').then(({orgs}) => {
15-
cy.get<Organization>('@org').then(({id: orgID}: Organization) => {
16-
cy.visit(`${orgs}/${orgID}/dashboards-list`)
17-
})
18-
})
19-
cy.getByTestID('tree-nav')
12+
cy.flush().then(() =>
13+
cy.signin().then(() =>
14+
cy
15+
.setFeatureFlags({
16+
showDashboardsInNewIOx: true,
17+
showVariablesInNewIOx: true,
18+
})
19+
.then(() => {
20+
cy.fixture('routes').then(({orgs}) => {
21+
return cy
22+
.get<Organization>('@org')
23+
.then(({id: orgID}: Organization) => {
24+
cy.visit(`${orgs}/${orgID}/dashboards-list`)
25+
})
26+
})
27+
return cy.getByTestID('tree-nav')
28+
})
29+
)
30+
)
2031
})
2132

2233
it('empty state should have a header with text and a button to create a dashboard', () => {
@@ -508,8 +519,8 @@ describe.skip('Dashboards', () => {
508519
cy.getByTestID('search-widget').should('have.value', dashSearchName)
509520

510521
// Navigate Away and come back by clicking on Boards icon
511-
cy.getByTestID('nav-item-tasks').click()
512-
cy.getByTestID('page-title').contains('Tasks')
522+
cy.getByTestID('nav-item-data-explorer').click()
523+
cy.getByTestID('page-title').contains('Data Explorer')
513524
cy.getByTestID('nav-item-dashboards').click()
514525
cy.getByTestID('search-widget').should('have.value', dashSearchName)
515526
})

cypress/e2e/shared/dashboardsRefresh.test.ts

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,24 @@
11
import {Organization} from '../../../src/types'
22
import * as moment from 'moment'
33

4-
describe.skip('Dashboard refresh', () => {
4+
describe('Dashboard refresh', () => {
55
beforeEach(() => {
6-
cy.flush()
7-
cy.signin()
8-
cy.fixture('routes').then(({orgs}) => {
9-
cy.get('@org').then((org: Organization) => {
10-
cy.visit(`${orgs}/${org.id}/dashboards-list`)
11-
cy.getByTestID('tree-nav')
12-
})
13-
})
6+
cy.flush().then(() =>
7+
cy.signin().then(() =>
8+
cy
9+
.setFeatureFlags({
10+
showDashboardsInNewIOx: true,
11+
})
12+
.then(() =>
13+
cy.fixture('routes').then(({orgs}) => {
14+
cy.get('@org').then((org: Organization) => {
15+
cy.visit(`${orgs}/${org.id}/dashboards-list`)
16+
cy.getByTestID('tree-nav')
17+
})
18+
})
19+
)
20+
)
21+
)
1422
})
1523

1624
describe('Dashboard auto refresh', () => {
@@ -411,6 +419,12 @@ describe.skip('Dashboard refresh', () => {
411419
})
412420

413421
describe('Dashboard manual refresh', () => {
422+
beforeEach(() => {
423+
cy.setFeatureFlags({
424+
showDashboardsInNewIOx: true,
425+
showVariablesInNewIOx: true,
426+
})
427+
})
414428
it('can refresh a cell without refreshing the entire dashboard', () => {
415429
cy.get('@org').then(({id: orgID, name}: Organization) => {
416430
cy.createDashboard(orgID).then(({body}) => {

cypress/e2e/shared/dashboardsVariables.test.ts

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,29 @@ const getSelectedVariable =
3434
return hydratedVarDawg.selected[0]
3535
}
3636

37-
describe.skip('Dashboard - variable interactions', () => {
37+
describe('Dashboard - variable interactions', () => {
3838
beforeEach(() => {
39-
cy.flush()
40-
cy.signin()
41-
cy.fixture('routes').then(({orgs}) => {
42-
cy.get<Organization>('@org').then(({id: orgID}: Organization) => {
43-
cy.visit(`${orgs}/${orgID}/dashboards-list`)
44-
const numLines = 360
45-
cy.writeData(points(numLines))
46-
cy.createDashboard(orgID).then(({body: dashboard}) => {
47-
cy.wrap({dashboard}).as('dashboard')
48-
})
49-
})
50-
})
39+
cy.flush().then(() =>
40+
cy.signin().then(() =>
41+
cy
42+
.setFeatureFlags({
43+
showDashboardsInNewIOx: true,
44+
showVariablesInNewIOx: true,
45+
})
46+
.then(() =>
47+
cy.fixture('routes').then(({orgs}) => {
48+
cy.get<Organization>('@org').then(({id: orgID}: Organization) => {
49+
cy.visit(`${orgs}/${orgID}/dashboards-list`)
50+
const numLines = 360
51+
cy.writeData(points(numLines))
52+
cy.createDashboard(orgID).then(({body: dashboard}) => {
53+
cy.wrap({dashboard}).as('dashboard')
54+
})
55+
})
56+
})
57+
)
58+
)
59+
)
5160
})
5261

5362
it('informs user if variables are enabled but not defined', () => {

cypress/e2e/shared/dashboardsView.test.ts

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,22 @@ const isTSMOrg = !isIOxOrg
66

77
describe('Dashboard - TSM and pre marty release IOx', () => {
88
beforeEach(() => {
9-
cy.flush()
10-
cy.signin()
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-
})
20-
})
21-
})
9+
cy.flush().then(() =>
10+
cy.signin().then(() =>
11+
cy
12+
.setFeatureFlags({
13+
showDashboardsInNewIOx: true,
14+
})
15+
.then(() =>
16+
cy.fixture('routes').then(({orgs}) => {
17+
cy.get<Organization>('@org').then(({id: orgID}: Organization) => {
18+
cy.visit(`${orgs}/${orgID}/dashboards-list`)
19+
cy.getByTestID('tree-nav')
20+
})
21+
})
22+
)
23+
)
24+
)
2225
})
2326

2427
it("can edit a dashboard's name", () => {

0 commit comments

Comments
 (0)