monocart-reporter: [BUG] Regression: missing snapshot attachment

Hi @cenfun,

Something has happened and the attachments aren’t displaying properly, at least for snapshots. From version 1.6.31 until latest what I get when a test fails is the following images:

image

image

When I downgrade to version 1.6.30 the attachments start showing:

image

I’ve re-used a demo playwright project I had to show the bug. You can go to edumserrano/playwright-bug-vrt-diff/tree/monocart-reporter and checkout the monocart-reporter branch.

Then from the root of the repo just do:

  • npm install
  • npm run test

This will give you the result above where no attachments are shown. Any ideas what might be going wrong? I don’t understand how this was working and suddenly stopped.

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 33 (12 by maintainers)

Commits related to this issue

Most upvoted comments

@cenfun I can confirm the issues I raised are now fixed. Didn’t test on version 1.6.35 but on 1.6.36 all is ok, no more duplicated tabs. 🥳

@cenfun

npx monocart show-report test-results\multiple-html\index.html

image

@cenfun it’s almost fixed. I’ve pushed a small commit in in the edumserrano/playwright-bug-vrt-diff/tree/monocart-reporter on the monocart-reporter branch to show the problem that still occurs with retries.

I’ve updated to version 1.6.4 and set retries to 2 on playwright’s config:

export default defineConfig({
   ...
    retries: 2,
...
});

and when you run npm run test you will see that the test this does not show any attachment shows multiple tabs:

image

Note The test names now don’t make sense, ignore the names. After updating to 1.6.34 the attachments for snapshots always show. The only problem that remains is that with retries the tabs seem to sometimes be repeated.

@zhukovsv I think your issue is different. It looks like the problem described here #34.

If you read #34, you probably have the same issue in that you can’t configure the path for your reporter like you did. Try to change the outputFile to ./test-results/index.html.

In short, the index.html for your monocart-reporter must be at the same directory as your test results directory.

ok, it should be a bug since image diff feature adding. I will check it.