[Console] Fix test for opening docs with shortcut (#225276)

Fixes #218255 and #213784

## Summary

This PR fixes flaky test in Console responsible for opening
documentation with keyboard shortcut by checking if the opened tab
contains `www.elastic.co/docs`.
This commit is contained in:
Damian Polewski 2025-06-25 17:07:46 +02:00 committed by GitHub
parent 58b8c7aec0
commit 4b925523bf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -113,8 +113,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
expect(await PageObjects.console.getCurrentLineNumber()).to.be(4); expect(await PageObjects.console.getCurrentLineNumber()).to.be(4);
}); });
// FLAKY: https://github.com/elastic/kibana/issues/218255 describe('open documentation', () => {
describe.skip('open documentation', () => {
const requests = ['GET _search', 'GET test_index/_search', 'GET /_search']; const requests = ['GET _search', 'GET test_index/_search', 'GET /_search'];
requests.forEach((request) => { requests.forEach((request) => {
it('should open documentation when Ctrl+/ is pressed', async () => { it('should open documentation when Ctrl+/ is pressed', async () => {
@ -131,7 +130,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const url = await browser.getCurrentUrl(); const url = await browser.getCurrentUrl();
// The url that is open is https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html // The url that is open is https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html
// but it redirects to https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search // but it redirects to https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search
expect(url).to.contain('operation-search'); expect(url).to.contain('www.elastic.co/docs');
}); });
}); });
}); });