diff --git a/x-pack/solutions/observability/plugins/observability_onboarding/e2e/playwright/stateful/auth.ts b/x-pack/solutions/observability/plugins/observability_onboarding/e2e/playwright/stateful/auth.ts index 201823e8a6eea..b88c0e23c372a 100644 --- a/x-pack/solutions/observability/plugins/observability_onboarding/e2e/playwright/stateful/auth.ts +++ b/x-pack/solutions/observability/plugins/observability_onboarding/e2e/playwright/stateful/auth.ts @@ -47,8 +47,6 @@ ess_auth('Authentication', async ({ page }) => { log.error('Username or password is incorrect.'); throw new Error('Authentication is failed.'); } - - await suppressGlobalAnnouncements(); }); async function loginStateful(page: import('@playwright/test').Page) { @@ -85,23 +83,3 @@ async function loginServerless(page: import('@playwright/test').Page) { await expect(loginBtn).toBeEnabled(); await loginBtn.click(); } - -async function suppressGlobalAnnouncements() { - const response = await fetch(`${process.env.KIBANA_BASE_URL}/internal/kibana/global_settings`, { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - 'kbn-xsrf': 'true', - 'x-elastic-internal-origin': 'kibana', - Authorization: `Basic ${Buffer.from( - `${process.env.KIBANA_USERNAME}:${process.env.KIBANA_PASSWORD}` - ).toString('base64')}`, - }, - body: JSON.stringify({ changes: { hideAnnouncements: true } }), - }); - if (!response.ok) { - throw new Error( - `Failed to suppress global announcements: ${response.status} ${response.statusText}` - ); - } -}