diff --git a/x-pack/test/screenshot_creation/apps/ml_docs/index.ts b/x-pack/test/screenshot_creation/apps/ml_docs/index.ts index 82460db174add2..1c12efc89caf7f 100644 --- a/x-pack/test/screenshot_creation/apps/ml_docs/index.ts +++ b/x-pack/test/screenshot_creation/apps/ml_docs/index.ts @@ -11,9 +11,10 @@ export const ECOMMERCE_INDEX_PATTERN = 'kibana_sample_data_ecommerce'; export const FLIGHTS_INDEX_PATTERN = 'kibana_sample_data_flights'; export const LOGS_INDEX_PATTERN = 'kibana_sample_data_logs'; -export default function ({ getService, loadTestFile }: FtrProviderContext) { +export default function ({ getPageObject, getService, loadTestFile }: FtrProviderContext) { const browser = getService('browser'); const ml = getService('ml'); + const securityPage = getPageObject('security'); describe('machine learning docs', function () { this.tags(['ml']); @@ -25,6 +26,7 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) { }); after(async () => { + await securityPage.forceLogout(); await ml.testResources.removeAllKibanaSampleData(); await ml.testResources.resetKibanaTimeZone(); });