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

"TypeError: body is not a function" when using playwright/test 1.39.0 #17

Closed
akong-anaconda opened this issue Oct 30, 2023 · 1 comment

Comments

@akong-anaconda
Copy link

I tried running the tests in tests/simple.feature with playwright/test 1.39.0 and got this TypeError:

 1) [chromium] › ../simple.feature:4:3 › Guess the word › Maker starts a game › [object Object] ───

    TypeError: body is not a function

       at ../../src/playwright/wrapper.ts:172

      170 |     type RuntimeRunnerArgs = Parameters<StepFunction<RunnerArgs<T>>>[0] & Parameters<StepHook<RunnerArgs<T>>>[1];
      171 |
    > 172 |     await this._step(args.step.location, args.step.keyword + args.step.text, async () => {
          |                ^
      173 |       await Promise.all(
      174 |         this.hooks.triggerLifecycle(
      175 |           'beforeStep',

        at PlaywrightWrapper.runStep (/Users/akong/gherkin-wrapper/src/playwright/wrapper.ts:172:16)
        at /Users/akong/gherkin-wrapper/src/playwright/wrapper.ts:163:43
        at eval (/Users/akong/gherkin-wrapper/<anonymous>:3:17)

No errors when running with version 1.38.1 or earlier. I didn't spot anything in the release notes for 1.39.0 that would break things:
https://github.com/microsoft/playwright/releases/tag/v1.39.0

Will look more into this myself to see if I can figure out what's happening but would love another set of eyes since I'm not sure where to start investigating this issue. Thanks!

@Niitch
Copy link
Owner

Niitch commented May 16, 2024

Issue fixed in version 0.5.0

They changed the way playwright test steps are generated

Thanks for sharing and sorry for the delay

@Niitch Niitch closed this as completed May 16, 2024
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