-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
WebdriverIO Version
latest
Node.js Version
20
Mode
Standalone Mode
Which capabilities are you using?
What happened?
Tests for saveRecordingScreen are failing because path.resolve is being called twice instead of once, causing mock assertion failures
you can check the test PR that i made with changes just to one console log message but it still fails
What is your expected behavior?
No response
How to reproduce the bug.
Steps to Reproduce
Run the test suite for saveRecordingScreen
Observe test failure with error message indicating path.resolve was called 2 times instead of expected 1 time
Relevant log output
FAIL packages/webdriverio/tests/commands/browser/savePDF.test.ts > savePDF > should take screenshot of page as a PDF
AssertionError: expected "resolve" to be called 1 times, but got 2 times
❯ packages/webdriverio/tests/commands/browser/savePDF.test.ts:42:32
40|
41| // get path
42| expect(pathResolveSpy).toHaveBeenCalledTimes(1)
| ^
43| expect(pathResolveSpy).toHaveBeenCalledWith('./packages/bar.pd…
44|
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/2]⎯
FAIL packages/webdriverio/tests/commands/browser/saveRecordingScreen.test.ts > saveRecordingScreen > should capture video
AssertionError: expected "resolve" to be called 1 times, but got 2 times
❯ packages/webdriverio/tests/commands/browser/saveRecordingScreen.test.ts:45:32
43|
44| // get path
45| expect(pathResolveSpy).toHaveBeenCalledTimes(1)
| ^
46| expect(pathResolveSpy).toHaveBeenCalledWith('./packages/bar.mp…
47|
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/2]⎯
Snapshots 1 obsolete
↳ packages/wdio-browser-runner/tests/vite/utils.test.ts
· getTemplate > renders template correctly 1
you can also check above PRCode of Conduct
- I agree to follow this project's Code of Conduct
Is there an existing issue for this?
- I have searched the existing issues
Reactions are currently unavailable