543273bfee90220de72f8970361d51364c249a81
[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 // Ensure main content frame is fully loaded, otherwise there are load-race-conditions
35 $I->switchToIFrame('list_frame');
36 $I->waitForText('Web Content Management System');
37 $I->switchToIFrame();
38 }
39
40 /**
41 * @param Admin $I
42 *
43 * @throws \Exception
44 */
45 public function metaDataCanBeEdited(Admin $I)
46 {
47 $I->wantToTest('Metadata can be edited through search list results');
48 $I->click('Filelist');
49
50 $I->switchToIFrame('list_frame');
51 $I->waitForElementNotVisible('div#nprogress');
52 $I->canSee('fileadmin/ (auto-created)');
53
54 $I->fillField('tx_filelist_file_filelistlist[searchWord]', 'bus');
55 $I->click('Search');
56 $I->waitForElementVisible('table.table-striped');
57
58 $I->click('bus_lane.jpg');
59 $I->waitForElementNotVisible('#t3js-ui-block');
60 $I->waitForElementVisible('#EditDocumentController');
61
62 $I->canSee('Edit File Metadata "bus_lane.jpg"', 'h1');
63 }
64 }