Skip to content

@wordpress/e2e-test-utils-playwright no longer works in Playwright for non-Gutenberg projects #78963

Closed

Description

@wwahammy

Description

As of 1.48.0, @wordpress/e2e-test-utils-playwright no longer can be used by Playwright outside of gutenberg. All uses of the import have the following error:

> playwright test --trace on

SyntaxError: Unexpected token 'export'

   at admin.spec.ts:1

> 1 | import { test, expect} from '@wordpress/e2e-test-utils-playwright';
    | ^

The problem is that the js files are no longer included in the package and Playwright will not transpile anything in the node_modules directory. This is why it works just fine in Gutenberg itself but doesn't work if used in other Playwright projects.

Step-by-step reproduction instructions

  1. Install @wordpress/e2e-test-utils-playwright in a playwright project
  2. Try to import from the package. You'll get SyntaxError: Unexpected token 'export'

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Activity

  1. added
    [Type] BugAn existing feature does not function as intended
    on Jun 5, 2026
  2. wwahammy commented on Jun 5, 2026

    @wwahammy
    ContributorAuthor

    As mentioned at the add src PR, this is causing issues for Wordpress/performance as well.

  3. wwahammy commented on Jun 16, 2026

    @wwahammy
    ContributorAuthor

    This was closed by #79026. Thanks @jsnajdr!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Tool] E2E Test Utils/packages/e2e-test-utils-playwright[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions