mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Fix serverless attachment framework tests for MKI (#175085)
## Summary This PR fixes the cases attachment framework tests for MKI runs with search projects. ### Details - Recently, a refresh of the default data view field list has been added (as part of field caps caching) - However, during test run time, this data view does not necessarily exist anymore (might have been cleaned up by an earlier test) - This was the case for our MKI test runs (where tests run in a different order / in different groups than in CI, which made the test fail - This introduced an optional parameter to ignore a missing data view when `refreshDataViewFieldList` is called, which allows us to just move on in that scenario
This commit is contained in:
parent
51b8993963
commit
bc9706577e
2 changed files with 11 additions and 2 deletions
|
@ -494,10 +494,19 @@ export class SettingsPageObject extends FtrService {
|
|||
await customDataViewIdInput.type(value);
|
||||
}
|
||||
|
||||
async refreshDataViewFieldList(dataViewName?: string) {
|
||||
async refreshDataViewFieldList(
|
||||
dataViewName?: string,
|
||||
options: { ignoreMissing?: boolean } = { ignoreMissing: false }
|
||||
) {
|
||||
if (dataViewName) {
|
||||
await this.common.navigateToApp('management/kibana/dataViews');
|
||||
await this.header.waitUntilLoadingHasFinished();
|
||||
if (
|
||||
options.ignoreMissing &&
|
||||
(await this.testSubjects.exists(`detail-link-${dataViewName}`)) === false
|
||||
) {
|
||||
return;
|
||||
}
|
||||
await this.testSubjects.click(`detail-link-${dataViewName}`);
|
||||
}
|
||||
await this.testSubjects.click('refreshDataViewButton');
|
||||
|
|
|
@ -34,7 +34,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
|
|||
'x-pack/test/functional/fixtures/kbn_archiver/lens/lens_basic.json'
|
||||
);
|
||||
|
||||
await settings.refreshDataViewFieldList('default:all-data');
|
||||
await settings.refreshDataViewFieldList('default:all-data', { ignoreMissing: true });
|
||||
|
||||
await svlSearchNavigation.navigateToLandingPage();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue