Skip to content

Commit

Permalink
[TASK] Use default redirects.hitCount setting in acceptance test
Browse files Browse the repository at this point in the history
Composer mode acceptance tests has been introduced with #103297,
including a conditional check for the `redirects.hitCount` based
on the environment (classic or composer mode) required due to the
fact that typo3/testing-framework sets this toggle to `true`.

Valid request has been made to remove the toggle setting from the
typo3/testing-framework setup [1].

This change removes the codeception conditional based checkbox check
and resets the `redirects.hitCount` toggle to the default value as a
temporary solution.

After removing enabling this toggle in the testing-framework and
relasing this, the temporary solution can be removed again.

[1] TYPO3/testing-framework#554

Resolves: #105725
Related: #103297
Releases: main, 13.4
Change-Id: I610951d211ead78cd17567a4dde9f9d6d98ae7d4
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/87280
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Stefan Bürk <stefan@buerk.tech>
Reviewed-by: Garvin Hicking <gh@faktor-e.de>
Reviewed-by: Stefan Bürk <stefan@buerk.tech>
Tested-by: core-ci <typo3@b13.com>
Tested-by: Garvin Hicking <gh@faktor-e.de>
  • Loading branch information
sbuerk committed Nov 29, 2024
1 parent 4f88c11 commit 4916c8e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,7 @@ public function seeFeatureToggles(ApplicationTester $I, ModalDialog $modalDialog
// Switch back hit count feature toggle
$I->click($button);
$modalDialog->canSeeDialog();
if (str_contains($scenario->current('env'), 'classic')) {
// ['features']['redirects.hitCount'] is enabled by default in classic mode (set by TF BackendEnvironment setup)
$I->cantSeeCheckboxIsChecked($featureToggle);
} else {
$I->canSeeCheckboxIsChecked($featureToggle);
}
$I->canSeeCheckboxIsChecked($featureToggle);
$I->amGoingTo('reset hit count feature toggle and save it');
$I->click($featureToggle);
$I->click($modalButton, ModalDialog::$openedModalButtonContainerSelector);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,15 @@ final class ApplicationEnvironment extends BackendEnvironment
'MAIL' => [
'transport' => NullTransport::class,
],
'SYS' => [
'features' => [
// @todo Temporary setting {@see typo3/sysext/core/Configuration/DefaultConfiguration.php} feature
// toggle for `redirects.hitCount` to false to prepare removal from typo3/testing-framework
// which enables this. {@see https://github.com/TYPO3/testing-framework/issues/554}
// Remove this when updating TF after removing toggle setting.
'redirects.hitCount' => false,
],
],
],
'additionalFoldersToCreate' => [
'/fileadmin/user_upload/',
Expand Down

0 comments on commit 4916c8e

Please sign in to comment.