@@ -70,7 +70,7 @@ test.describe('ui', () => {
7070 await page . goto ( pageUrl )
7171
7272 // dashboard
73- await expect ( page . locator ( '[aria-labelledby=tests]' ) ) . toContainText ( '13 Pass 1 Fail 14 Total' )
73+ await expect ( page . locator ( '[aria-labelledby=tests]' ) ) . toContainText ( '14 Pass 1 Fail 15 Total' )
7474
7575 // unhandled errors
7676 await expect ( page . getByTestId ( 'unhandled-errors' ) ) . toContainText (
@@ -212,7 +212,7 @@ test.describe('ui', () => {
212212
213213 // match all files when no filter
214214 await page . getByPlaceholder ( 'Search...' ) . fill ( '' )
215- await page . getByText ( 'PASS (5 )' ) . click ( )
215+ await page . getByText ( 'PASS (6 )' ) . click ( )
216216 await expect ( page . getByTestId ( 'details-panel' ) . getByText ( 'fixtures/sample.test.ts' , { exact : true } ) ) . toBeVisible ( )
217217
218218 // match nothing
@@ -289,6 +289,25 @@ test.describe('ui', () => {
289289 await expect ( page . getByLabel ( / f a i l / i) ) . not . toBeChecked ( )
290290 await expect ( page . getByLabel ( / s k i p / i) ) . not . toBeChecked ( )
291291 } )
292+
293+ test ( 'visual regression in the report tab' , async ( { page } ) => {
294+ await page . goto ( pageUrl )
295+
296+ await test . step ( 'attachments get processed' , async ( ) => {
297+ const item = page . getByLabel ( 'visual regression test' )
298+ await item . click ( { force : true } )
299+ await page . getByTestId ( 'btn-report' ) . click ( { force : true } )
300+
301+ const artifact = page . getByRole ( 'note' )
302+ await expect ( artifact ) . toHaveCount ( 1 )
303+
304+ await expect ( artifact . getByRole ( 'heading' ) ) . toContainText ( 'Visual Regression' )
305+ await expect ( artifact ) . toContainText ( 'fixtures-browser/visual-regression.test.ts:13:3' )
306+ await expect ( artifact . getByRole ( 'tablist' ) ) . toHaveText ( 'Reference' )
307+ await expect ( artifact . getByRole ( 'tabpanel' ) . getByRole ( 'link' ) ) . toHaveAttribute ( 'href' , / _ _ v i t e s t _ a t t a c h m e n t _ _ \? p a t h = .* ?\. p n g / )
308+ await expect ( artifact . getByRole ( 'tabpanel' ) . getByRole ( 'img' ) ) . toHaveAttribute ( 'src' , / _ _ v i t e s t _ a t t a c h m e n t _ _ \? p a t h = .* ?\. p n g / )
309+ } )
310+ } )
292311} )
293312
294313test . describe ( 'standalone' , ( ) => {
0 commit comments