Issue Bug Resolved

#111480runTests.sh splits e2e arguments containing spaces, e.g. --grep "a pattern"

Benjamin Kott 11/17/26, 17:34 updated 11/18/26, 11:00

Description

Problem

Build/Scripts/runTests.sh -s e2e -- --grep "logo in topbar" does not pass the pattern to Playwright as one argument. Playwright receives --grep logo in topbar: only the first word is the title filter, every further word becomes a file filter. Depending on the words this runs no test at all (“Error: No tests found.”) or nearly the whole suite.

The same happens for -s e2e-browser and -s e2e-prepare (including the command it prints for a local run), -s lintTypescript and -s phpstanGenerateBaseline.

Steps to reproduce

  1. Run Build/Scripts/runTests.sh -s e2e -- --grep "logo in topbar" --list on main
  2. Playwright is called as playwright test --grep logo in topbar --list --project e2e and reports “No tests found”, although the test “TYPO3 logo in topbar links to backend root” exists

Cause

runPlaywright() joins the remaining arguments with $* into the string COMMAND and expands it unquoted in ${CONTAINER_BIN} run ... ${COMMAND}, so word splitting drops the original argument boundaries. Playwright reads each extra word as a case-insensitive regular expression on the spec file path. lintTypescript and phpstanGenerateBaseline put $@ into a string for /bin/sh -c, with the same effect.

Suggested fix

Build the Playwright and phpstan baseline commands as bash arrays and expand them with "${COMMAND[]}”@, as the composer, phpstan and npm suites already do. Pass the lintTypescript arguments to sh -c as positional parameters and use "$”@ there.

Reviews 3

History 17

  1. Benjamin Kott commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-11-18T11:00:32+00:00" > 11/18/26, 11:00 </span>

    Applied in changeset commit:decc27d57e6232cb17cf232dfa73f59b3a9a4822.