From 4ef1abc140bd84b0bec511e242635c8c945dfa49 Mon Sep 17 00:00:00 2001 From: Achim Fritz Date: Fri, 17 Nov 2023 16:40:01 +0100 Subject: [PATCH] [TASK] wait for save button in acceptance tests --- Build/envs/.env.local | 4 ---- Tests/Acceptance/Backend/LayoutCest.php | 8 +++++++- Tests/README.md | 7 ++----- 3 files changed, 9 insertions(+), 10 deletions(-) delete mode 100644 Build/envs/.env.local diff --git a/Build/envs/.env.local b/Build/envs/.env.local deleted file mode 100644 index c89cd37d..00000000 --- a/Build/envs/.env.local +++ /dev/null @@ -1,4 +0,0 @@ -typo3DatabaseName=foox -typo3DatabaseUsername=dev -typo3DatabasePassword=dev -typo3DatabaseHost=127.0.0.1 diff --git a/Tests/Acceptance/Backend/LayoutCest.php b/Tests/Acceptance/Backend/LayoutCest.php index 93a8ba1d..fe1d326d 100644 --- a/Tests/Acceptance/Backend/LayoutCest.php +++ b/Tests/Acceptance/Backend/LayoutCest.php @@ -14,6 +14,7 @@ use B13\Container\Tests\Acceptance\Support\BackendTester; use B13\Container\Tests\Acceptance\Support\PageTree; +use Codeception\Scenario; use TYPO3\CMS\Core\Information\Typo3Version; use TYPO3\CMS\Core\Utility\GeneralUtility; @@ -119,8 +120,12 @@ public function connectedModeShowNoAddContentButton(BackendTester $I, PageTree $ * @param PageTree $pageTree * @throws \Exception */ - public function canCreateContainerContentElement(BackendTester $I, PageTree $pageTree) + public function canCreateContainerContentElement(BackendTester $I, PageTree $pageTree, Scenario $scenario) { + $typo3Version = new Typo3Version(); + if ($typo3Version->getMajorVersion() >= 12) { + $scenario->skip('PageTsConfigModuleCest is used'); + } $I->click('Page'); $I->waitForElement('#typo3-pagetree-tree .nodes .node'); $pageTree->openPath(['home', 'emptyPage']); @@ -143,6 +148,7 @@ public function canCreateContainerContentElement(BackendTester $I, PageTree $pag $I->executeJS("document.querySelector('typo3-backend-new-content-element-wizard').shadowRoot.querySelector('button[data-identifier=\"container_b13-2cols-with-header-container\"]').click()"); } $I->switchToContentFrame(); + $I->wait(2.0); $I->click('Save'); $I->waitForElementNotVisible('#t3js-ui-block'); $I->click('Close'); diff --git a/Tests/README.md b/Tests/README.md index a5ba172d..f62c0912 100644 --- a/Tests/README.md +++ b/Tests/README.md @@ -10,13 +10,10 @@ composer install # prepare functional tests - cp Build/envs/.env.local .env - composer require helhum/typo3-console helhum/dotenv-connector + export typo3DatabaseName="foox" && export typo3DatabaseUsername="dev" && export typo3DatabasePassword="dev" && export typo3DatabaseHost="127.0.0.1" # prepare acceptance tests mkdir config && cd config && ln -s ../Build/sites && cd - - cp Build/LocalConfiguration.php .Build/Web/typo3conf/ - .Build/bin/typo3cms install:generatepackagestates - .Build/bin/typo3cms database:update + mkdir .Build/Web/typo3conf && cp Build/LocalConfiguration.php .Build/Web/typo3conf/ # run php webserver and chromedriver php -S 0.0.0.0:8888 -t .Build/Web/ & chromedriver --url-base=/wd/hub &