mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
tune page objects for chart tests (#27664)
This commit is contained in:
parent
8d054a9b23
commit
cfe8f3f119
2 changed files with 8 additions and 10 deletions
|
@ -124,6 +124,7 @@ export default function ({ getService, getPageObjects }) {
|
|||
log.debug(`pieData.length = ${pieData.length}`);
|
||||
expect(pieData).to.eql(expectedTableData);
|
||||
await filterBar.removeFilter('machine.os.raw');
|
||||
await PageObjects.visualize.waitForVisualization();
|
||||
});
|
||||
|
||||
// FLAKY: https://github.com/elastic/kibana/issues/26323
|
||||
|
@ -137,6 +138,7 @@ export default function ({ getService, getPageObjects }) {
|
|||
log.debug(`pieData.length = ${pieData.length}`);
|
||||
expect(pieData).to.eql(expectedTableData);
|
||||
await filterBar.removeFilter('machine.os.raw');
|
||||
await PageObjects.visualize.waitForVisualization();
|
||||
});
|
||||
|
||||
it('should show two levels of other buckets', async () => {
|
||||
|
|
|
@ -531,10 +531,8 @@ export function VisualizePageProvider({ getService, getPageObjects }) {
|
|||
}
|
||||
|
||||
async getInterval() {
|
||||
const select = await find.byCssSelector('select[ng-model="agg.params.interval"]');
|
||||
const selectedIndex = await select.getProperty('selectedIndex');
|
||||
const intervalElement = await find.byCssSelector(
|
||||
`select[ng-model="agg.params.interval"] option:nth-child(${(selectedIndex + 1)})`);
|
||||
`select[ng-model="agg.params.interval"] option[selected]`);
|
||||
return await intervalElement.getProperty('label');
|
||||
}
|
||||
|
||||
|
@ -650,11 +648,11 @@ export function VisualizePageProvider({ getService, getPageObjects }) {
|
|||
const table = await testSubjects.find('heatmapCustomRangesTable');
|
||||
const lastRow = await table.findByCssSelector('tr:last-child');
|
||||
const fromCell = await lastRow.findByCssSelector('td:first-child input');
|
||||
fromCell.clearValue();
|
||||
fromCell.type(`${from}`);
|
||||
await fromCell.clearValue();
|
||||
await fromCell.type(`${from}`);
|
||||
const toCell = await lastRow.findByCssSelector('td:nth-child(2) input');
|
||||
toCell.clearValue();
|
||||
toCell.type(`${to}`);
|
||||
await toCell.clearValue();
|
||||
await toCell.type(`${to}`);
|
||||
}
|
||||
|
||||
async clickYAxisOptions(axisId) {
|
||||
|
@ -1194,9 +1192,7 @@ export function VisualizePageProvider({ getService, getPageObjects }) {
|
|||
|
||||
async filterPieSlice(name) {
|
||||
const slice = await this.getPieSlice(name);
|
||||
// Since slice is an SVG element we can't simply use .click() for it
|
||||
await browser.moveMouseTo(slice);
|
||||
await browser.clickMouseButton();
|
||||
await slice.click();
|
||||
}
|
||||
|
||||
async getPieSlice(name) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue