Commit abf8e005 authored by Christian Kuhn's avatar Christian Kuhn Committed by Richard Haeser
Browse files

[TASK] Use younger selenium/standalone-chrome

This brings a recent chrome version. Some tests
need minor adaptions to deal with changed exceptions
and behaviour.

Change-Id: I1644a90ee09c98721ad8246988709461248c66a4
Resolves: #93575
Releases: master
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/67964


Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Tested-by: Richard Haeser's avatarRichard Haeser <richard@richardhaeser.com>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: Richard Haeser's avatarRichard Haeser <richard@richardhaeser.com>
parent 5b215327
version: '2.3'
services:
chrome:
image: selenium/standalone-chrome:3.12
image: selenium/standalone-chrome:3.141
tmpfs:
- /dev/shm:rw,nosuid,nodev,noexec,relatime
mysql:
image: mysql:${MYSQL_VERSION}
......
......@@ -96,7 +96,7 @@
"phpstan/phpstan": "^0.12.64",
"phpunit/phpunit": "^8.5.13",
"typo3/cms-styleguide": "~11.0.2",
"typo3/testing-framework": "^6.6.2"
"typo3/testing-framework": "^6.6.3"
},
"suggest": {
"ext-gd": "GDlib/Freetype is required for building images with text (GIFBUILDER) and can also be used to scale images",
......
......@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "3c4f53afe11447710640d61b8baba63e",
"content-hash": "9f6485b5f457a44d5af9510ce5b7befc",
"packages": [
{
"name": "bacon/bacon-qr-code",
......@@ -7542,16 +7542,16 @@
},
{
"name": "typo3/testing-framework",
"version": "6.6.2",
"version": "6.6.3",
"source": {
"type": "git",
"url": "https://github.com/TYPO3/testing-framework.git",
"reference": "a611f9df98b14261087bf400a8baa33aeb411daf"
"reference": "8714f2ed7e43b875eea08fc5a65f15b476698084"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/TYPO3/testing-framework/zipball/a611f9df98b14261087bf400a8baa33aeb411daf",
"reference": "a611f9df98b14261087bf400a8baa33aeb411daf",
"url": "https://api.github.com/repos/TYPO3/testing-framework/zipball/8714f2ed7e43b875eea08fc5a65f15b476698084",
"reference": "8714f2ed7e43b875eea08fc5a65f15b476698084",
"shasum": ""
},
"require": {
......@@ -7602,9 +7602,9 @@
"support": {
"general": "https://typo3.org/support/",
"issues": "https://github.com/TYPO3/testing-framework/issues",
"source": "https://github.com/TYPO3/testing-framework/tree/6.6.2"
"source": "https://github.com/TYPO3/testing-framework/tree/6.6.3"
},
"time": "2021-02-11T19:42:34+00:00"
"time": "2021-02-23T16:04:01+00:00"
}
],
"aliases": [],
......
......@@ -18,6 +18,7 @@ declare(strict_types=1);
namespace TYPO3\CMS\Core\Tests\Acceptance\Backend\FormEngine;
use Codeception\Example;
use Facebook\WebDriver\Exception\ElementClickInterceptedException;
use Facebook\WebDriver\Exception\UnknownErrorException;
use Facebook\WebDriver\Remote\RemoteWebDriver;
use Facebook\WebDriver\Remote\RemoteWebElement;
......@@ -137,7 +138,7 @@ abstract class AbstractElementsBasicCest
{
try {
$I->click($tabTitle);
} catch (UnknownErrorException $exception) {
} catch (UnknownErrorException | ElementClickInterceptedException $exception) {
// this is fired if the element can't be clicked, because for example another element overlays it.
$this->scrollToTopOfFrame($I, $tabTitle, $referenceField);
}
......@@ -154,7 +155,7 @@ abstract class AbstractElementsBasicCest
try {
$field->sendKeys(WebDriverKeys::PAGE_UP);
$I->click($tabTitle);
} catch (UnknownErrorException $exception) {
} catch (UnknownErrorException | ElementClickInterceptedException $exception) {
$doItAgain = true;
}
} while ($doItAgain === true && $maxPageUp > 0);
......
......@@ -95,6 +95,10 @@ class TasksCest
$I->dontSeeElement('.tx_scheduler_mod1 .disabled');
$I->dontSee('disabled');
$I->wantTo('See a disable button for a task');
// Give tooltips some time to fully init
$I->wait(1);
$I->moveMouseOver('//a[contains(@data-bs-original-title, "Disable")]');
$I->wait(1);
$I->click('//a[contains(@data-bs-original-title, "Disable")]');
$I->waitForElementVisible('div.tx_scheduler_mod1');
$I->seeElement('.tx_scheduler_mod1 .disabled');
......
......@@ -101,7 +101,15 @@ class PageCreationWithDragAndDropCest
$mouse->dragAndDrop(static::$dragNode, $this->getPageIdentifier(22));
$I->seeElement(static::$nodeEditInput);
$I->fillField(static::$nodeEditInput, '');
// We can't use $I->fillField() here since this sends a clear() to the element
// which drops the node creation in the tree. So we do it manually with selenium.
$nodeEditInput = static::$nodeEditInput;
$element = $I->executeInSelenium(function (\Facebook\WebDriver\Remote\RemoteWebDriver $webdriver) use ($nodeEditInput) {
return $webdriver->findElement(\Facebook\WebDriver\WebDriverBy::cssSelector($nodeEditInput));
});
$element->sendKeys('');
$I->pressKey(static::$nodeEditInput, WebDriverKeys::ENTER);
$I->waitForElementNotVisible(static::$nodeEditInput, 5);
}
......@@ -122,7 +130,16 @@ class PageCreationWithDragAndDropCest
$mouse->dragAndDrop(static::$dragNode, $target);
$I->seeElement(static::$nodeEditInput);
$I->fillField(static::$nodeEditInput, $pageTitle);
// Change the new page title.
// We can't use $I->fillField() here since this sends a clear() to the element
// which drops the node creation in the tree. So we do it manually with selenium.
$nodeEditInput = static::$nodeEditInput;
$element = $I->executeInSelenium(function (\Facebook\WebDriver\Remote\RemoteWebDriver $webdriver) use ($nodeEditInput) {
return $webdriver->findElement(\Facebook\WebDriver\WebDriverBy::cssSelector($nodeEditInput));
});
$element->sendKeys($pageTitle);
$I->pressKey(static::$nodeEditInput, WebDriverKeys::ENTER);
$I->waitForElementNotVisible(static::$nodeEditInput);
$I->see($pageTitle);
......
......@@ -76,7 +76,7 @@
"phpspec/prophecy": "^1.12.2",
"phpstan/phpstan": "^0.12.64",
"typo3/cms-styleguide": "~11.0.2",
"typo3/testing-framework": "^6.6.2"
"typo3/testing-framework": "^6.6.3"
},
"suggest": {
"ext-fileinfo": "Used for proper file type detection in the file abstraction layer",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment