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