param { Array . < string > | string } expectedValues export { } ; declare global { namespace Cypress { interface Chainable < Subject > { checkPreviewPanel ( expectedValues ) : void ; } } } Cypress . Commands . add ( 'checkPreviewPanel' , ( expectedValues ) => { cy . get ( '.map-preview-panel.map-preview-panel--visible' ) . get ( 'img.map-detail-result__header-pano' ) . should ( 'exist' ) . and ( 'be.visible' ) ; cy . get ( '.map-preview-panel.map-preview-panel--visible' ) . should ( ( actualValues ) => { if ( Array . isArray ( expectedValues ) ) { expectedValues . forEach ( ( expectedValue ) => { expect ( actualValues ) . to . contain ( expectedValue ) ; } ) ; } else { expect ( actualValues ) . to . contain ( expectedValues ) ; } } ) ; } ) ;