mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[Discover] Fix flaky Discover URL state functional test (#143005)
* [Discover] Temp commit to create test PR * [Discover] Attempt to fix flaky Discover URL state tests
This commit is contained in:
parent
362b211e71
commit
9679a86754
1 changed files with 10 additions and 11 deletions
|
@ -26,8 +26,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
defaultIndex: 'logstash-*',
|
||||
};
|
||||
|
||||
// FLAKY: https://github.com/elastic/kibana/issues/142222
|
||||
describe.skip('discover test', function describeIndexTests() {
|
||||
describe('discover test', function describeIndexTests() {
|
||||
before(async function () {
|
||||
log.debug('load kibana index with default index pattern');
|
||||
await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover');
|
||||
|
@ -370,14 +369,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
await PageObjects.timePicker.setDefaultAbsoluteRange();
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
const dataViewId = await PageObjects.discover.getCurrentDataViewId();
|
||||
|
||||
const originalUrl = await browser.getCurrentUrl();
|
||||
const newUrl = originalUrl.replace(dataViewId, 'invalid-data-view-id');
|
||||
await browser.get(newUrl);
|
||||
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
expect(await browser.getCurrentUrl()).to.be(originalUrl);
|
||||
expect(await testSubjects.exists('dscDataViewNotFoundShowDefaultWarning')).to.be(true);
|
||||
await retry.try(async () => {
|
||||
expect(await browser.getCurrentUrl()).to.be(originalUrl);
|
||||
expect(await testSubjects.exists('dscDataViewNotFoundShowDefaultWarning')).to.be(true);
|
||||
});
|
||||
});
|
||||
|
||||
it('should show a warning and fall back to the current data view if the URL is updated to an invalid data view ID', async () => {
|
||||
|
@ -385,14 +384,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
await PageObjects.timePicker.setDefaultAbsoluteRange();
|
||||
const originalHash = await browser.execute<[], string>('return window.location.hash');
|
||||
const dataViewId = await PageObjects.discover.getCurrentDataViewId();
|
||||
|
||||
const newHash = originalHash.replace(dataViewId, 'invalid-data-view-id');
|
||||
await browser.execute(`window.location.hash = "${newHash}"`);
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
|
||||
const currentHash = await browser.execute<[], string>('return window.location.hash');
|
||||
expect(currentHash).to.be(originalHash);
|
||||
expect(await testSubjects.exists('dscDataViewNotFoundShowSavedWarning')).to.be(true);
|
||||
await retry.try(async () => {
|
||||
const currentHash = await browser.execute<[], string>('return window.location.hash');
|
||||
expect(currentHash).to.be(originalHash);
|
||||
expect(await testSubjects.exists('dscDataViewNotFoundShowSavedWarning')).to.be(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue