Issue Bug Closed

#82972Failing acceptance tests activateAndDeactivateALanguage and downloadALanguage

Stephan Großberndt 11/10/17, 22:25 updated 10/02/18, 10:54

Description

On some runs the acceptance tests activateAndDeactivateALanguage and downloadALanguage fail.

There is no obvious reason for the first failing test activateAndDeactivateALanguage.

The recorder result screenshots in

https://bamboo.typo3.com/artifact/CORE-GTC/ACMYPHP707102/build-16253/Test-Report/typo3temp/var/tests/AcceptanceReports/record_5a05f04d265cd_LanguageCest__Install_a_language/index.html

as well as the HTML source

https://bamboo.typo3.com/artifact/CORE-GTC/ACMYPHP707102/build-16253/Test-Report/typo3temp/var/tests/AcceptanceReports/TYPO3.CMS.Core.Tests.Acceptance.Backend.Language.LanguageCest.activateAndDeactivateALanguage.fail.html

do contain #language-pt_BR.enabled which is the line where the LanguageCest fails:

        $I->seeElement('#language-pt_BR');
        $I->seeElement('#language-pt_BR.disabled');
        $I->click('#language-pt_BR td a.activateLanguageLink');
        $I->seeElement('#language-pt_BR.enabled');

Enabling a language takes 250ms on a server of ours – maybe the first call in a fresh instance is slower (sometimes?) due to missing caches? Still this does not explain why the screenshot and the HTML contain the correct element but WebDriver fails to find it.

The second failing test downloadALanguage fails because of the first one – they use the same session – activateAndDeactivateALanguage does not deactive the language due to its failure.

downloadALanguage assumes there is currently no selected language in order to test the according error message before downloading anything.
As there is an activated language due to the failing activateAndDeactivateALanguage test that click already leads to the download of the language and the wanted error alert is not shown.

The dependency between the tests should probably be removed.

https://bamboo.typo3.com/artifact/CORE-GTC/ACMYPHP707102/build-16253/Test-Report/typo3temp/var/tests/AcceptanceReports/reports.html

Reviews 2