kibana/x-pack/test/security_solution_endpoint/page_objects/trusted_apps_page.ts
Paul Tavares d0d80e0fbb
[SECURITY_SOLUTION][ENDPOINT] Add ability to view Trusted Apps from Ingest Integration Policy Edit page (#78854) (#79137)
* Refactor Callout shown in Ingest Edit Endpoint Integration Policy that display actions menu
* Add `backComponent` to `<HeaderPage>` to allow for custom back buttons
* Back button displayed on Trusted Apps List when route state is defined
2020-10-01 13:29:05 -04:00

37 lines
1.3 KiB
TypeScript

/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { FtrProviderContext } from '../ftr_provider_context';
export function TrustedAppsPageProvider({ getService, getPageObjects }: FtrProviderContext) {
const pageObjects = getPageObjects(['common', 'header', 'endpointPageUtils']);
const testSubjects = getService('testSubjects');
return {
async navigateToTrustedAppsList(searchParams?: string) {
await pageObjects.common.navigateToUrlWithBrowserHistory(
'securitySolutionManagement',
`/trusted_apps${searchParams ? `?${searchParams}` : ''}`
);
await pageObjects.header.waitUntilLoadingHasFinished();
},
/**
* ensures that the Policy Page is the currently display view
*/
async ensureIsOnTrustedAppsListPage() {
await testSubjects.existOrFail('trustedAppsListPage');
},
/**
* Returns the Back button displayed on the Trusted Apps list page when page is loaded
* with route state that triggers return button to be displayed
*/
async findTrustedAppsListPageBackButton() {
await this.ensureIsOnTrustedAppsListPage();
return testSubjects.find('backToOrigin');
},
};
}