[TASK] Improve acceptance test for extensionmanager 81/50381/3
authorMarco Bresch <marco.bresch@starfinanz.de>
Wed, 26 Oct 2016 09:55:52 +0000 (11:55 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Wed, 26 Oct 2016 17:35:09 +0000 (19:35 +0200)
Summarize two tests in one test to uninstall and install the belog extension.

Resolves: #78441
Relates: #78185, #77820
Releases: master
Change-Id: I617916480686561114db0d4cc39f9f707adefe22
Reviewed-on: https://review.typo3.org/50381
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/core/Tests/Acceptance/Backend/Extensionmanager/InstalledExtensionsCest.php

index 97fad09..551f7ed 100644 (file)
@@ -72,46 +72,39 @@ class InstalledExtensionsCest
 
     /**
      * @param Admin $I
-     * @return Admin
      */
-    public function checkIfInstallingAnExtensionWithBackendModuleAddsTheModuleToTheModuleMenu(Admin $I)
+    public function checkUninstallingAndInstallingAnExtension(Admin $I)
     {
+        $I->wantTo('Check if uninstalling and installing an extension with backend module removes and adds the module from the module menu.');
+        $I->amGoingTo('uninstall extension belog');
         $I->switchToIFrame();
-        $I->canSeeElement('.modulemenu-item-link');
-        $I->cantSeeElement('#web_RecyclerRecycler');
+        $I->canSeeElement('#system_BelogLog');
 
         $I->switchToIFrame('list_frame');
-        $I->fillField('Tx_Extensionmanager_extensionkey', 'recycler');
-        $I->waitForElementVisible('//*[@id="typo3-extension-list"]/tbody/tr[@id="recycler"]');
-        $I->click('a[data-original-title="Activate"]', '//*[@id="typo3-extension-list"]/tbody/tr[@id="recycler"]');
+        $I->fillField('Tx_Extensionmanager_extensionkey', 'belog');
+        $I->waitForElementVisible('//*[@id="typo3-extension-list"]/tbody/tr[@id="belog"]');
+        $I->click('a[data-original-title="Deactivate"]', '//*[@id="typo3-extension-list"]/tbody/tr[@id="belog"]');
 
         $I->waitForElementVisible('#Tx_Extensionmanager_extensionkey ~button.close', 1);
         $I->click('#Tx_Extensionmanager_extensionkey ~button.close');
 
         $I->switchToIFrame();
-        $I->canSeeElement('#web_RecyclerRecycler');
-
-        return $I;
-    }
+        $I->cantSeeElement('#system_BelogLog');
 
-    /**
-     * @depends checkIfInstallingAnExtensionWithBackendModuleAddsTheModuleToTheModuleMenu
-     * @param Admin $I
-     */
-    public function checkIfUninstallingAnExtensionWithBackendModuleRemovesTheModuleFromTheModuleMenu(Admin $I)
-    {
+        $I->amGoingTo('install extension belog');
         $I->switchToIFrame();
-        $I->canSeeElement('#web_RecyclerRecycler');
+        $I->canSeeElement('.modulemenu-item-link');
+        $I->cantSeeElement('#system_BelogLog');
 
         $I->switchToIFrame('list_frame');
-        $I->fillField('Tx_Extensionmanager_extensionkey', 'recycler');
-        $I->waitForElementVisible('//*[@id="typo3-extension-list"]/tbody/tr[@id="recycler"]');
-        $I->click('a[data-original-title="Deactivate"]', '//*[@id="typo3-extension-list"]/tbody/tr[@id="recycler"]');
+        $I->fillField('Tx_Extensionmanager_extensionkey', 'belog');
+        $I->waitForElementVisible('//*[@id="typo3-extension-list"]/tbody/tr[@id="belog"]');
+        $I->click('a[data-original-title="Activate"]', '//*[@id="typo3-extension-list"]/tbody/tr[@id="belog"]');
 
         $I->waitForElementVisible('#Tx_Extensionmanager_extensionkey ~button.close', 1);
         $I->click('#Tx_Extensionmanager_extensionkey ~button.close');
 
         $I->switchToIFrame();
-        $I->cantSeeElement('#web_RecyclerRecycler');
+        $I->canSeeElement('#system_BelogLog');
     }
 }