[TASK] Stabilize acceptance tests
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Tests / Acceptance / Backend / FileList / FileMetaDataCest.php
1 <?php
2 declare(strict_types = 1);
3
4 namespace TYPO3\CMS\Core\Tests\Acceptance\Backend\FileList;
5
6 /*
7 * This file is part of the TYPO3 CMS project.
8 *
9 * It is free software; you can redistribute it and/or modify it under
10 * the terms of the GNU General Public License, either version 2
11 * of the License, or any later version.
12 *
13 * For the full copyright and license information, please read the
14 * LICENSE.txt file that was distributed with this source code.
15 *
16 * The TYPO3 project - inspiring people to share!
17 */
18
19 use TYPO3\TestingFramework\Core\Acceptance\Step\Backend\Admin;
20
21 /**
22 * Cases concerning sys_file_metadata records
23 */
24 class FileMetaDataCest
25 {
26 /**
27 * @param Admin $I
28 *
29 * @throws \Exception
30 */
31 public function _before(Admin $I)
32 {
33 $I->useExistingSession();
34 }
35
36 /**
37 * @param Admin $I
38 *
39 * @throws \Exception
40 */
41 public function metaDataCanBeEdited(Admin $I)
42 {
43 $I->wantToTest('Metadata can be edited through search list results');
44 $I->click('Filelist');
45
46 $I->switchToContentFrame();
47 $I->canSee('fileadmin/ (auto-created)');
48
49 $I->fillField('tx_filelist_file_filelistlist[searchWord]', 'bus');
50 $I->click('Search');
51 $I->waitForElementVisible('table.table-striped');
52
53 $I->click('bus_lane.jpg');
54 $I->waitForElementNotVisible('#t3js-ui-block');
55 $I->waitForElementVisible('#EditDocumentController');
56
57 $I->canSee('Edit File Metadata "bus_lane.jpg"', 'h1');
58 }
59 }