import { FtrProviderContext } from '../ftr_provider_context' ; export function TrustedAppsPageProvider ( { getService , getPageObjects } ) { const pageObjects = getPageObjects ( [ 'common' , 'header' , 'endpointPageUtils' ] ) ; const testSubjects = getService ( 'testSubjects' ) ; return { async navigateToTrustedAppsList ( searchParams ? ) { 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' ) ; } , /**
         * Clicks on the actions menu icon in the (only one) truated app card to show the popup with list of actions
         */ async clickCardActionMenu ( ) { await this . ensureIsOnTrustedAppsListPage ( ) ; await testSubjects . click ( 'trustedAppCard-header-actions-button' ) ; } , } ; }