import expect from '@kbn/expect' ; import { FtrProviderContext } from '../../../../common/ftr_provider_context' ; import { getConfigurationRequest , removeServerGeneratedPropertiesFromSavedObject , getConfigurationOutput , deleteConfiguration , createConfiguration , getAuthWithSuperUser , } from '../../../../common/lib/utils' ; import { nullUser } from '../../../../common/lib/mock' ; export default ( { getService } ) : void => { const supertest = getService ( 'supertest' ) ; const es = getService ( 'es' ) ; const authSpace1 = getAuthWithSuperUser ( ) ; describe ( 'post_configure' , ( ) => { afterEach ( async ( ) => { await deleteConfiguration ( es ) ; } ) ; it ( 'should create a configuration in space1' , async ( ) => { const configuration = await createConfiguration ( supertest , getConfigurationRequest ( ) , 200 , authSpace1 ) ; const data = removeServerGeneratedPropertiesFromSavedObject ( configuration ) ; expect ( data ) . to . eql ( getConfigurationOutput ( false , { created_by : nullUser } ) ) ; } ) ; } ) ; } ;