Skip to content

Commit

Permalink
[TASK] wait for save button in acceptance tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Achim Fritz committed Nov 30, 2023
1 parent 849dc57 commit 4ef1abc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
4 changes: 0 additions & 4 deletions Build/envs/.env.local

This file was deleted.

8 changes: 7 additions & 1 deletion Tests/Acceptance/Backend/LayoutCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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']);
Expand All @@ -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');
Expand Down
7 changes: 2 additions & 5 deletions Tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 &
Expand Down

0 comments on commit 4ef1abc

Please sign in to comment.