diff --git a/test/functional/apps/kibana_overview/_solutions.ts b/test/functional/apps/kibana_overview/_solutions.ts index 97af7f7242eff..9869a295b6deb 100644 --- a/test/functional/apps/kibana_overview/_solutions.ts +++ b/test/functional/apps/kibana_overview/_solutions.ts @@ -33,20 +33,30 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ); }); - it('contains the appropriate solutions', async () => { + it('contains Security and Observability solutions', async () => { const solutionCards = await find.allByCssSelector('.kbnOverviewMore__item'); - expect(solutionCards.length).to.be(2); + expect(solutionCards.length >= 2).to.be(true); - const observabilityImage = await solutionCards[0].findByCssSelector('img'); - const observabilityImageUrl = await observabilityImage.getAttribute('src'); - expect(observabilityImageUrl.includes('/solutions_observability.svg')).to.be(true); - - const securityImage = await solutionCards[1].findByCssSelector('img'); - const securityImageUrl = await securityImage.getAttribute('src'); - expect(securityImageUrl.includes('/solutions_security_solution.svg')).to.be(true); + const imageSrcs = []; + const re = /.*(\/solutions_(observability|security_solution)\.svg)/; + const myRegexp = new RegExp(re, 'g'); + for (let i = 0; i < solutionCards.length; i++) { + const solutionCard = solutionCards[i]; + const image = await solutionCard.findByCssSelector('img'); + const imageSrc = await image.getAttribute('src'); + const match = myRegexp.exec(imageSrc); + myRegexp.lastIndex = 0; + if (match && match.length > 1) { + imageSrcs.push(match[1]); + } + } + expect(imageSrcs.includes('/solutions_observability.svg')).to.be(true); + expect(imageSrcs.includes('/solutions_security_solution.svg')).to.be(true); }); - it('click on Observability card leads to Observability', async () => { + // skipped as on Cloud it's a different setup than locally + // https://github.com/elastic/kibana/issues/139270 + xit('click on Observability card leads to Observability', async () => { let solutionCards: string | any[] = []; await retry.waitForWithTimeout('all solutions to be present', 5000, async () => { solutionCards = await find.allByCssSelector('.kbnOverviewMore__item'); @@ -56,7 +66,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.common.waitUntilUrlIncludes('app/observability'); }); - it('click on Security card leads to Security', async () => { + // skipped as on Cloud it's a different setup than locally + // https://github.com/elastic/kibana/issues/139270 + xit('click on Security card leads to Security', async () => { await PageObjects.common.navigateToUrl('kibana_overview', '', { useActualUrl: true }); await PageObjects.header.waitUntilLoadingHasFinished();