import { newE2EPage } from '@stencil/core/testing' ; it ( 'should render a button component' , async ( ) => { const page = await newE2EPage ( ) ; await page . setContent ( `<bm-button>Basic</bm-button>` ) ; const el = await page . find ( 'bm-button' ) ; expect ( el ) . not . toBeNull ( ) ; const results = await page . compareScreenshot ( ) ; expect ( results ) . toMatchScreenshot ( { allowableMismatchedPixels : 100 } ) ; expect ( results ) . toMatchScreenshot ( { allowableMismatchedRatio : 0.2 } ) ; } ) ;