-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Pie] Run all functional tests for the new implementation #131700
Changes from 18 commits
4b061f1
f2f6c93
f1de9dc
c99692d
6fc9acf
ce57f73
7cfdb31
6180a66
e689035
edf5ff9
fce585f
21d45ba
5c6a3a5
55e5a40
3489d53
b2a397a
22ae891
8207171
67663f5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,12 +38,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { | |
|
||
it('causes panels to reload when refresh is clicked', async () => { | ||
await esArchiver.unload('test/functional/fixtures/es_archiver/dashboard/current/data'); | ||
|
||
await queryBar.clickQuerySubmitButton(); | ||
await retry.tryForTime(5000, async () => { | ||
const headers = await PageObjects.discover.getColumnHeaders(); | ||
expect(headers.length).to.be(0); | ||
await pieChart.expectPieSliceCount(0); | ||
await pieChart.expectEmptyPieChart(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ℹ️ We don't have EC debug state for empty charts so I am testing this scenario with the empty chart container. |
||
}); | ||
}); | ||
}); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,8 +17,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { | |
const testSubjects = getService('testSubjects'); | ||
const filterBar = getService('filterBar'); | ||
const pieChart = getService('pieChart'); | ||
const elasticChart = getService('elasticChart'); | ||
const kibanaServer = getService('kibanaServer'); | ||
const browser = getService('browser'); | ||
const queryBar = getService('queryBar'); | ||
const security = getService('security'); | ||
const PageObjects = getPageObjects([ | ||
'common', | ||
|
@@ -109,6 +111,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { | |
await PageObjects.dashboard.gotoDashboardLandingPage(); | ||
await PageObjects.dashboard.clickNewDashboard(); | ||
await PageObjects.timePicker.setDefaultDataRange(); | ||
await elasticChart.setNewChartUiDebugFlag(true); | ||
}); | ||
|
||
it('are not selected by default', async function () { | ||
|
@@ -119,7 +122,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { | |
it('are added when a pie chart slice is clicked', async function () { | ||
await dashboardAddPanel.addVisualization('Rendering Test: pie'); | ||
await PageObjects.dashboard.waitForRenderComplete(); | ||
await pieChart.filterOnPieSlice('4,886'); | ||
await pieChart.filterOnPieSlice('4886'); | ||
const filterCount = await filterBar.getFilterCount(); | ||
expect(filterCount).to.equal(1); | ||
|
||
|
@@ -129,6 +132,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { | |
it('are preserved after saving a dashboard', async () => { | ||
await PageObjects.dashboard.saveDashboard('with filters'); | ||
await PageObjects.header.waitUntilLoadingHasFinished(); | ||
await elasticChart.setNewChartUiDebugFlag(true); | ||
|
||
const filterCount = await filterBar.getFilterCount(); | ||
expect(filterCount).to.equal(1); | ||
|
@@ -140,6 +144,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { | |
await PageObjects.dashboard.gotoDashboardLandingPage(); | ||
await PageObjects.dashboard.loadSavedDashboard('with filters'); | ||
await PageObjects.header.waitUntilLoadingHasFinished(); | ||
await elasticChart.setNewChartUiDebugFlag(true); | ||
await queryBar.submitQuery(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does the debug flag not decorate the pie slices until after the query has been submitted? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It needs to be re-rendered (the pie chart) so this is the reason I am submitting the query. If you refresh, the window flag is lost, so you need to do something to re-render it but without refreshing the browser. |
||
|
||
const filterCount = await filterBar.getFilterCount(); | ||
expect(filterCount).to.equal(1); | ||
|
@@ -152,6 +158,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { | |
await browser.goForward(); | ||
await PageObjects.header.waitUntilLoadingHasFinished(); | ||
await PageObjects.dashboard.waitForRenderComplete(); | ||
await elasticChart.setNewChartUiDebugFlag(true); | ||
await queryBar.submitQuery(); | ||
await pieChart.expectPieSliceCount(1); | ||
}); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ℹ️ This aria property is used with the wrong way (the dashboard a11y tests were also complaining)