diff --git a/Tests/Acceptance/Backend/ContentDefenderCest.php b/Tests/Acceptance/Backend/ContentDefenderCest.php index 24e28f60..c77d75bd 100644 --- a/Tests/Acceptance/Backend/ContentDefenderCest.php +++ b/Tests/Acceptance/Backend/ContentDefenderCest.php @@ -108,9 +108,7 @@ public function doNotSeeNotAllowedContentElementsInCTypeSelectBoxWhenEditAnEleme $pageTree->openPath(['home', 'contentTCASelectCtype']); $I->wait(0.5); $I->switchToContentFrame(); - $I->waitForElement('#element-tt_content-502 a[title="Edit"]'); - $I->click('#element-tt_content-502 a[title="Edit"]'); - $I->waitForElement('#EditDocumentController'); + $I->openRecordInContextPanelOrWithEditDocumentController(502); $I->see('textmedia', 'select'); $I->dontSee('Images Only', 'select'); } diff --git a/Tests/Acceptance/Backend/LayoutCest.php b/Tests/Acceptance/Backend/LayoutCest.php index 5883f65c..55732570 100644 --- a/Tests/Acceptance/Backend/LayoutCest.php +++ b/Tests/Acceptance/Backend/LayoutCest.php @@ -265,9 +265,7 @@ public function canTranslateChild(BackendTester $I, PageTree $pageTree): void $pageTree->openPath(['home', 'pageWithTranslatedContainer-2']); $I->wait(0.2); $I->switchToContentFrame(); - $I->waitForElement('#element-tt_content-712'); - - $I->click('headerOfChild', '#element-tt_content-712'); + $I->openRecordInContextPanelOrWithEditDocumentController(712); if ($I->getTypo3MajorVersion() > 13) { $I->waitForText('english'); diff --git a/Tests/Acceptance/Support/BackendTester.php b/Tests/Acceptance/Support/BackendTester.php index f920513c..adb008d1 100644 --- a/Tests/Acceptance/Support/BackendTester.php +++ b/Tests/Acceptance/Support/BackendTester.php @@ -49,6 +49,29 @@ public function loginAs(string $username): void $I->switchToIFrame(); } + /** + * v14: Click a content element in the page module to open it in the context panel, + * then switch into the context panel iframe. + */ + public function openRecordInContextPanelOrWithEditDocumentController(int $uid): void + { + if ($this->getTypo3MajorVersion() < 14 || (new Typo3Version())->getBranch() === '14.1') { + $this->waitForElement('#element-tt_content-' . $uid . ' a[title="Edit"]'); + $this->click('#element-tt_content-' . $uid . ' a[title="Edit"]'); + } else { + $this->waitForElement('#element-tt_content-' . $uid . ' typo3-backend-contextual-record-edit-trigger'); + $this->click('#element-tt_content-' . $uid . ' typo3-backend-contextual-record-edit-trigger'); + $this->switchToMainFrame(); + $this->waitForElement('iframe[name="context_panel_frame"]', 10); + $this->switchToIFrame('context_panel_frame'); + $this->waitForElementNotVisible('#t3js-ui-block'); + $this->click('a.t3js-contextual-fullscreen'); + $this->switchToMainFrame(); + $this->switchToContentFrame(); + } + $this->waitForElement('#EditDocumentController'); + } + public function getDataColPos(int $containerId, int $colPos): string { return (string)$colPos;