Skip to content

Commit ad893be

Browse files
fix(6562): update explorer to work with iox (#6584)
* test: add flags for cloud explorer test * test: add flags and testID for explorer queries graphs test * chore: run prettier
1 parent d2b9bf3 commit ad893be

File tree

3 files changed

+41
-36
lines changed

3 files changed

+41
-36
lines changed

cypress/e2e/cloud/explorer.test.ts

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,23 @@ function getTimeMachineText() {
1414
.invoke('text')
1515
}
1616

17-
describe.skip('DataExplorer', () => {
17+
describe('DataExplorer', () => {
1818
beforeEach(() => {
19-
cy.flush()
20-
cy.signin().then(() => {
21-
cy.get('@org').then(({id}: Organization) => {
22-
cy.createMapVariable(id)
23-
cy.fixture('routes').then(({orgs, explorer}) => {
24-
cy.visit(`${orgs}/${id}${explorer}`)
25-
cy.getByTestID('tree-nav').should('be.visible')
26-
})
19+
cy.flush().then(() =>
20+
cy.signin().then(() => {
21+
cy.setFeatureFlags({
22+
showOldDataExplorerInNewIOx: true,
23+
}).then(() =>
24+
cy.get('@org').then(({id}: Organization) => {
25+
cy.createMapVariable(id)
26+
cy.fixture('routes').then(({orgs, explorer}) => {
27+
cy.visit(`${orgs}/${id}${explorer}`)
28+
cy.getByTestID('tree-nav').should('be.visible')
29+
})
30+
})
31+
)
2732
})
28-
})
33+
)
2934
})
3035

3136
describe('Script Editor', () => {

cypress/e2e/shared/explorer.queries.graphs.test.ts

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,33 @@
11
import {Organization} from '../../../src/types'
22

3-
describe.skip('writing queries and making graphs using Data Explorer', () => {
3+
describe('writing queries and making graphs using Data Explorer', () => {
44
let route: string
55

66
beforeEach(() => {
7-
cy.flush()
8-
cy.signin()
9-
// Double check that the new schemaComposition flag does not interfere.
10-
cy.setFeatureFlags({
11-
schemaComposition: true,
12-
})
13-
// cy.wait($time) is necessary to consistently ensure sufficient time for the feature flag override.
14-
// The flag reset happens via redux, (it's not a network request), so we can't cy.wait($intercepted_route).
15-
cy.wait(1200)
16-
cy.get('@org').then(({id}: Organization) => {
17-
cy.createMapVariable(id)
18-
cy.fixture('routes').then(({orgs, explorer}) => {
19-
route = `${orgs}/${id}${explorer}`
20-
cy.visit(route)
21-
cy.getByTestID('tree-nav').should('be.visible')
22-
})
23-
})
7+
cy.flush().then(() =>
8+
cy.signin().then(() =>
9+
cy
10+
.setFeatureFlags({
11+
showOldDataExplorerInNewIOx: true,
12+
showTasksInNewIOx: true,
13+
showVariablesInNewIOx: true,
14+
schemaComposition: true, // Double check that the new schemaComposition flag does not interfere.
15+
})
16+
.then(() => {
17+
// cy.wait($time) is necessary to consistently ensure sufficient time for the feature flag override.
18+
// The flag reset happens via redux, (it's not a network request), so we can't cy.wait($intercepted_route).
19+
cy.wait(1200)
20+
cy.get('@org').then(({id}: Organization) => {
21+
cy.createMapVariable(id)
22+
cy.fixture('routes').then(({orgs, explorer}) => {
23+
route = `${orgs}/${id}${explorer}`
24+
cy.visit(route)
25+
cy.getByTestID('tree-nav').should('be.visible')
26+
})
27+
})
28+
})
29+
)
30+
)
2431
})
2532

2633
describe('numeric input in graphs', () => {
@@ -169,13 +176,6 @@ describe.skip('writing queries and making graphs using Data Explorer', () => {
169176
})
170177

171178
it('shows the empty state when the query returns no results', () => {
172-
cy.isIoxOrg().then(isIox => {
173-
// iox uses `${orgId}_${bucketId}` for a namespace_id
174-
// And gives a namespace_id failure if no data is written yet.
175-
// https://github.com/influxdata/monitor-ci/issues/402#issuecomment-1362368473
176-
cy.skipOn(isIox)
177-
})
178-
179179
cy.getByTestID('time-machine--bottom').within(() => {
180180
cy.getByTestID('flux-editor').should('be.visible')
181181
.monacoType(`from(bucket: "defbuck")

src/timeMachine/components/TagSelector.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ class TagSelector extends PureComponent<Props> {
260260

261261
if (valuesStatus === RemoteDataState.Done && !values.length) {
262262
return (
263-
<BuilderCard.Empty>
263+
<BuilderCard.Empty testID="empty-tag-keys">
264264
No values found <small>in the current time range</small>
265265
</BuilderCard.Empty>
266266
)

0 commit comments

Comments
 (0)