-
Notifications
You must be signed in to change notification settings - Fork 68
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
[TASK] Ensure working codeception tests with TYPO3 v13 #566
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The composer package version constraint for the `typo3/testing-framework` is adjusted to ensure latest version for each required major versions. Used command(s): ```shell composer require --dev --no-update \ 'typo3/testing-framework':'^7.1.1 || ^8.2.7' ``` [1] https://github.com/TYPO3/testing-framework/releases/tag/8.2.7
…ance TYPO3 v13.0 dropped the backend entrypoint (`./typo3/index.php`) and made the main entrypoint (`./index.php`) capable of handling frontend and backend web requests to make the backend entrypoint finally configurable and required to change the rewrite rules for webservers to ensure backend requests hits the main entrypoint. The acceptance setup for `b13/container` is based on the TYPO3 monorepo setup using a real `Apache2` webserver instead of the PHP internal webserver and thus needs `.htaccess` rules to work. Providing needed `.htaccess` files has been added to the TYPO3 monorepo only and broke the setup for acceptance testing against TYPO3 v13. As a workaround providing the old backend entrypoint file has been implemented within the extended codeception setup method `BackendContainerEnvironment::bootstrapTypo3Environment()` which worked but is literally wrong. `typo3/testing-framework` now provides these files automatically, and the wrong workaround can be removed to cleanup the code base [1][2][3][4] and is backwards compatible for older TYPO3 versions. Some phpstan ignore pattern can be now removed from baselines and is done in the same run. [1] TYPO3/testing-framework#663 [2] TYPO3/testing-framework#664 [3] https://github.com/TYPO3/testing-framework/releases/tag/9.1.2 [4] https://github.com/TYPO3/testing-framework/releases/tag/8.2.7
`typo3/testing-framework` allows to use composer package names instead of classic mode references as extension to load for functional and codeception acceptance test instance creation. Use composer package names for acceptance test extensions to load now.
For the codeception acceptance tests a custom codeception helper is used to verify the login state, using `/typo3/index.php` to check for backend login mask page. Using the full endpoint is not reasonable and breaks with TYPO3 v13.0 and newer which removed that endpoint completly and this change modifes the check to use `/typo3` path instead, adopting from provided `typo3/testing-framework` helper which is fully backwards compatible.
TYPO3 Core development switched codeception based acceptance testing using `apache2` and `PHP-FPM` instead if the internal PHP cli webserver due to rewrite rules required to operate TYPO3 properly, special with removed backend entrypoint since TYPO3 v13. This change adopts required changes within `Build/Scripts/runTests.sh` to make the switch and be in line with core development regarding acceptance testing for TYPO3 v13 only, keeping the PHP internal webserver for older TYPO3 core and testing-framework versions.
sbuerk
force-pushed
the
fix-acceptance-tests
branch
from
December 5, 2024 16:06
ebc91f3
to
e8b73ae
Compare
achimfritz
approved these changes
Dec 5, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 thanks a lot
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[TASK] Adjust
typo3/testing-framework
constraintThe composer package version constraint for the
typo3/testing-framework
is adjusted to ensurelatest version for each required major versions.
Used command(s):
[1] https://github.com/TYPO3/testing-framework/releases/tag/8.2.7
[TASK] Remove providing backend entrypoint for TYPO3 v13 in test instance
TYPO3 v13.0 dropped the backend entrypoint (
./typo3/index.php
)and made the main entrypoint (
./index.php
) capable of handlingfrontend and backend web requests to make the backend entrypoint
finally configurable and required to change the rewrite rules for
webservers to ensure backend requests hits the main entrypoint.
The acceptance setup for
b13/container
is based on the TYPO3monorepo setup using a real
Apache2
webserver instead of thePHP internal webserver and thus needs
.htaccess
rules to work.Providing needed
.htaccess
files has been added to the TYPO3monorepo only and broke the setup for acceptance testing against
TYPO3 v13. As a workaround providing the old backend entrypoint
file has been implemented within the extended codeception setup
method
BackendContainerEnvironment::bootstrapTypo3Environment()
which worked but is literally wrong.
typo3/testing-framework
now provides these files automatically,and the wrong workaround can be removed to cleanup the code base
[1][2][3][4] and is backwards compatible for older TYPO3 versions.
Some phpstan ignore pattern can be now removed from baselines and
is done in the same run.
[1] [TASK] Allow defining test instance files copy for acceptance tests TYPO3/testing-framework#663
[2] [TASK] Allow defining test instance files copy for acceptance tests TYPO3/testing-framework#664
[3] https://github.com/TYPO3/testing-framework/releases/tag/9.1.2
[4] https://github.com/TYPO3/testing-framework/releases/tag/8.2.7
[TASK] Use composer package names for acceptance extension configuration
typo3/testing-framework
allows to use composer package namesinstead of classic mode references as extension to load for
functional and codeception acceptance test instance creation.
Use composer package names for acceptance test extensions to
load now.
[TASK] Adopt codeception helper login page check from testing-framework
For the codeception acceptance tests a custom codeception helper
is used to verify the login state, using
/typo3/index.php
tocheck for backend login mask page.
Using the full endpoint is not reasonable and breaks with TYPO3
v13.0 and newer which removed that endpoint completly and this
change modifes the check to use
/typo3
path instead, adoptingfrom provided
typo3/testing-framework
helper which is fullybackwards compatible.
[TASK] Use
apache2
andPHP-FPM
for acceptance tests for TYPO3 v13TYPO3 Core development switched codeception based acceptance
testing using
apache2
andPHP-FPM
instead if the internalPHP cli webserver due to rewrite rules required to operate
TYPO3 properly, special with removed backend entrypoint since
TYPO3 v13.
This change adopts required changes within
Build/Scripts/runTests.sh
to make the switch and be in line with core development regarding
acceptance testing for TYPO3 v13 only, keeping the PHP internal
webserver for older TYPO3 core and testing-framework versions.