@@ -14,16 +14,17 @@ export default function ({ getService, getPageObjects }) {
1414 const esArchiver = getService ( 'esArchiver' ) ;
1515 const log = getService ( 'log' ) ;
1616 const testSubjects = getService ( 'testSubjects' ) ;
17-
1817 const PageObjects = getPageObjects ( [ 'common' , 'settings' , 'discover' , 'timePicker' ] ) ;
1918 const queryBar = getService ( 'queryBar' ) ;
19+ const security = getService ( 'security' ) ;
2020
2121 describe ( 'async search with scripted fields' , function ( ) {
2222 this . tags ( [ 'skipFirefox' ] ) ;
2323
2424 before ( async function ( ) {
2525 await esArchiver . load ( 'kibana_scripted_fields_on_logstash' ) ;
2626 await esArchiver . loadIfNeeded ( 'logstash_functional' ) ;
27+ await security . testUser . setRoles ( [ 'test_logstash_reader' , 'global_discover_read' ] ) ;
2728 // changing the timepicker default here saves us from having to set it in Discover (~8s)
2829 await kibanaServer . uiSettings . update ( {
2930 'timepicker:timeDefaults' :
@@ -36,6 +37,7 @@ export default function ({ getService, getPageObjects }) {
3637 await kibanaServer . uiSettings . update ( { } ) ;
3738 await esArchiver . unload ( 'logstash_functional' ) ;
3839 await esArchiver . load ( 'empty_kibana' ) ;
40+ await security . testUser . restoreDefaults ( ) ;
3941 } ) ;
4042
4143 it ( 'query should show failed shards pop up' , async function ( ) {
0 commit comments