‪TYPO3CMS  ‪main
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 
27 final class ‪SysNoteCest
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->wait(0.2);
43  $I->switchToContentFrame();
44 
45  $I->click('.module-docheader .btn[title="Create new record"]');
46  $I->wait(0.2);
47  $I->canSee('New record');
48  $I->scrollTo(Locator::find('span', ['data-identifier' => 'mimetypes-x-sys_note']));
49  $I->click('Internal note');
50 
51  $I->fillField('//input[contains(@data-formengine-input-name, "data[sys_note]") and contains(@data-formengine-input-name, "[subject]")]', 'new sys_note');
52  $I->click('button[name="_savedok"]');
53  $I->wait(0.2);
54  $I->waitForElementNotVisible('#t3js-ui-block');
55  $I->click('a[title="Close"]');
56  $I->wait(1);
57  $I->canSeeElement('typo3-backend-editable-page-title[pagetitle="styleguide TCA demo"]');
58  $I->click('button.t3js-toggle-recordlist[data-table="pages"]');
59  $I->canSee('Internal notes', 'h2');
60  $I->canSee('new sys_note');
61  $I->switchToMainFrame();
62  $I->waitForElementNotVisible('#alert-container');
63  $I->switchToContentFrame();
64  $I->click('.note-list > .note > .note-header > .note-header-bar > .note-actions a:nth-child(1)');
65  $I->wait(0.2);
66  $I->canSee('Edit Internal note "new sys_note"');
67  }
68 }
‪TYPO3\CMS\Core\Tests\Acceptance\Support\ApplicationTester
Definition: ApplicationTester.php:28
‪TYPO3\CMS\Core\Tests\Acceptance\Application\RecordList
Definition: RecordDownloadCest.php:18
‪TYPO3\CMS\Core\Tests\Acceptance\Support\Helper\AbstractTree\openPath
‪openPath(array $path)
Definition: AbstractTree.php:55
‪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:26
‪TYPO3\CMS\Core\Tests\Acceptance\Application\RecordList\SysNoteCest
Definition: SysNoteCest.php:28