Skip to content

Commit

Permalink
Merge pull request #170 from TYPO3/phpunit9-codeception4
Browse files Browse the repository at this point in the history
[TASK] Update to codeception v4 and allow phpunit v9
  • Loading branch information
bmack committed Mar 3, 2020
2 parents 2111db6 + 417227d commit d308d42
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
* The TYPO3 project - inspiring people to share!
*/

use Codeception\Event\SuiteEvent;
use Codeception\Event\TestEvent;
use Codeception\Events;
use Codeception\Extension;
Expand Down
8 changes: 4 additions & 4 deletions Classes/Core/Acceptance/Helper/AbstractPageTree.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function openPath(array $path)
foreach ($path as $pageName) {
$context = $this->ensureTreeNodeIsOpen($pageName, $context);
}
$context->findElement(\WebDriverBy::cssSelector(self::$treeItemAnchorSelector))->click();
$context->findElement(\Facebook\WebDriver\WebDriverBy::cssSelector(self::$treeItemAnchorSelector))->click();
}

/**
Expand All @@ -65,7 +65,7 @@ public function getPageTreeElement()
$I = $this->tester;
$I->switchToIFrame();
return $I->executeInSelenium(function (\Facebook\WebDriver\Remote\RemoteWebDriver $webdriver) {
return $webdriver->findElement(\WebDriverBy::cssSelector(self::$pageTreeSelector));
return $webdriver->findElement(\Facebook\WebDriver\WebDriverBy::cssSelector(self::$pageTreeSelector));
});
}

Expand All @@ -84,11 +84,11 @@ protected function ensureTreeNodeIsOpen(string $nodeText, RemoteWebElement $cont
/** @var RemoteWebElement $context */
$context = $I->executeInSelenium(function () use ($nodeText, $context
) {
return $context->findElement(\WebDriverBy::xpath('//*[text()=\'' . $nodeText . '\']/..'));
return $context->findElement(\Facebook\WebDriver\WebDriverBy::xpath('//*[text()=\'' . $nodeText . '\']/..'));
});

try {
$context->findElement(\WebDriverBy::cssSelector('.chevron.collapsed'))->click();
$context->findElement(\Facebook\WebDriver\WebDriverBy::cssSelector('.chevron.collapsed'))->click();
} catch (\Facebook\WebDriver\Exception\NoSuchElementException $e) {
// element not found so it may be already opened...
} catch (\Facebook\WebDriver\Exception\ElementNotVisibleException $e) {
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"issues": "https://github.com/TYPO3/testing-framework/issues"
},
"require": {
"phpunit/phpunit": "^8.4",
"phpunit/phpunit": "^8.4 || ^9.0",
"mikey179/vfsstream": "~1.6.8",
"typo3fluid/fluid": "^2.5",
"typo3/cms-core": "10.*.*@dev",
Expand All @@ -36,7 +36,7 @@
"typo3/cms-recordlist": "10.*.*@dev"
},
"suggest": {
"codeception/codeception": "^3",
"codeception/codeception": "^4.0",
"typo3/cms-styleguide": "^9.0"
},
"config": {
Expand Down

0 comments on commit d308d42

Please sign in to comment.