Commit 3849ed94 authored by Anja Leichsenring's avatar Anja Leichsenring Committed by Christian Kuhn
Browse files

[TASK] Integrate Pagetree acceptance suite into Backend suite

The Pagetree suite for acceptance tests was set up as a separate
suite in the beginning due to a necessary fixture set of pages,
that all the other tests don't need.
The overhead of having separate suite is higher than the additional
fixture set, so the suites are merged.

Resolves: #93614
Releases: master, 10.4
Change-Id: I70a3f1dd68bb07c0dc505eaadb3d240e81639add
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/68151


Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Richard Haeser's avatarRichard Haeser <richard@richardhaeser.com>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Richard Haeser's avatarRichard Haeser <richard@richardhaeser.com>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 2345e665
......@@ -89,7 +89,6 @@ Options:
-s <...>
Specifies which test suite to run
- acceptance: main backend acceptance tests
- acceptancePagetree: backend acceptance tests for page tree
- acceptanceInstallTool: acceptance tests for stand alone install tool
- buildCss: execute scss to css builder
- buildJavascript: execute typescript to javascript builder
......@@ -447,13 +446,6 @@ case ${TEST_SUITE} in
esac
docker-compose down
;;
acceptancePagetree)
setUpDockerComposeDotEnv
docker-compose run prepare_acceptance_pagetree_mariadb
docker-compose run acceptance_pagetree_mariadb
SUITE_EXIT_CODE=$?
docker-compose down
;;
acceptanceInstallTool)
setUpDockerComposeDotEnv
docker-compose run prepare_acceptance_installtool_mariadb
......
......@@ -520,66 +520,6 @@ abstract class AbstractCoreSpec {
return jobs;
}
/**
* Jobs for mysql based acceptance tests
*/
ArrayList<Job> getJobsAcceptanceTestsPageTreeMysql(int stageNumber, String requirementIdentifier, Task composerTask, Boolean isSecurity) {
String name = getTaskNamePartForComposer(stageNumber);
ArrayList<Job> jobs = new ArrayList<Job>();
jobs.add(new Job("Accept PageTree my " + name + " " + requirementIdentifier, new BambooKey("ACPTMY" + stageNumber + requirementIdentifier))
.description("Run acceptance tests for page tree" + requirementIdentifier)
.pluginConfigurations(this.getDefaultJobPluginConfiguration())
.tasks(
this.getTaskGitCloneRepository(),
this.getTaskGitCherryPick(isSecurity),
this.getTaskStopDanglingContainers(),
composerTask,
this.getTaskPrepareAcceptanceTest(requirementIdentifier),
this.getTaskDockerDependenciesAcceptanceBackendMariadb10(),
new ScriptTask()
.description("Execute codeception acceptance test for pageTree.")
.interpreter(ScriptTaskProperties.Interpreter.BINSH_OR_CMDEXE)
.inlineBody(
this.getScriptTaskBashInlineBody() +
"function codecept() {\n" +
" docker run \\\n" +
" -u ${HOST_UID} \\\n" +
" -v /bamboo-data/${BAMBOO_COMPOSE_PROJECT_NAME}/passwd:/etc/passwd \\\n" +
" -v ${BAMBOO_COMPOSE_PROJECT_NAME}_bamboo-data:/srv/bamboo/xml-data/build-dir/ \\\n" +
" -e typo3DatabaseName=func_test \\\n" +
" -e typo3DatabaseUsername=root \\\n" +
" -e typo3DatabasePassword=funcp \\\n" +
" -e typo3DatabaseHost=mariadb10 \\\n" +
" --name ${BAMBOO_COMPOSE_PROJECT_NAME}sib_adhoc \\\n" +
" --network ${BAMBOO_COMPOSE_PROJECT_NAME}_test \\\n" +
" --rm \\\n" +
" typo3gmbh/" + requirementIdentifier.toLowerCase() + ":latest \\\n" +
" bin/bash -c \"cd ${PWD}; ./bin/codecept $*\"\n" +
"}\n" +
"\n" +
"codecept run PageTree -d -c typo3/sysext/core/Tests/codeception.yml --xml reports.xml --html reports.html\n"
)
)
.finalTasks(
this.getTaskStopDockerDependencies(),
new TestParserTask(TestParserTaskProperties.TestType.JUNIT)
.resultDirectories("typo3temp/var/tests/AcceptanceReports/reports.xml")
)
.artifacts(new Artifact()
.name("Test Report")
.copyPattern("typo3temp/var/tests/AcceptanceReports/")
.shared(false)
)
.requirements(
this.getRequirementDocker10()
)
.cleanWorkingDirectory(true)
);
return jobs;
}
ArrayList<Job> getJobsAcceptanceTestsInstallToolMysql(int stageNumber, String requirementIdentifier, Task composerTask, Boolean isSecurity) {
String name = getTaskNamePartForComposer(stageNumber);
ArrayList<Job> jobs = new ArrayList<Job>();
......
......@@ -54,7 +54,6 @@ abstract class AbstractPreMergeSpec extends AbstractCoreSpec {
jobsMainStage.add(this.getJobAcceptanceTestInstallSqlite(0, phpVersions[0], this.getTaskComposerInstall(phpVersions[0]), isSecurity));
jobsMainStage.addAll(this.getJobsAcceptanceTestsBackendMysql(0, numberOfAcceptanceTestJobs, phpVersions[0], this.getTaskComposerInstall(phpVersions[0]), isSecurity));
jobsMainStage.addAll(this.getJobsAcceptanceTestsPageTreeMysql(0, phpVersions[0], this.getTaskComposerInstall(phpVersions[0]), isSecurity));
jobsMainStage.addAll(this.getJobsAcceptanceTestsInstallToolMysql(0, phpVersions[0], this.getTaskComposerInstall(phpVersions[0]), isSecurity));
jobsMainStage.add(this.getJobIntegrationPhpStan(phpVersions[0], this.getTaskComposerInstall(phpVersions[0]), isSecurity));
......
......@@ -201,17 +201,14 @@ public class NightlySpec extends AbstractCoreSpec {
// regular tests, composer min
composerTask = getComposerTaskByStageNumber(phpVersion, COMPOSER_MIN);
jobs.addAll(this.getJobsAcceptanceTestsBackendMysql(COMPOSER_MIN, numberOfAcceptanceTestJobs, phpVersion, composerTask, false));
jobs.addAll(this.getJobsAcceptanceTestsPageTreeMysql(COMPOSER_MIN, phpVersion, composerTask, false));
// regular tests, composer max
composerTask = getComposerTaskByStageNumber(phpVersion, COMPOSER_MAX);
jobs.addAll(this.getJobsAcceptanceTestsBackendMysql(COMPOSER_MAX, numberOfAcceptanceTestJobs, phpVersion, composerTask, false));
jobs.addAll(this.getJobsAcceptanceTestsPageTreeMysql(COMPOSER_MAX, phpVersion, composerTask, false));
// regular tests, composer default
composerTask = getComposerTaskByStageNumber(phpVersion, COMPOSER_DEFAULT);
jobs.addAll(this.getJobsAcceptanceTestsBackendMysql(COMPOSER_DEFAULT, numberOfAcceptanceTestJobs, phpVersion, composerTask, false));
jobs.addAll(this.getJobsAcceptanceTestsPageTreeMysql(COMPOSER_DEFAULT, phpVersion, composerTask, false));
stages.add(new Stage("Acceptance mysql").jobs(jobs.toArray(new Job[0])));
return stages;
......
......@@ -57,7 +57,6 @@ include:
- local: 'Build/gitlab-ci/pre-merge/early.yml'
- local: 'Build/gitlab-ci/pre-merge/acceptance-install.yml'
- local: 'Build/gitlab-ci/pre-merge/acceptance-backend.yml'
- local: 'Build/gitlab-ci/pre-merge/acceptance-pagetree.yml'
- local: 'Build/gitlab-ci/pre-merge/acceptance-installtool.yml'
- local: 'Build/gitlab-ci/pre-merge/integrity.yml'
- local: 'Build/gitlab-ci/pre-merge/functional.yml'
......@@ -69,6 +68,5 @@ include:
- local: 'Build/gitlab-ci/nightly/acceptance-install.yml'
- local: 'Build/gitlab-ci/nightly/acceptance-installtool.yml'
- local: 'Build/gitlab-ci/nightly/acceptance-backend.yml'
- local: 'Build/gitlab-ci/nightly/acceptance-pagetree.yml'
- local: 'Build/gitlab-ci/nightly/functional.yml'
- local: 'Build/gitlab-ci/nightly/notify.yml'
acceptance pagetree mariadb php 7.4 locked:
stage: acceptance
only:
- schedules
artifacts:
when: on_failure
paths:
- typo3temp/var/tests/AcceptanceReports
script:
- Build/Scripts/runTests.sh -s composerInstall -p 7.4
- Build/Scripts/runTests.sh -s acceptancePagetree -p 7.4
acceptance pagetree mariadb php 7.4 max:
stage: acceptance
only:
- schedules
cache:
key: master-composer-max
paths:
- .cache
artifacts:
when: on_failure
paths:
- typo3temp/var/tests/AcceptanceReports
script:
- Build/Scripts/runTests.sh -s composerInstallMax -p 7.4
- Build/Scripts/runTests.sh -s acceptancePagetree -p 7.4
acceptance pagetree mariadb php 7.4 min:
stage: acceptance
only:
- schedules
cache:
key: master-composer-min
paths:
- .cache
artifacts:
when: on_failure
paths:
- typo3temp/var/tests/AcceptanceReports
script:
- Build/Scripts/runTests.sh -s composerInstallMin -p 7.4
- Build/Scripts/runTests.sh -s acceptancePagetree -p 7.4
acceptance pagetree mariadb php 7.4 pre-merge:
stage: main
except:
refs:
- schedules
- master
artifacts:
when: on_failure
paths:
- typo3temp/var/tests/AcceptanceReports
script:
- Build/Scripts/runTests.sh -s composerInstall -p 7.4
- Build/Scripts/runTests.sh -s acceptancePagetree -p 7.4
......@@ -200,46 +200,6 @@ services:
php -dxdebug.mode=off $${COMMAND}
"
prepare_acceptance_pagetree_mariadb:
image: alpine:3.8
links:
- mariadb
- chrome
- web
command: >
/bin/sh -c "
if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
set -x
fi
echo Waiting for database start...;
while ! nc -z mariadb 3306; do
sleep 1;
done;
echo Database is up;
"
acceptance_pagetree_mariadb:
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
environment:
typo3DatabaseName: func_test
typo3DatabaseUsername: root
typo3DatabasePassword: funcp
typo3DatabaseHost: mariadb
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
- ${HOST_HOME}:${HOST_HOME}
- ${PASSWD_PATH}:/etc/passwd:ro
- /etc/group:/etc/group:ro
working_dir: ${CORE_ROOT}
command: >
/bin/sh -c "
if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
set -x
fi
mkdir -p typo3temp/var/tests/ \
&& php -dxdebug.mode=off bin/codecept run PageTree -d -c typo3/sysext/core/Tests/codeception.yml ${TEST_FILE} --xml reports.xml --html reports.html
"
prepare_acceptance_installtool_mariadb:
image: alpine:3.8
links:
......
......@@ -2,6 +2,8 @@
declare(strict_types=1);
namespace TYPO3\CMS\Core\Tests\Acceptance\Backend\PageTree\DragAndDrop;
/*
* This file is part of the TYPO3 CMS project.
*
......@@ -15,8 +17,6 @@ declare(strict_types=1);
* The TYPO3 project - inspiring people to share!
*/
namespace TYPO3\CMS\Core\Tests\Acceptance\PageTree\DragAndDrop;
use Facebook\WebDriver\WebDriverKeys;
use TYPO3\CMS\Core\Tests\Acceptance\Support\BackendTester;
use TYPO3\CMS\Core\Tests\Acceptance\Support\Helper\Mouse;
......@@ -31,6 +31,8 @@ class PageCreationWithDragAndDropCest
protected static string $dragNode = '#typo3-pagetree-toolbar .svg-toolbar__drag-node';
protected static string $nodeEditInput = '.node-edit';
protected PageTree $pageTree;
/**
* Open list module of styleguide elements basic page
*
......@@ -40,9 +42,10 @@ class PageCreationWithDragAndDropCest
*/
public function _before(BackendTester $I, PageTree $pageTree): void
{
$this->pageTree = $pageTree;
$I->useExistingSession('admin');
$I->click('List');
$pageTree->openPath(['Root']);
$this->pageTree->openPath(['styleguide TCA demo']);
$I->waitForElement(static::$treeNode, 5);
$I->waitForElement(static::$dragNode, 5);
}
......@@ -51,26 +54,23 @@ class PageCreationWithDragAndDropCest
* Check drag and drop for new pages into nodes without children.
*
* @param BackendTester $I
* @param Mouse $mouse
* @throws \Exception
*/
public function dragAndDropNewPageInNodeWithoutChildren(BackendTester $I, Mouse $mouse): void
public function dragAndDropNewPageInNodeWithoutChildren(BackendTester $I): void
{
$I->amGoingTo('create a new page below pid=21 (no child pages) using drag and drop');
$this->dragAndDropNewPage($I, $mouse, 21);
$I->amGoingTo('create a new page below page without child pages using drag and drop');
$this->pageTree->dragAndDropNewPage('staticdata', static::$dragNode, static::$nodeEditInput);
}
/**
* Check drag and drop for new pages into nodes with children.
*
* @param BackendTester $I
* @param Mouse $mouse
* @throws \Exception
* @param PageTree $pageTree
*/
public function dragAndDropNewPageInNodeWithChildren(BackendTester $I, Mouse $mouse): void
public function dragAndDropNewPageInNodeWithChildren(BackendTester $I): void
{
$I->amGoingTo('create a new page below pid=10 (has child pages) using drag and drop');
$this->dragAndDropNewPage($I, $mouse, 10);
$I->amGoingTo('create a new page below page with child pages using drag and drop');
$this->pageTree->dragAndDropNewPage('styleguide TCA demo', static::$dragNode, static::$nodeEditInput);
}
/**
......@@ -82,7 +82,7 @@ class PageCreationWithDragAndDropCest
*/
public function dragAndDropNewPageAndQuitPageCreation(BackendTester $I, Mouse $mouse): void
{
$mouse->dragAndDrop(static::$dragNode, $this->getPageIdentifier(22));
$mouse->dragAndDrop(static::$dragNode, $this->pageTree->getPageXPathByPageName('elements basic'));
$I->seeElement(static::$nodeEditInput);
$I->pressKey(static::$nodeEditInput, WebDriverKeys::ESCAPE);
......@@ -98,7 +98,7 @@ class PageCreationWithDragAndDropCest
*/
public function dragAndDropNewPageAndLeavePageTitleEmpty(BackendTester $I, Mouse $mouse): void
{
$mouse->dragAndDrop(static::$dragNode, $this->getPageIdentifier(22));
$mouse->dragAndDrop(static::$dragNode, $this->pageTree->getPageXPathByPageName('staticdata'));
$I->seeElement(static::$nodeEditInput);
......@@ -113,46 +113,4 @@ class PageCreationWithDragAndDropCest
$I->pressKey(static::$nodeEditInput, WebDriverKeys::ENTER);
$I->waitForElementNotVisible(static::$nodeEditInput, 5);
}
/**
* Perform drag and drop for a new page into the given target page.
*
* @param BackendTester $I
* @param Mouse $mouse
* @param int $targetPageId
* @throws \Exception
*/
protected function dragAndDropNewPage(BackendTester $I, Mouse $mouse, int $targetPageId): void
{
$target = $this->getPageIdentifier($targetPageId);
$pageTitle = sprintf('Dummy 1-%d-new', $targetPageId);
$mouse->dragAndDrop(static::$dragNode, $target);
$I->seeElement(static::$nodeEditInput);
// 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);
}
/**
* Get node identifier of given page.
*
* @param int $pageId
* @return string
*/
protected function getPageIdentifier(int $pageId): string
{
return '#identifier-0_' . $pageId;
}
}
......@@ -15,7 +15,7 @@ declare(strict_types=1);
* The TYPO3 project - inspiring people to share!
*/
namespace TYPO3\CMS\Core\Tests\Acceptance\PageTree\KeyboardAccess;
namespace TYPO3\CMS\Core\Tests\Acceptance\Backend\PageTree\KeyboardAccess;
use Exception;
use Facebook\WebDriver\WebDriverKeys;
......@@ -53,8 +53,8 @@ class SelectPagetreeWithKeyboardCest
$I->seeElement('#typo3-pagetree-tree [tabindex="0"]');
$I->pressKey('#typo3-pagetree-tree [tabindex="0"]', WebDriverKeys::DOWN);
$I->assertEquals(
'identifier-0_2',
$I->grabAttributeFrom('#typo3-pagetree-tree [tabindex="0"]', 'id')
'Dummy 1-2',
$I->grabTextFrom('#typo3-pagetree-tree [tabindex="0"]')
);
$I->pressKey('#typo3-pagetree-tree [tabindex="0"]', WebDriverKeys::ENTER);
$I->switchToContentFrame();
......@@ -72,13 +72,13 @@ class SelectPagetreeWithKeyboardCest
$I->pressKey('#typo3-pagetree-tree [tabindex="0"]', WebDriverKeys::DOWN);
$I->pressKey('#typo3-pagetree-tree [tabindex="0"]', WebDriverKeys::DOWN);
$I->assertEquals(
'identifier-0_3',
$I->grabAttributeFrom('#typo3-pagetree-tree [tabindex="0"]', 'id')
'Dummy 1-3',
$I->grabTextFrom('#typo3-pagetree-tree [tabindex="0"]')
);
$I->pressKey('#typo3-pagetree-tree [tabindex="0"]', WebDriverKeys::UP);
$I->assertEquals(
'identifier-0_2',
$I->grabAttributeFrom('#typo3-pagetree-tree [tabindex="0"]', 'id')
'Dummy 1-2',
$I->grabTextFrom('#typo3-pagetree-tree [tabindex="0"]')
);
}
......@@ -96,33 +96,33 @@ class SelectPagetreeWithKeyboardCest
}
$I->amGoingTo('check if the parent key is selected and child is not visible');
$I->assertEquals(
'identifier-0_4',
$I->grabAttributeFrom('#typo3-pagetree-tree [tabindex="0"]', 'id')
'Dummy 1-4',
$I->grabTextFrom('#typo3-pagetree-tree [tabindex="0"]')
);
$I->pressKey('#typo3-pagetree-tree [tabindex="0"]', WebDriverKeys::RIGHT);
$I->amGoingTo('check if parent is still selected and child is visible');
$I->pressKey('#typo3-pagetree-tree [tabindex="0"]', WebDriverKeys::RIGHT);
$I->assertEquals(
'identifier-0_4',
$I->grabAttributeFrom('#typo3-pagetree-tree [tabindex="0"]', 'id')
'Dummy 1-4',
$I->grabTextFrom('#typo3-pagetree-tree [tabindex="0"]')
);
$I->seeElement('#identifier-0_5');
$I->see('Dummy 1-4-5');
$I->amGoingTo('check if first child node is selected');
$I->pressKey('#typo3-pagetree-tree [tabindex="0"]', WebDriverKeys::RIGHT);
$I->amGoingTo('check if first childnode is selected');
$I->assertEquals(
'identifier-0_5',
$I->grabAttributeFrom('#typo3-pagetree-tree [tabindex="0"]', 'id')
'Dummy 1-4-5',
$I->grabTextFrom('#typo3-pagetree-tree [tabindex="0"]')
);
$I->pressKey('#typo3-pagetree-tree [tabindex="0"]', WebDriverKeys::RIGHT);
$I->amGoingTo('check if first childnode is still selected');
$I->amGoingTo('check if first child node is still selected');
$I->assertEquals(
'identifier-0_5',
$I->grabAttributeFrom('#typo3-pagetree-tree [tabindex="0"]', 'id')
'Dummy 1-4-5',
$I->grabTextFrom('#typo3-pagetree-tree [tabindex="0"]')
);
$I->amGoingTo('check if second child node is selected');
$I->pressKey('#typo3-pagetree-tree [tabindex="0"]', WebDriverKeys::DOWN);
$I->amGoingTo('check if second childnode is still selected');
$I->assertEquals(
'identifier-0_6',
$I->grabAttributeFrom('#typo3-pagetree-tree [tabindex="0"]', 'id')
'Dummy 6',
$I->grabTextFrom('#typo3-pagetree-tree [tabindex="0"]')
);
}
......@@ -135,25 +135,26 @@ class SelectPagetreeWithKeyboardCest
{
$I->seeElement('#typo3-pagetree-tree [tabindex="0"]');
$I->assertEquals(
'identifier-0_1',
$I->grabAttributeFrom('#typo3-pagetree-tree [tabindex="0"]', 'id')
'Root',
$I->grabTextFrom('#typo3-pagetree-tree [tabindex="0"]')
);
$I->seeElement('#identifier-0_2');
$I->see('Dummy 1-2');
$I->amGoingTo('collapse the current tree using left key');
$I->pressKey('#typo3-pagetree-tree [tabindex="0"]', WebDriverKeys::LEFT);
$I->assertEquals(
'identifier-0_1',
$I->grabAttributeFrom('#typo3-pagetree-tree [tabindex="0"]', 'id')
'Root',
$I->grabTextFrom('#typo3-pagetree-tree [tabindex="0"]')
);
$I->cantSeeElement('#identifier-0_2');
$I->cantSee('Dummy 1-2');
$I->amGoingTo('go to parent of the current collapsed node using left key');
$I->pressKey('#typo3-pagetree-tree [tabindex="0"]', WebDriverKeys::LEFT);
$I->amGoingTo('check if parent (root) is selected and child is visible');
$I->assertEquals(
'identifier-0_0',
$I->grabAttributeFrom('#typo3-pagetree-tree [tabindex="0"]', 'id')
'New TYPO3 site',
$I->grabTextFrom('#typo3-pagetree-tree [tabindex="0"]')
);
$I->canSeeElement('#identifier-0_1');
$I->canSee('Root');
$I->canSee('styleguide TCA demo');
}
/**
......@@ -166,8 +167,13 @@ class SelectPagetreeWithKeyboardCest
$I->seeElement('#typo3-pagetree-tree [tabindex="0"]');
$I->pressKey('#typo3-pagetree-tree [tabindex="0"]', WebDriverKeys::END);
$I->assertEquals(
'identifier-0_50',
$I->grabAttributeFrom('#typo3-pagetree-tree [tabindex="0"]', 'id')
'styleguide TCA demo',
$I->grabTextFrom('#typo3-pagetree-tree [tabindex="0"]')
);
$I->pressKey('#typo3-pagetree-tree [tabindex="0"]', WebDriverKeys::UP);
$I->assertEquals(
'Dummy 1-50',
$I->grabTextFrom('#typo3-pagetree-tree [tabindex="0"]')
);
}
......@@ -183,14 +189,14 @@ class SelectPagetreeWithKeyboardCest
$I->pressKey('#typo3-pagetree-tree [tabindex="0"]', WebDriverKeys::DOWN);
}
$I->assertEquals(
'identifier-0_21',
$I->grabAttributeFrom('#typo3-pagetree-tree [tabindex="0"]', 'id')
'Dummy 1-21',
$I->grabTextFrom('#typo3-pagetree-tree [tabindex="0"]')
);
$I->pressKey('#typo3-pagetree-tree [tabindex="0"]', WebDriverKeys::HOME);
$I->assertEquals(
'identifier-0_0',
$I->grabAttributeFrom('#typo3-pagetree-tree [tabindex="0"]', 'id')
'New TYPO3 site',
$I->grabTextFrom('#typo3-pagetree-tree [tabindex="0"]')
);
}
}
......@@ -45,17 +45,13 @@ class TemplateCest
public function pagesWithNoTemplateShouldShowButtonsToCreateTemplates(BackendTester $I)
{
$I->wantTo('show templates overview on root page (uid = 0)');
$I->switchToMainFrame();
// click on root page
$I->click('.node.identifier-0_0');
$I->switchToContentFrame();
$I->waitForElementVisible('#ts-overview');
$I->see('This is an overview of the pages in the database containing one or more template records. Click a page title to go to the page.');
$I->wantTo('show templates overview on website root page (uid = 1 and pid = 0)');
$I->switchToMainFrame();
// click on website root page
$I->click('.node.identifier-0_1');
$I->clickWithLeftButton('//*[text()=\'styleguide TCA demo\']');
$I->switchToContentFrame();
$I->waitForText('No template');
$I->see('There was no template on this page!');
......@@ -78,7 +74,7 @@ class TemplateCest
{
$I->wantTo('create a new site template');
$I->switchToMainFrame();
$I->click('.node.identifier-0_1');
$I->clickWithLeftButton('//*[text()=\'styleguide TCA demo\']');
$I->switchToContentFrame();
$I->waitForText('Create new website');
$I->click("//input[@name='newWebsite']");
......
<
class_name: BackendTester
modules:
enabled:
- WebDriver:
url: '%typo3TestingAcceptanceBaseUrl%/typo3temp/var/tests/acceptance'
browser: chrome
wait: 1
host: chrome
- \TYPO3\TestingFramework\Core\Acceptance\Helper\Acceptance
- \TYPO3\TestingFramework\Core\Acceptance\Helper\Login:
sessions:
# This sessions must exist in the database fixture to get a logged in state.
editor: ff83dfd81e20b34c27d3e97771a4525a
admin: 886526ce72b86870739cc41991144ec1
- Asserts
extensions: