diff --git a/typo3/sysext/backend/Resources/Public/JavaScript/Notification.js b/typo3/sysext/backend/Resources/Public/JavaScript/Notification.js index 4827e0da41ef2c71c25bc8f370a3c73718262370..23f765597e558f4f9e820901ac3f123d3a4a9ff8 100644 --- a/typo3/sysext/backend/Resources/Public/JavaScript/Notification.js +++ b/typo3/sysext/backend/Resources/Public/JavaScript/Notification.js @@ -41,7 +41,7 @@ define(['jquery', 'TYPO3/CMS/Backend/Severity'], function ($) { /** * The main Notification object * - * @type {{NOTICE: number, INFO: number, OK: number, WARNING: number, ERROR: number, messageContainer: null}} + * @type {{NOTICE: number, INFO: number, OK: number, WARNING: number, ERROR: number, messageContainer: null, duration: number}} * @exports TYPO3/CMS/Backend/Notification */ var Notification = { @@ -50,7 +50,8 @@ define(['jquery', 'TYPO3/CMS/Backend/Severity'], function ($) { OK: 0, WARNING: 1, ERROR: 2, - messageContainer: null + messageContainer: null, + duration: 5 }; /** @@ -158,7 +159,7 @@ define(['jquery', 'TYPO3/CMS/Backend/Severity'], function ($) { icon = 'info'; } - duration = (typeof duration === 'undefined') ? 5 : parseFloat(duration); + duration = (typeof duration === 'undefined') ? Notification.duration : parseFloat(duration); if (Notification.messageContainer === null) { Notification.messageContainer = $('<div id="alert-container"></div>').appendTo('body'); diff --git a/typo3/sysext/core/Tests/Acceptance/Backend/Language/LanguageCest.php b/typo3/sysext/core/Tests/Acceptance/Backend/Language/LanguageCest.php index 8f47e8a1056c72108caa240ce7b9952f64da1f44..7adf1e502b0e373be84f4b353d0fb37d7ae41ea7 100644 --- a/typo3/sysext/core/Tests/Acceptance/Backend/Language/LanguageCest.php +++ b/typo3/sysext/core/Tests/Acceptance/Backend/Language/LanguageCest.php @@ -36,6 +36,9 @@ class LanguageCest $I->see('Languages'); $I->click('Languages'); + // Increase duration for notification viewing, avoids vanish before the message is tested + $I->executeJS('TYPO3.Notification.duration = 100;'); + // switch to content iframe $I->switchToIFrame('list_frame'); } @@ -78,10 +81,8 @@ class LanguageCest */ public function activateAndDeactivateALanguage(Admin $I) { - //@todo: Fix this test - $this->skipUnstable(); - $I->wantTo('Install a language'); + $I->seeElement('#language-da'); $I->seeElement('#language-da.disabled'); $I->click('#language-da td a.activateLanguageLink'); @@ -101,9 +102,6 @@ class LanguageCest */ public function downloadALanguage(Admin $I) { - //@todo: Fix this test - $this->skipUnstable(); - $I->wantTo('Download a language with no selection and see error message'); $I->click('a[data-action="updateActiveLanguages"]'); @@ -172,12 +170,4 @@ class LanguageCest // switch to content iframe $I->switchToIFrame('list_frame'); } - - /** - * @throws \PHPUnit_Framework_SkippedTestError - */ - protected function skipUnstable() - { - throw new \PHPUnit_Framework_SkippedTestError('Test unstable, skipped for now.'); - } }