Skip to content
Snippets Groups Projects
Commit 254ceef4 authored by Mathias Schreiber's avatar Mathias Schreiber Committed by Christian Kuhn
Browse files

[BUGFIX] Stabilize Language Acceptance tests

Stabilize the acceptance tests to activate and deactivate a language by
checking only for the alerts instead of the enabled/disabled rows.

Additionally make the download a language test fail immediately if the
language is enabled.

Resolves: #82972
Releases: master, 8.7
Change-Id: Ib380b464a24188dbbee37296ddda0f0bb5c44f5e
Reviewed-on: https://review.typo3.org/54631


Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarStephan Großberndt <stephan@grossberndt.de>
Reviewed-by: default avatarSusanne Moog <susanne.moog@typo3.org>
Tested-by: default avatarSusanne Moog <susanne.moog@typo3.org>
Reviewed-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 4f04f40f
Branches
Tags
No related merge requests found
...@@ -77,18 +77,16 @@ class LanguageCest ...@@ -77,18 +77,16 @@ class LanguageCest
*/ */
public function activateAndDeactivateALanguage(Admin $I) public function activateAndDeactivateALanguage(Admin $I)
{ {
$I->wantTo('Install a language'); $I->wantTo('Activate a language');
$I->seeElement('#language-pt_BR');
$I->seeElement('#language-pt_BR.disabled'); $I->seeElement('#language-pt_BR.disabled');
$I->click('#language-pt_BR td a.activateLanguageLink');
$I->seeElement('#language-pt_BR.enabled');
$I->click('#language-pt_BR td a.activateLanguageLink');
$this->seeAlert($I, 'Success', 'Language was successfully activated.'); $this->seeAlert($I, 'Success', 'Language was successfully activated.');
$I->click('#language-pt_BR td a.deactivateLanguageLink'); $I->wantTo('Deactivate a language');
$I->seeElement('#language-pt_BR.disabled'); $I->seeElement('#language-pt_BR.enabled');
$I->click('#language-pt_BR td a.deactivateLanguageLink');
$this->seeAlert($I, 'Success', 'Language was successfully deactivated.'); $this->seeAlert($I, 'Success', 'Language was successfully deactivated.');
} }
...@@ -98,6 +96,7 @@ class LanguageCest ...@@ -98,6 +96,7 @@ class LanguageCest
public function downloadALanguage(Admin $I) public function downloadALanguage(Admin $I)
{ {
$I->wantTo('Download a language with no selection and see error message'); $I->wantTo('Download a language with no selection and see error message');
$I->seeElement('#language-pt_BR.disabled');
$I->click('a[data-action="updateActiveLanguages"]'); $I->click('a[data-action="updateActiveLanguages"]');
$this->seeAlert($I, 'Error', 'No language activated. Please activate at least one language.'); $this->seeAlert($I, 'Error', 'No language activated. Please activate at least one language.');
...@@ -105,8 +104,6 @@ class LanguageCest ...@@ -105,8 +104,6 @@ class LanguageCest
// Download only a single translation for a specific extension for performance reasons // Download only a single translation for a specific extension for performance reasons
$I->wantTo('Download a single translation for a selected language'); $I->wantTo('Download a single translation for a selected language');
$I->seeElement('#language-pt_BR');
$I->seeElement('#language-pt_BR.disabled');
$I->click('#language-pt_BR td a.activateLanguageLink'); $I->click('#language-pt_BR td a.activateLanguageLink');
$I->selectOption('.t3-js-jumpMenuBox', 'Translation Overview'); $I->selectOption('.t3-js-jumpMenuBox', 'Translation Overview');
...@@ -157,7 +154,7 @@ class LanguageCest ...@@ -157,7 +154,7 @@ class LanguageCest
$I->switchToIFrame(); $I->switchToIFrame();
$I->wait(1); $I->wait(1);
$I->waitForElement('//div[contains(@role, "alert")]', 2); $I->waitForElement('//div[contains(@role, "alert")]', 10);
$I->see($alertTitle); $I->see($alertTitle);
$I->see($alertMessage); $I->see($alertMessage);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment