[8.8] Disable the welcome screen in newsfeed ftr tests (#160210) (#160301)

# Backport

This will backport the following commits from `main` to `8.8`:
- [Disable the welcome screen in newsfeed ftr tests
(#160210)](https://github.com/elastic/kibana/pull/160210)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Christiane (Tina)
Heiligers","email":"christiane.heiligers@elastic.co"},"sourceCommit":{"committedDate":"2023-06-22T16:15:26Z","message":"Disable
the welcome screen in newsfeed ftr tests (#160210)\n\nCo-authored-by:
Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"73f070447cf088649e6a34f395610d962a21b01c","branchLabelMapping":{"^v8.10.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","Team:Core","release_note:skip","Feature:Newsfeed","backport:prev-minor","v8.8.0","v8.9.0","v8.10.0"],"number":160210,"url":"https://github.com/elastic/kibana/pull/160210","mergeCommit":{"message":"Disable
the welcome screen in newsfeed ftr tests (#160210)\n\nCo-authored-by:
Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"73f070447cf088649e6a34f395610d962a21b01c"}},"sourceBranch":"main","suggestedTargetBranches":["8.8","8.9"],"targetPullRequestStates":[{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.9","label":"v8.9.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.10.0","labelRegex":"^v8.10.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/160210","number":160210,"mergeCommit":{"message":"Disable
the welcome screen in newsfeed ftr tests (#160210)\n\nCo-authored-by:
Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"73f070447cf088649e6a34f395610d962a21b01c"}}]}]
BACKPORT-->

Co-authored-by: Christiane (Tina) Heiligers <christiane.heiligers@elastic.co>
This commit is contained in:
Kibana Machine 2023-06-22 13:27:24 -04:00 committed by GitHub
parent 3a08f5a8fa
commit 4298c3ce94
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() {