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

Playwright tests break single "App" #145

Closed
elliotBraem opened this issue Jul 24, 2024 · 0 comments
Closed

Playwright tests break single "App" #145

elliotBraem opened this issue Jul 24, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@elliotBraem
Copy link
Contributor

elliotBraem commented Jul 24, 2024

Playwright tests have been working when widgets belong to a workspace ("apps" directory), but it seems that after switching to a single "App" (widget directory), see tests failing in pull request for gateway, the tests will break with the error:

[WebServer] node:events:495
      throw er; // Unhandled 'error' event
      ^

Error: ENOENT: no such file or directory, watch '/Users/ebraem/workspace/near/nearbuilders/sdks.near/test-results/.playwright-artifacts-4/'
    at FSWatcher.<computed> (node:internal/fs/watchers:247:19)
    at Object.watch (node:fs:2418:34)
    at Gaze._watchDir (/Users/ebraem/workspace/near/nearbuilders/sdks.near/node_modules/gaze/lib/gaze.js:314:30)
    at /Users/ebraem/workspace/near/nearbuilders/sdks.near/node_modules/gaze/lib/gaze.js:387:10
    at iterate (/Users/ebraem/workspace/near/nearbuilders/sdks.near/node_modules/gaze/lib/helper.js:69:5)
    at /Users/ebraem/workspace/near/nearbuilders/sdks.near/node_modules/gaze/lib/helper.js:78:11
    at /Users/ebraem/workspace/near/nearbuilders/sdks.near/node_modules/gaze/lib/gaze.js:452:5
    at iterate (/Users/ebraem/workspace/near/nearbuilders/sdks.near/node_modules/gaze/lib/helper.js:69:5)
    at /Users/ebraem/workspace/near/nearbuilders/sdks.near/node_modules/gaze/lib/helper.js:78:11
    at /Users/ebraem/workspace/near/nearbuilders/sdks.near/node_modules/gaze/lib/gaze.js:452:5
Emitted 'error' event on Gaze instance at:
    at Gaze.emit (/Users/ebraem/workspace/near/nearbuilders/sdks.near/node_modules/gaze/lib/gaze.js:102:32)
    at Gaze._handleError (/Users/ebraem/workspace/near/nearbuilders/sdks.near/node_modules/gaze/lib/gaze.js:468:15)
    at Gaze._watchDir (/Users/ebraem/workspace/near/nearbuilders/sdks.near/node_modules/gaze/lib/gaze.js:331:17)
    at /Users/ebraem/workspace/near/nearbuilders/sdks.near/node_modules/gaze/lib/gaze.js:387:10
    [... lines matching original stack trace ...]
    at /Users/ebraem/workspace/near/nearbuilders/sdks.near/node_modules/gaze/lib/gaze.js:452:5 {
  errno: -2,
  syscall: 'watch',
  code: 'ENOENT',
  path: '/Users/ebraem/workspace/near/nearbuilders/sdks.near/test-results/.playwright-artifacts-4/',
  filename: '/Users/ebraem/workspace/near/nearbuilders/sdks.near/test-results/.playwright-artifacts-4/'
}

This error is happening in the web server (bos workspace dev server) during tests, it is killing the web server, and then tests are failing after this because the server is dead and tests can no longer run.

Gaze is used by bos-workspace to watch for changes in files to retrigger builds. There seems to be an issue with Gaze as an App vs Workspace, that is is trying to watch playwright artifacts??? I'm not sure.

It will need investigation.

As part of this ticket, we can also replace Gaze with the more battle-tested Chokidar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

1 participant