Issue #3439833 by pooja_sharma, smustgrave, vensires: Fix Content Translation...
Issue #3439833 by pooja_sharma, smustgrave, vensires: Fix Content Translation tests that rely on UID1's super user behavior
(cherry picked from commit 9e76aa57)
@@ -37,6 +30,11 @@ class ContentTranslationEnableTest extends BrowserTestBase {
* Tests that entity schemas are up-to-date after enabling translation.
*/
publicfunctiontestEnable():void{
$this->rootUser=$this->drupalCreateUser([
'administer modules',
'administer site configuration',
'administer content types',
]);
$this->drupalLogin($this->rootUser);
// Enable modules and make sure the related config entity type definitions
// are installed.
@@ -46,6 +44,7 @@ public function testEnable(): void {
];
$this->drupalGet('admin/modules');
$this->submitForm($edit,'Install');
$this->rebuildContainer();
// Status messages are shown.
$this->assertSession()->statusMessageContains('This site has only a single language enabled. Add at least one more language in order to translate content.','warning');
@@ -55,6 +54,10 @@ public function testEnable(): void {
$this->drupalGet('admin/reports/status');
$this->assertSession()->elementTextEquals('css',"details.system-status-report__entry summary:contains('Entity/field definitions') + div",'Up to date');