public function testOverriddenConfigurationRemoved() { $web_assert =
$this->
assertSession();
$page =
$this->
getSession()->
getPage();
$this->
grantPermissions(Role::
load(Role::AUTHENTICATED_ID
),
['administer site configuration', 'administer menu'
]);
// Confirm the branding block does include 'site_information' section when
// the site name is not overridden.
$branding_block =
$this->
placeBlock('system_branding_block'
);
$this->
drupalGet('user'
);
$this->
enableEditMode();
$this->
openBlockForm($this->
getBlockSelector($branding_block));
$web_assert->
fieldExists('settings[site_information][site_name]'
);
// Confirm the branding block does not include 'site_information' section
// when the site name is overridden.
$this->container->
get('state'
)->
set('settings_tray_override_test.site_name', TRUE
);
$this->
drupalGet('user'
);
$this->
openBlockForm($this->
getBlockSelector($branding_block));
$web_assert->
fieldNotExists('settings[site_information][site_name]'
);
$page->
pressButton('Save Site branding'
);
$this->
assertElementVisibleAfterWait('css', 'div:contains(The block configuration has been saved)'
);
$web_assert->
assertWaitOnAjaxRequest();
// Confirm we did not save changes to the configuration.