Skip to content

Commit

Permalink
[Lens] Fixes metrics test flakiness by using the Lens waitForVisualiz…
Browse files Browse the repository at this point in the history
…ation function (#122532)

* [Lens] Fixes metrics test flakiness by using the Lens waitForVisualization function

* Update rest tests
  • Loading branch information
stratoula authored Jan 11, 2022
1 parent d0cf489 commit d1049ca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions x-pack/test/functional/apps/lens/metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,21 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await testSubjects.setValue('lnsPalettePanel_dynamicColoring_stop_value_1', '21000', {
clearWithKeyboard: true,
});
await PageObjects.header.waitUntilLoadingHasFinished();
await PageObjects.lens.waitForVisualization();
const styleObj = await PageObjects.lens.getMetricStyle();
expect(styleObj.color).to.be('rgb(32, 146, 128)');
});

it('should change the color when reverting the palette', async () => {
await testSubjects.click('lnsPalettePanel_dynamicColoring_reverse');
await PageObjects.header.waitUntilLoadingHasFinished();
await PageObjects.lens.waitForVisualization();
const styleObj = await PageObjects.lens.getMetricStyle();
expect(styleObj.color).to.be('rgb(204, 86, 66)');
});

it('should reset the color stops when changing palette to a predefined one', async () => {
await PageObjects.lens.changePaletteTo('temperature');
await PageObjects.header.waitUntilLoadingHasFinished();
await PageObjects.lens.waitForVisualization();
const styleObj = await PageObjects.lens.getMetricStyle();
expect(styleObj.color).to.be('rgb(235, 239, 245)');
});
Expand Down

0 comments on commit d1049ca

Please sign in to comment.