[TASK] Make failing acceptance tests after image update run again
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Tests / Acceptance / Backend / Extensionmanager / GetExtensionsCest.php
1 <?php
2 namespace TYPO3\CMS\Core\Tests\Acceptance\Backend\Extensionmanager;
3
4 /*
5 * This file is part of the TYPO3 CMS project.
6 *
7 * It is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU General Public License, either version 2
9 * of the License, or any later version.
10 *
11 * For the full copyright and license information, please read the
12 * LICENSE.txt file that was distributed with this source code.
13 *
14 * The TYPO3 project - inspiring people to share!
15 */
16
17 use Facebook\WebDriver\WebDriverKeys;
18 use TYPO3\TestingFramework\Core\Acceptance\Step\Backend\Admin;
19
20 /**
21 * Tests for the "Get Extensions view" of the extension manager
22 */
23 class GetExtensionsCest
24 {
25 /**
26 * @param Admin $I
27 */
28 public function _before(Admin $I)
29 {
30 $I->useExistingSession();
31 // Ensure main content frame is fully loaded, otherwise there are load-race-conditions
32 $I->switchToIFrame('list_frame');
33 $I->waitForText('Web Content Management System');
34 $I->switchToIFrame();
35
36 $I->click('Extensions', '#menu');
37 $I->switchToIFrame('list_frame');
38 $I->waitForElementVisible('#typo3-extension-list');
39
40 $I->selectOption('[name="ExtensionManagerModuleMenu"]', 'Get Extensions');
41 $I->waitForElementVisible('#terTable_wrapper');
42
43 // We expect exact two extensions created from the Fixtures
44 $I->canSeeNumberOfElements('#terTable tbody tr', 2);
45 }
46
47 /**
48 * @param Admin $I
49 */
50 public function checkRetrievedExtensionsFromTerAreDisplayed(Admin $I)
51 {
52 $I->see('superext');
53 $I->see('neededext');
54 }
55
56 /**
57 * @param Admin $I
58 */
59 public function checkPageBrowserDisplaysTwoRecords(Admin $I)
60 {
61 $I->canSeeElement('.pagination-wrap');
62 $I->canSee('Records 1 - 2');
63 }
64
65 /**
66 * @param Admin $I
67 */
68 public function checkSearchFilterListFindsExtensionKey(Admin $I)
69 {
70 $I->fillField('input[name="tx_extensionmanager_tools_extensionmanagerextensionmanager[search]"]', 'superext');
71 $I->click('Go');
72 // @todo do something about the double loading of the table, it is rendered twice (not double, but once, then retrieve extension list loader, then second time)
73 $I->waitForElementVisible('#terSearchTable');
74 $I->wait(3);
75 $I->waitForElementNotVisible('div#nprogess');
76 $I->canSeeNumberOfElements('#terSearchTable tbody tr', 1);
77 $I->canSee('Super Extension');
78
79 $I->amGoingTo('search extension neededext and submit with enter');
80
81 $I->fillField('input[name="tx_extensionmanager_tools_extensionmanagerextensionmanager[search]"]', 'neededext');
82 $I->pressKey('input[name="tx_extensionmanager_tools_extensionmanagerextensionmanager[search]"]', WebDriverKeys::ENTER);
83 $I->waitForElementVisible('#terSearchTable');
84 $I->wait(3);
85 $I->waitForElementNotVisible('div#nprogess');
86 $I->canSeeNumberOfElements('#terSearchTable tbody tr', 1);
87 $I->canSee('Needed Extension');
88 }
89
90 /**
91 * @param Admin $I
92 */
93 public function checkSearchFilterListFindsPartOfExtensionKey(Admin $I)
94 {
95 $I->fillField('input[name="tx_extensionmanager_tools_extensionmanagerextensionmanager[search]"]', 'ext');
96 $I->click('Go');
97 $I->waitForElementVisible('#terSearchTable');
98 $I->canSeeNumberOfElements('#terSearchTable tbody tr', 2);
99 $I->wait(3);
100 $I->waitForElementNotVisible('div#nprogess');
101 $I->canSee('Super Extension');
102 $I->canSee('Needed Extension');
103 }
104 }