‪TYPO3CMS  ‪main
InlinePagesLocalizeResourceCest.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
22 
24 {
25  public function ‪_before(‪ApplicationTester $I, ‪PageTree $pageTree): void
26  {
27  $I->useExistingSession('admin');
28 
29  $I->click('List');
30  $pageTree->‪openPath(['styleguide TCA demo', 'staticdata']);
31  $I->switchToContentFrame();
32  $I->waitForText('staticdata', 20);
33  }
34 
36  {
37  // Add an image to media field of default lang page
38  $I->click('.module-docheader a[title="Edit page properties"]');
39  $I->waitForText('Edit Page "staticdata"', 3, 'h1');
40  // Inline add record in Resources tab
41  $I->click('Resources');
42  $I->click('span[data-identifier="actions-insert-record"]', 'div.active');
43  $I->switchToWindow('typo3-backend');
44  $I->switchToIFrame('modal_frame');
45  // Find page 'styleguide' in page tree of modal and click it
46  $I->click('//div[contains(@class, "element-browser-main-sidebar")]//*[text()="styleguide"]/..');
47  $I->waitForElementVisible('[data-filelist-name="telephone_box.jpg"] [data-filelist-action="primary"]');
48  $I->click('[data-filelist-name="telephone_box.jpg"] [data-filelist-action="primary"]');
49  // Save, go back to list
50  $I->switchToWindow('typo3-backend');
51  $I->switchToContentFrame();
52  $I->click('.module-docheader a[title="Close"]');
53  $I->switchToWindow('typo3-backend');
54  $I->wait(1);
55  $I->waitForText('Save and close');
56  $I->click('Save and close');
57  $I->wait(1);
58  // Edit the page translation and see if that resource has been added.
59  $I->switchToContentFrame();
60  $I->waitForText('staticdata - language 1');
61  $I->wait(1);
62  $I->click('staticdata - language 1');
63  $I->waitForText('Edit Page "staticdata - language 1"', 3, 'h1');
64  $I->click('Resources');
65  $I->see('telephone_box.jpg');
66  }
67 }
‪TYPO3\CMS\Core\Tests\Acceptance\Application\FormEngine
Definition: AbstractElementsBasicCest.php:18
‪TYPO3\CMS\Core\Tests\Acceptance\Support\ApplicationTester
Definition: ApplicationTester.php:28
‪TYPO3\CMS\Core\Tests\Acceptance\Application\FormEngine\InlinePagesLocalizeResourceCest
Definition: InlinePagesLocalizeResourceCest.php:24
‪TYPO3\CMS\Core\Tests\Acceptance\Support\Helper\AbstractTree\openPath
‪openPath(array $path)
Definition: AbstractTree.php:55
‪TYPO3\CMS\Core\Tests\Acceptance\Application\FormEngine\InlinePagesLocalizeResourceCest\addingResourceToDefaultLangPageAddResourceToLocalizedPage
‪addingResourceToDefaultLangPageAddResourceToLocalizedPage(ApplicationTester $I)
Definition: InlinePagesLocalizeResourceCest.php:35
‪TYPO3\CMS\Core\Tests\Acceptance\Support\Helper\PageTree
Definition: PageTree.php:26
‪TYPO3\CMS\Core\Tests\Acceptance\Application\FormEngine\InlinePagesLocalizeResourceCest\_before
‪_before(ApplicationTester $I, PageTree $pageTree)
Definition: InlinePagesLocalizeResourceCest.php:25