Skip to content

[TASK] Refactor tests to Build/Scripts directory and fix CI for v7 - #297

Merged
d-g-codappix merged 6 commits into
7.xfrom
run-product-repository-test-in-frontend-context-for-v7
Nov 12, 2026
Merged

d-g-codappix merged 6 commits into
7.xfrom
run-product-repository-test-in-frontend-context-for-v7

Conversation

@d-g-codappix

Copy link
Copy Markdown
Collaborator

The repository methods findByUids() and findDemanded() are only used by the frontend plugin. The test faked a backend request, and since TYPO3 13.4.37 / 14.3.7 Extbase ignores enable fields in backend context, so hidden products were returned and the test failed.

The test now fakes a frontend request with an empty TypoScript setup, which Extbase's frontend configuration manager requires.

(cherry picked from commit d8ad00a)

findAll() is typed to return DomainObjectInterface objects, so PHPStan
reports the calls to getTitle() and getParent() as undefined methods.

Skip every object that is not a Category, as already done in main
with 8d2a3c2.
The repository methods findByUids() and findDemanded() are only used
by the frontend plugin. The test faked a backend request, and since
TYPO3 13.4.37 / 14.3.7 Extbase ignores enable fields in backend
context, so hidden products were returned and the test failed.

The test now fakes a frontend request with an empty TypoScript setup,
which Extbase's frontend configuration manager requires.

(cherry picked from commit d8ad00a)
@d-g-codappix
d-g-codappix force-pushed the run-product-repository-test-in-frontend-context-for-v7 branch from adc663f to 2c00cad Compare November 11, 2026 23:58
The tests should be executable for local testing and GitHub
Actions with nearly the same context. The composer scripts,
the nix-shell commands and the CI workflow now call the same
scripts in Build/Scripts, which also lift the PHP memory limit.

The composer scripts are renamed from test:* to project:* like
in main. The broken rector scripts (rector is not required) and
the aggregating scripts test:php and test:all are removed.

The unit and functional tests in the CI workflow no longer need
nix and run in a php-version matrix.

Backport of a3ad847 from main.
The waitForText waits up to 5 seconds. The see checks immediatly for the
string. If the server (test) takes a little bit longer the test will
fail.

(cherry picked from commit e00ffe4)
The acceptance tests were only executable via nix-shell. They now
use Build/Scripts/acceptance.sh like the other tests. The script is
called by the new composer script project:test:acceptance, the
nix-shell command project-test-acceptance and the CI workflow.

The CI workflow no longer needs nix and runs the acceptance tests
in a php-version matrix. On failure the acceptance reports are
uploaded as artifact.

The script stops the php webserver and geckodriver on exit, even
if the tests fail.

Backport of 5570b5e from main.
@d-g-codappix d-g-codappix changed the title [BUGFIX] Run ProductRepositoryTest in frontend context [TASK] Refactor tests to Build/Scripts directory and fix CI for v7 Nov 12, 2026
@d-g-codappix
d-g-codappix merged commit 11d99ac into 7.x Nov 12, 2026
19 checks passed
@d-g-codappix
d-g-codappix deleted the run-product-repository-test-in-frontend-context-for-v7 branch November 12, 2026 00:10
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

Successfully merging this pull request may close these issues.

1 participant