Skip to content

Commit

Permalink
fix for the skipped functional test sync_colors.ts (elastic#146083)
Browse files Browse the repository at this point in the history
trying to fix elastic#97403

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit a270d75)
  • Loading branch information
rashmivkulkarni committed Nov 28, 2022
1 parent 1efd35e commit 45e0903
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions x-pack/test/functional/apps/dashboard/group2/sync_colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {

return colorMapping;
}

// FLAKY: https://github.com/elastic/kibana/issues/97403
describe.skip('sync colors', function () {
describe('sync colors', function () {
before(async function () {
await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/logstash_functional');
await kibanaServer.importExport.load(
Expand All @@ -48,6 +46,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await kibanaServer.importExport.unload(
'x-pack/test/functional/fixtures/kbn_archiver/lens/lens_basic.json'
);
await kibanaServer.savedObjects.cleanStandardList();
});

it('should sync colors on dashboard by default', async function () {
Expand Down Expand Up @@ -90,9 +89,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await filterBar.addFilter('geo.src', 'is not', 'CN');

await PageObjects.lens.save('vis2', false, true);
await PageObjects.dashboard.useColorSync(true);
await PageObjects.header.waitUntilLoadingHasFinished();
await PageObjects.dashboard.waitForRenderComplete();

const colorMapping1 = getColorMapping(await PageObjects.dashboard.getPanelChartDebugState(0));
const colorMapping2 = getColorMapping(await PageObjects.dashboard.getPanelChartDebugState(1));

expect(Object.keys(colorMapping1)).to.have.length(6);
expect(Object.keys(colorMapping1)).to.have.length(6);
const panel1Keys = ['CN'];
Expand Down

0 comments on commit 45e0903

Please sign in to comment.