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]: Exception when using functions (tests are run in a infinite loop) #30905

Closed
ydkL opened this issue May 20, 2024 · 1 comment
Closed

[Bug]: Exception when using functions (tests are run in a infinite loop) #30905

ydkL opened this issue May 20, 2024 · 1 comment

Comments

@ydkL
Copy link

ydkL commented May 20, 2024

Version

1.43.1

Steps to reproduce

  1. Clone my repo https://github.com/ydkL/playwrightExamples.git
  2. npm install
  3. npx playwright test ./tests/exercise_1.spec.js
  4. You should see the error come up

Expected behavior

I expected test run without any error.

Actual behavior

I use a function call like a pre condition in my test(exercise_1.spec.js). All steps are run, After steps finished, test run is starting again and a bug happened.

Additional context

When I write this case without using extra function (exercise_1_man.spec.js), no error occurs.

Environment

System:
    OS: Windows 11 10.0.22631
    Memory: 5.32 GB / 15.35 GB
  Binaries:
    Node: 20.10.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.21 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 10.2.3 - C:\Program Files\nodejs\npm.CMD
@mxschmitt
Copy link
Member

Inside your code there is a commonFuncs.goto(); which you don't await which is causing such behaviour. We recommend TypeScript in combination with this ESLint plugin in order to prevent such issues.

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

No branches or pull requests

2 participants