Skip to content

Commit

Permalink
Fix invalid references test (#188754)
Browse files Browse the repository at this point in the history
## Summary

Close #179977 🧟 πŸ”« 

Trying this again, this time with a `retry.waitFor`. FTRs for this test
succeeded 25/25 flaky test runs with a failure for another SO management
FTR πŸ™ˆ , but this should fix this test for 7.17 branch.
  • Loading branch information
jloleysens authored Jul 23, 2024
1 parent d5315a3 commit 03fa04c
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import { FtrProviderContext } from '../../ftr_provider_context';

export default function ({ getPageObjects, getService }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const retry = getService('retry');
const PageObjects = getPageObjects(['common', 'settings', 'savedObjects']);

// Failing: See https://github.com/elastic/kibana/issues/179977
describe.skip('saved objects relationships flyout', () => {
describe('saved objects relationships flyout', () => {
beforeEach(async () => {
await esArchiver.load(
'test/functional/fixtures/es_archiver/saved_objects_management/show_relationships'
Expand All @@ -36,7 +36,12 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {

await PageObjects.savedObjects.clickRelationshipsByTitle('Dashboard with missing refs');

const invalidRelations = await PageObjects.savedObjects.getInvalidRelations();
let invalidRelations: any[] = [];

await retry.waitFor('2 invalid relations to be found', async () => {
invalidRelations = await PageObjects.savedObjects.getInvalidRelations();
return invalidRelations.length === 2;
});

expect(invalidRelations).to.eql([
{
Expand Down

0 comments on commit 03fa04c

Please sign in to comment.