‪TYPO3CMS  11.5
SysNoteCest.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 
20 use Codeception\Util\Locator;
23 
28 {
29  public function ‪_before(‪ApplicationTester $I): void
30  {
31  $I->useExistingSession('admin');
32  }
33 
34  public function ‪notesEntryCanBeEdited(‪ApplicationTester $I, ‪PageTree $pageTree): void
35  {
36  $I->wantToTest('whether sysnote entries can be edited via the Internal Notes section in List View');
37 
38  $I->amGoingTo('create a record');
39  $I->click('List');
40  $I->waitForElementNotVisible('#nprogress');
41  $pageTree->‪openPath(['styleguide TCA demo']);
42  $I->switchToContentFrame();
43 
44  $I->click('.module-docheader .btn[title="Create new record"]');
45  $I->wait(0.2);
46  $I->canSee('New record');
47  $I->scrollTo(Locator::find('span', ['data-identifier' => 'mimetypes-x-sys_note']));
48  $I->click('Internal note');
49 
50  $I->fillField('//input[contains(@data-formengine-input-name, "data[sys_note]") and contains(@data-formengine-input-name, "[subject]")]', 'new sys_note');
51  $I->click('button[name="_savedok"]');
52  $I->wait(0.2);
53  $I->waitForElementNotVisible('#t3js-ui-block');
54  $I->click('a[title="Close"]');
55  $I->wait(1);
56  $I->canSee('styleguide TCA demo', 'h1');
57  $I->click('button.t3js-toggle-recordlist[data-table="pages"]');
58  $I->canSee('Internal notes', 'h2');
59  $I->canSee('new sys_note');
60  $I->click('.note-list > .note > .note-header > .note-header-bar > .note-actions a:nth-child(1)');
61  $I->wait(0.2);
62  $I->canSee('Edit Internal note "new sys_note"');
63  }
64 }
‪TYPO3\CMS\Core\Tests\Acceptance\Support\ApplicationTester
Definition: ApplicationTester.php:27
‪TYPO3\CMS\Core\Tests\Acceptance\Application\RecordList
Definition: RecordDownloadCest.php:18
‪TYPO3\CMS\Core\Tests\Acceptance\Support\Helper\PageTree\openPath
‪openPath(array $path)
Definition: PageTree.php:76
‪TYPO3\CMS\Core\Tests\Acceptance\Application\RecordList\SysNoteCest\notesEntryCanBeEdited
‪notesEntryCanBeEdited(ApplicationTester $I, PageTree $pageTree)
Definition: SysNoteCest.php:34
‪TYPO3\CMS\Core\Tests\Acceptance\Application\RecordList\SysNoteCest\_before
‪_before(ApplicationTester $I)
Definition: SysNoteCest.php:29
‪TYPO3\CMS\Core\Tests\Acceptance\Support\Helper\PageTree
Definition: PageTree.php:31
‪TYPO3\CMS\Core\Tests\Acceptance\Application\RecordList\SysNoteCest
Definition: SysNoteCest.php:28