mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Fix mistakes added in bwc url test PR (#15038)
* Fix mistakes in bcc tests * Correct data-test-subj name
This commit is contained in:
parent
810345682c
commit
337def12bd
1 changed files with 11 additions and 9 deletions
|
@ -8,24 +8,26 @@ export function DashboardExpectProvider({ getService, getPageObjects }) {
|
|||
|
||||
return new class DashboardExpect {
|
||||
async pieSliceCount(expectedCount) {
|
||||
log.debug(`expectPieSliceCount(${expectedCount})`);
|
||||
return await retry.try(async () => {
|
||||
log.debug(`DashboardExpect.expectPieSliceCount(${expectedCount})`);
|
||||
await retry.try(async () => {
|
||||
const slicesCount = await PageObjects.dashboard.getPieSliceCount();
|
||||
expect(slicesCount).to.eql(expectedCount);
|
||||
expect(slicesCount).to.be(expectedCount);
|
||||
});
|
||||
}
|
||||
|
||||
async panelCount(expectedCount) {
|
||||
return retry.try(async () => {
|
||||
log.debug(`DashboardExpect.panelCount(${expectedCount})`);
|
||||
await retry.try(async () => {
|
||||
const panelCount = await PageObjects.dashboard.getPanelCount();
|
||||
expect(panelCount).to.eql(expectedCount);
|
||||
expect(panelCount).to.be(expectedCount);
|
||||
});
|
||||
}
|
||||
|
||||
async selectedLegendColorCount(color, count) {
|
||||
return retry.try(async () => {
|
||||
const selectedLegendColor = await testSubjects.findAll(`legendSelectColor-${color}`);
|
||||
expect(selectedLegendColor).to.eql(count);
|
||||
async selectedLegendColorCount(color, expectedCount) {
|
||||
log.debug(`DashboardExpect.selectedLegendColorCount(${color}, ${expectedCount})`);
|
||||
await retry.try(async () => {
|
||||
const selectedLegendColor = await testSubjects.findAll(`legendSelectedColor-${color}`);
|
||||
expect(selectedLegendColor.length).to.be(expectedCount);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue