Issue #3268443 by danflanagan8, ravi.shankar, dww, longwave: Configuration Manager (config) tests should not rely on Classy

merge-requests/2059/head
Lauri Eskola 2022-04-04 17:11:43 +03:00
parent fe3d2efd97
commit 58b15e1960
No known key found for this signature in database
GPG Key ID: 382FC0F5B0DF53F8
7 changed files with 15 additions and 16 deletions

View File

@ -2,7 +2,7 @@ name: 'Test theme for configuration clash detection'
type: theme type: theme
description: 'Test theme for configuration clash detection' description: 'Test theme for configuration clash detection'
version: VERSION version: VERSION
base theme: classy base theme: stark
regions: regions:
content: Content content: Content
left: Left left: Left

View File

@ -4,9 +4,9 @@ dependencies:
module: module:
- block_test - block_test
theme: theme:
- classy - stark
id: config_override_test id: config_override_test
theme: classy theme: stark
region: content region: content
weight: 0 weight: 0
plugin: test_cache plugin: test_cache

View File

@ -4,9 +4,9 @@ dependencies:
module: module:
- block_content - block_content
theme: theme:
- classy - stark
id: call_to_action id: call_to_action
theme: classy theme: stark
region: content region: content
weight: null weight: null
provider: null provider: null

View File

@ -25,7 +25,7 @@ class CacheabilityMetadataConfigOverrideIntegrationTest extends BrowserTestBase
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
protected $defaultTheme = 'classy'; protected $defaultTheme = 'stark';
/** /**
* {@inheritdoc} * {@inheritdoc}

View File

@ -26,7 +26,7 @@ class ConfigEntityListTest extends BrowserTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
protected $defaultTheme = 'classy'; protected $defaultTheme = 'stark';
/** /**
* {@inheritdoc} * {@inheritdoc}
@ -179,14 +179,14 @@ class ConfigEntityListTest extends BrowserTestBase {
$this->assertSession()->elementTextEquals('xpath', '//div[@class="layout-content"]//table/thead/tr/th[3]', 'Operations'); $this->assertSession()->elementTextEquals('xpath', '//div[@class="layout-content"]//table/thead/tr/th[3]', 'Operations');
// Check the number of table row cells. // Check the number of table row cells.
$this->assertSession()->elementsCount('xpath', '//div[@class="layout-content"]//table/tbody/tr[@class="odd"]/td', 3); $this->assertSession()->elementsCount('xpath', '//div[@class="layout-content"]//table/tbody/tr[1]/td', 3);
// Check the contents of each row cell. The first cell contains the label, // Check the contents of each row cell. The first cell contains the label,
// the second contains the machine name, and the third contains the // the second contains the machine name, and the third contains the
// operations list. // operations list.
$this->assertSession()->elementTextEquals('xpath', '//div[@class="layout-content"]//table/tbody/tr[@class="odd"]/td[1]', 'Default'); $this->assertSession()->elementTextEquals('xpath', '//div[@class="layout-content"]//table/tbody/tr[1]/td[1]', 'Default');
$this->assertSession()->elementTextEquals('xpath', '//div[@class="layout-content"]//table/tbody/tr[@class="odd"]/td[2]', 'dotted.default'); $this->assertSession()->elementTextEquals('xpath', '//div[@class="layout-content"]//table/tbody/tr[1]/td[2]', 'dotted.default');
$this->assertSession()->elementExists('xpath', '//div[@class="layout-content"]//table/tbody/tr[@class="odd"]/td[3]//ul'); $this->assertSession()->elementExists('xpath', '//div[@class="layout-content"]//table/tbody/tr[1]/td[3]//ul');
// Add a new entity using the operations link. // Add a new entity using the operations link.
$this->assertSession()->linkExists('Add test configuration'); $this->assertSession()->linkExists('Add test configuration');

View File

@ -68,12 +68,11 @@ class ConfigImportInstallProfileTest extends BrowserTestBase {
$core['module']['testing_config_import'] = 0; $core['module']['testing_config_import'] = 0;
unset($core['module']['syslog']); unset($core['module']['syslog']);
unset($core['theme']['stark']); unset($core['theme']['stark']);
$core['theme']['stable'] = 0; $core['theme']['test_theme_theme'] = 0;
$core['theme']['classy'] = 0;
$sync->write('core.extension', $core); $sync->write('core.extension', $core);
$sync->deleteAll('syslog.'); $sync->deleteAll('syslog.');
$theme = $sync->read('system.theme'); $theme = $sync->read('system.theme');
$theme['default'] = 'classy'; $theme['default'] = 'test_theme_theme';
$sync->write('system.theme', $theme); $sync->write('system.theme', $theme);
$this->drupalGet('admin/config/development/configuration'); $this->drupalGet('admin/config/development/configuration');
$this->submitForm([], 'Import all'); $this->submitForm([], 'Import all');
@ -81,7 +80,7 @@ class ConfigImportInstallProfileTest extends BrowserTestBase {
$this->rebuildContainer(); $this->rebuildContainer();
$this->assertFalse(\Drupal::moduleHandler()->moduleExists('syslog'), 'The syslog module has been uninstalled.'); $this->assertFalse(\Drupal::moduleHandler()->moduleExists('syslog'), 'The syslog module has been uninstalled.');
$this->assertFalse(\Drupal::service('theme_handler')->themeExists('stark'), 'The stark theme has been uninstalled.'); $this->assertFalse(\Drupal::service('theme_handler')->themeExists('stark'), 'The stark theme has been uninstalled.');
$this->assertTrue(\Drupal::service('theme_handler')->themeExists('classy'), 'The classy theme has been installed.'); $this->assertTrue(\Drupal::service('theme_handler')->themeExists('test_theme_theme'), 'The test_theme_theme theme has been installed.');
} }
} }

View File

@ -28,7 +28,7 @@ class ConfigImportUITest extends BrowserTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
protected $defaultTheme = 'classy'; protected $defaultTheme = 'stark';
/** /**
* A user with the 'synchronize configuration' permission. * A user with the 'synchronize configuration' permission.