Disable the welcome screen in newsfeed ftr tests (#160210)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Christiane (Tina) Heiligers 2023-06-22 09:15:26 -07:00 committed by GitHub
parent 68cd9d59bd
commit 73f070447c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 5 deletions

View file

@ -11,10 +11,9 @@ import { FtrProviderContext } from '../../ftr_provider_context';
export default function ({ getService, getPageObjects }: FtrProviderContext) {
const globalNav = getService('globalNav');
const PageObjects = getPageObjects(['newsfeed']);
const PageObjects = getPageObjects(['newsfeed', 'common']);
// FLAKY: https://github.com/elastic/kibana/issues/135251
describe.skip('Newsfeed', () => {
describe('Newsfeed', () => {
before(async () => {
await PageObjects.newsfeed.resetPage();
});

View file

@ -5,7 +5,7 @@
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import { setTimeout as setTimeoutAsync } from 'timers/promises';
import { FtrService } from '../ftr_provider_context';
export class NewsfeedPageObject extends FtrService {
@ -16,8 +16,12 @@ export class NewsfeedPageObject extends FtrService {
private readonly testSubjects = this.ctx.getService('testSubjects');
private readonly common = this.ctx.getPageObject('common');
async sleep(sleepMilliseconds: number) {
await setTimeoutAsync(sleepMilliseconds);
}
async resetPage() {
await this.common.navigateToApp('home', { disableWelcomePrompt: true });
await this.common.navigateToUrl('home', undefined); // navigateToApp sets `disableWelcomePrompt` to true under the hood. `navigateToUrl` explicitly disables the welcome screen.
}
async closeNewsfeedPanel() {