import { IdentityProvider } from '../../common/types' ; import { IdentityProviderConfig } from '../../common/types/identity-provider-config' ; export const getIdentityProviderConfig = ( configName ) : void => { cy . fixture ( `${ Cypress . env ( 'PLATFORM' ) }/identity-provider-config.json` ) . then ( ( fixtures ) => { const identityProviderConfig = fixtures [ configName ] as IdentityProviderConfig ; expect ( identityProviderConfig , `no config value for ${ configName }` ) . to . exist ; cy . wrap ( identityProviderConfig ) . as ( 'identityProviderConfig' ) ; } ) ; } ; export const getIdentityProviderFromConfig = ( idpConfig ) : IdentityProvider => { const currentIdentityProvider = { acrValue : `eidas${ idpConfig . eidas }` , descriptions : [ idpConfig . title ] , encryption : '' , idpId : idpConfig . uid , mocked : true , selectors : { idpButton : `#${ idpConfig . uid }` , loginButton : "[type='submit']" , password : "input[name='password']" , username : "input[name='login']" , } , signature : '' , url : idpConfig . issuer , usable : true , } ; return currentIdentityProvider ; } ;