Skip to content

Commit 27cc3a4

Browse files
committed
[TASK] make CI happy with TYPO3 13.4.5
Datahandlers log method changed method annotations Context Menu Accessibility has been improved
1 parent d7189e0 commit 27cc3a4

File tree

3 files changed

+32
-14
lines changed

3 files changed

+32
-14
lines changed

Classes/Hooks/Datahandler/CommandMapBeforeStartHook.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use B13\Container\Domain\Service\ContainerService;
1919
use B13\Container\Tca\Registry;
2020
use TYPO3\CMS\Core\DataHandling\DataHandler;
21+
use TYPO3\CMS\Core\Information\Typo3Version;
2122
use TYPO3\CMS\Core\Utility\GeneralUtility;
2223

2324
class CommandMapBeforeStartHook
@@ -301,14 +302,20 @@ protected function dataFromContainerIdColPos(array $data): array
301302

302303
protected function logAndUnsetCmd(int $id, string $cmd, string $message, DataHandler $dataHandler): void
303304
{
305+
$recpid = null;
306+
$details = null;
307+
if ((GeneralUtility::makeInstance(Typo3Version::class))->getMajorVersion() < 13) {
308+
$recpid = 0;
309+
$details = 28;
310+
}
304311
$dataHandler->log(
305312
'tt_content',
306313
$id,
307314
1,
308-
0,
315+
$recpid,
309316
1,
310317
$cmd . ' ' . $message,
311-
28
318+
$details
312319
);
313320
unset($dataHandler->cmdmap['tt_content'][$id][$cmd]);
314321
if (!empty($dataHandler->cmdmap['tt_content'][$id])) {

Tests/Acceptance/Backend/ContentDefenderCest.php

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -106,18 +106,29 @@ public function doNotSeeNotAllowedContentElementsInNewContentElementWizardTrigge
106106
$I->waitForElement('#element-tt_content-800 [data-contextmenu-uid="810"]');
107107
$I->click('#element-tt_content-800 [data-contextmenu-uid="810"]');
108108
}
109-
$I->waitForText('More options...');
110-
if ($typo3Version->getMajorVersion() < 12) {
111-
$I->click('.list-group-item-submenu');
112-
} else {
113-
$I->click('.context-menu-item-submenu');
114-
}
115-
$I->waitForText('\'Create New\' wizard');
116-
if ($typo3Version->getMajorVersion() < 12) {
117-
$I->click('#contentMenu1 [data-callback-action="newContentWizard"]');
118-
} else {
119-
$I->click('#contentMenu1');
109+
switch ($typo3Version->getMajorVersion()) {
110+
case 11:
111+
$I->waitForText('More options...');
112+
$I->click('.list-group-item-submenu');
113+
$I->waitForText('\'Create New\' wizard');
114+
$I->click('#contentMenu1 [data-callback-action="newContentWizard"]');
115+
break;
116+
case 12:
117+
$I->waitForText('More options...');
118+
$I->click('.context-menu-item-submenu');
119+
$I->waitForText('\'Create New\' wizard');
120+
$I->click('#contentMenu1');
121+
break;
122+
default:
123+
// v13
124+
$I->switchToMainFrame();
125+
$I->waitForElementVisible('typo3-backend-context-menu button[data-contextmenu-id="root_more"]', 5);
126+
$I->click('button[data-contextmenu-id="root_more"]', 'typo3-backend-context-menu');
127+
$I->waitForElementVisible('typo3-backend-context-menu button[data-contextmenu-id="root_more_newWizard"]', 5);
128+
$I->click('button[data-contextmenu-id="root_more_newWizard"]', 'typo3-backend-context-menu');
129+
break;
120130
}
131+
121132
$I->switchToIFrame();
122133
$I->waitForElement('.modal-dialog');
123134
if (GeneralUtility::makeInstance(Typo3Version::class)->getMajorVersion() > 12) {

Tests/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
cp Build/LocalConfiguration.php .Build/Web/typo3conf/
2121
.Build/bin/typo3 extension:setup
2222
# run php webserver and chromedriver
23-
php -S 0.0.0.0:8888 -t .Build/Web/ &
23+
php -S 0.0.0.0:8080 -t .Build/Web/ &
2424
chromedriver --url-base=/wd/hub --port=9515 &
2525
# create database with "_at" postfix
2626
mysql -e 'CREATE DATABASE IF NOT EXISTS foox_at;'

0 commit comments

Comments
 (0)