interface Login { username ? : string ; password ? : string ; } export const login = ( { username = Cypress . env ( 'username' ) , password = Cypress . env ( 'password' ) , } = { } ) => { cy . request ( { method : 'POST' , url : '/internal/security/login' , headers : { 'kbn-xsrf' : 'cypress' } , body : { providerType : 'basic' , providerName : 'basic' , currentURL : '/' , params : { username , password } , } , } ) ; } ; import 'cypress-axe' ; import { AXE_CONFIG , AXE_OPTIONS } from 'test/accessibility/services/a11y/constants' ; const axeConfig = { ... AXE_CONFIG , rules : [ ... AXE_CONFIG . rules , { id : 'landmark-no-duplicate-banner' , selector : '[data-test-subj="headerGlobalNav"]' , } , ] , } ; const axeOptions = { ... AXE_OPTIONS , runOnly : [ ... AXE_OPTIONS . runOnly , 'best-practice' ] , } ; export const checkA11y = ( ) => { cy . injectAxe ( ) ; cy . configureAxe ( axeConfig ) ; const context = '.kbnAppWrapper' ; cy . checkA11y ( context , axeOptions ) ; } ;