Skip to content

Commit

Permalink
[TASK] Stabilize TemplateCest acceptence tests
Browse files Browse the repository at this point in the history
Those need some additional waitFor checks to be more
stable since the v12 refactoring with all the new
js magic.

Resolves: #101493
Releases: main, 12.4
Change-Id: Ib5cf06f92ced20c5ee97a77ef15a870dcbf0c36a
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/80223
Tested-by: Stefan B�rk <stefan@buerk.tech>
Tested-by: core-ci <typo3@b13.com>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Stefan B�rk <stefan@buerk.tech>
  • Loading branch information
lolli42 committed Jul 30, 2023
1 parent 625f55d commit 43a0013
Showing 1 changed file with 20 additions and 0 deletions.
Expand Up @@ -52,6 +52,7 @@ public function pagesWithNoTemplateShouldShowButtonsToCreateTemplates(Applicatio
// click on website root page
$I->clickWithLeftButton('//*[text()=\'styleguide TCA demo\']');
$I->switchToContentFrame();
$I->waitForElementVisible('div.module-docheader select.t3-js-jumpMenuBox');
$I->selectOption('div.module-docheader select.t3-js-jumpMenuBox', 'Edit TypoScript Record');
$I->waitForText('No TypoScript record');
$I->see('No TypoScript record on the current page');
Expand All @@ -65,11 +66,13 @@ public function addANewSiteTemplate(ApplicationTester $I): void
$I->switchToMainFrame();
$I->clickWithLeftButton('//*[text()=\'styleguide TCA demo\']');
$I->switchToContentFrame();
$I->waitForElementVisible('.t3-js-jumpMenuBox');
$I->selectOption('.t3-js-jumpMenuBox', 'Constant Editor');
$I->waitForText('Root TypoScript record');
$I->click("//input[@name='newWebsite']");

$I->wantTo('change to Override TypoScript and see the TypoScript record overview table');
$I->waitForElementVisible('.t3-js-jumpMenuBox');
$I->selectOption('.t3-js-jumpMenuBox', 'Edit TypoScript Record');
$I->waitForElement('.table-striped');
$I->see('Title');
Expand Down Expand Up @@ -103,6 +106,7 @@ public function addANewSiteTemplate(ApplicationTester $I): void
$I->see('Acceptance Test Site');

$I->wantTo('change the TypoScript record within the TypoScript Object Browser');
$I->waitForElementVisible('.t3-js-jumpMenuBox');
$I->selectOption('.t3-js-jumpMenuBox', 'Active TypoScript');
$I->click('#panel-tree-heading-setup');
$I->waitForText('Setup');
Expand Down Expand Up @@ -132,6 +136,7 @@ public function checkClosestTemplateButton(ApplicationTester $I): void
$I->clickWithLeftButton('(//*[contains(concat(" ", normalize-space(@class), " "), " node-toggle ")])[4]');
$I->clickWithLeftButton('//*[text()=\'menu_sitemap_pages\']');
$I->switchToContentFrame();
$I->waitForElementVisible('.t3-js-jumpMenuBox');
$I->selectOption('.t3-js-jumpMenuBox', 'Constant Editor');
$I->waitForText('No TypoScript record');
$I->see('No TypoScript record on the current page');
Expand All @@ -140,12 +145,18 @@ public function checkClosestTemplateButton(ApplicationTester $I): void
$I->clickWithLeftButton('//a[text()[normalize-space(.) = "Select this TypoScript record"]]');

$I->wantTo('see that the page has a TypoScript record');
$I->waitForElementVisible('.t3-js-jumpMenuBox');
$I->selectOption('.t3-js-jumpMenuBox', 'Edit TypoScript Record');
$I->waitForElement('.table-striped');
$I->waitForText('Title');
$I->see('Title');
$I->waitForText('Description');
$I->see('Description');
$I->waitForText('Constants');
$I->see('Constants');
$I->waitForText('Setup');
$I->see('Setup');
$I->waitForText('Edit the whole TypoScript record');
$I->see('Edit the whole TypoScript record');
$I->click('Edit the whole TypoScript record');
}
Expand All @@ -158,18 +169,25 @@ public function createExtensionTemplate(ApplicationTester $I): void
$I->clickWithLeftButton('(//*[contains(concat(" ", normalize-space(@class), " "), " node-toggle ")])[4]');
$I->clickWithLeftButton('//*[text()=\'menu_sitemap_pages\']');
$I->switchToContentFrame();
$I->waitForElementVisible('.t3-js-jumpMenuBox');
$I->selectOption('.t3-js-jumpMenuBox', 'Constant Editor');
$I->waitForText('No TypoScript record');
$I->see('No TypoScript record on the current page');
$I->see('You need to create a TypoScript record in order to edit your configuration.');
$I->clickWithLeftButton('//input[@name=\'createExtension\']');
$I->wantTo('see that the page has a TypoScript record');
$I->waitForElementVisible('.t3-js-jumpMenuBox');
$I->selectOption('.t3-js-jumpMenuBox', 'Edit TypoScript Record');
$I->waitForElement('.table-striped');
$I->waitForText('Title');
$I->see('Title');
$I->waitForText('Description');
$I->see('Description');
$I->waitForText('Constants');
$I->see('Constants');
$I->waitForText('Setup');
$I->see('Setup');
$I->waitForText('Edit the whole TypoScript record');
$I->see('Edit the whole TypoScript record');
$I->click('Edit the whole TypoScript record');
}
Expand All @@ -183,11 +201,13 @@ public function searchInTypoScriptActive(ApplicationTester $I): void
$I->switchToMainFrame();
$I->clickWithLeftButton('//*[text()=\'styleguide TCA demo\']');
$I->switchToContentFrame();
$I->waitForElementVisible('.t3-js-jumpMenuBox');
$I->selectOption('.t3-js-jumpMenuBox', 'Active TypoScript');
$I->waitForText('Active TypoScript for record');
$I->amGoingTo('type "styles" into the search field and submit.');
$I->fillField('#searchValue', 'styles');
$I->waitForText('Setup');
$I->waitForText('1 search match(es)');
$I->seeInSource('<strong data-markjs="true" class="text-danger">styles</strong>');
}
}

0 comments on commit 43a0013

Please sign in to comment.