Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] HTML report crashes if diff snapshot does not exists #8281

Closed
fcollonval opened this issue Aug 18, 2021 · 0 comments · Fixed by #8297
Closed

[BUG] HTML report crashes if diff snapshot does not exists #8281

fcollonval opened this issue Aug 18, 2021 · 0 comments · Fixed by #8297
Assignees

Comments

@fcollonval
Copy link

fcollonval commented Aug 18, 2021

Context:

System:

  • OS: Linux 5.10 Debian GNU/Linux 11 (bullseye) 11 (bullseye)
  • Memory: 17.90 GB / 31.09 GB
  • Container: Yes

Binaries:

  • Node: 15.14.0 - ~/miniconda3/envs/jlab-dev/bin/node
  • Yarn: 1.21.1 - ~/projects/jupyterlab/node_modules/.bin/yarn
  • npm: 7.7.6 - ~/miniconda3/envs/jlab-dev/bin/npm

Languages:

  • Bash: 5.1.8 - /usr/bin/bash

  • @playwright/test 1.14.0

Describe the bug

I know the feature has not been advertised. But as the code made it to the latest release, I'm testing the HTML reporter 😃

In case an image snapshot is changing size between the expected and the actual versions, no diff is generated. However the reporter is looking for one (see trace below):

Error: ENOENT: no such file or directory, copyfile '/home/fcollonval/projects/jupyterlab/ui-tests/test-results/tests-menus-Open-menu-item-Settings-Language/opened-menu-settings-language-diff.png' -> '/home/fcollonval/projects/jupyterlab/ui-tests/playwright-report/resources/733badcdf57e4b033609e15541f3428fb597845e.png'
    at Object.copyFileSync (node:fs:2068:3)
    at HtmlReporter._createAttachments (/home/fcollonval/projects/jupyterlab/node_modules/@playwright/test/lib/test/reporters/html.js:153:21)
    at HtmlReporter._serializeResult (/home/fcollonval/projects/jupyterlab/node_modules/@playwright/test/lib/test/reporters/html.js:139:31)
    at /home/fcollonval/projects/jupyterlab/node_modules/@playwright/test/lib/test/reporters/html.js:126:61
    at Array.map (<anonymous>)
    at HtmlReporter._serializeTest (/home/fcollonval/projects/jupyterlab/node_modules/@playwright/test/lib/test/reporters/html.js:126:47)
    at /home/fcollonval/projects/jupyterlab/node_modules/@playwright/test/lib/test/reporters/html.js:110:58
    at Array.map (<anonymous>)
    at HtmlReporter._serializeSuite (/home/fcollonval/projects/jupyterlab/node_modules/@playwright/test/lib/test/reporters/html.js:110:44)
    at processTicksAndRejections (node:internal/process/task_queues:94:5)
    at async Promise.all (index 0)
    at HtmlReporter._serializeSuite (/home/fcollonval/projects/jupyterlab/node_modules/@playwright/test/lib/test/reporters/html.js:109:15)
    at async Promise.all (index 0)
    at HtmlReporter._serializeSuite (/home/fcollonval/projects/jupyterlab/node_modules/@playwright/test/lib/test/reporters/html.js:109:15)
    at async Promise.all (index 0) {
  errno: -2,
  syscall: 'copyfile',
  code: 'ENOENT',
  path: '/home/fcollonval/projects/jupyterlab/ui-tests/test-results/tests-menus-Open-menu-item-Settings-Language/opened-menu-settings-language-diff.png',
  dest: '/home/fcollonval/projects/jupyterlab/ui-tests/playwright-report/resources/733badcdf57e4b033609e15541f3428fb597845e.png'
}
error Command failed with exit code 1.

Source folder content:

$ ll /home/fcollonval/projects/jupyterlab/ui-tests/test-results/tests-menus-Open-menu-item-Settings-Language/
-rw-r--r--  1 fcollonval fcollonval 202864 Aug 18 16:53 4a4d29990d874c00beae9a8403dfeaf1.webm
-rw-r--r--  1 fcollonval fcollonval   3556 Aug 18 16:53 opened-menu-settings-language-actual.png
-rw-r--r--  1 fcollonval fcollonval    921 Aug 18 16:53 opened-menu-settings-language-expected.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants