Issue #3281454 by _shY, pooja saraah, deviantintegral, quietone, alexpott, nod_: Update various module tests to not use Bartik and Seven
(cherry picked from commit cd700d8409
)
merge-requests/2357/merge
parent
4d6ae45b5b
commit
8c03eb7525
|
@ -204,7 +204,7 @@ class BlockContentTypeTest extends BlockContentTestBase {
|
|||
->getStorage('block_content');
|
||||
|
||||
// Install all themes.
|
||||
$themes = ['bartik', 'olivero', 'seven', 'stark'];
|
||||
$themes = ['olivero', 'stark', 'claro'];
|
||||
\Drupal::service('theme_installer')->install($themes);
|
||||
$theme_settings = $this->config('system.theme');
|
||||
foreach ($themes as $default_theme) {
|
||||
|
@ -220,15 +220,7 @@ class BlockContentTypeTest extends BlockContentTestBase {
|
|||
$this->drupalGet($path);
|
||||
$this->clickLink('Place block');
|
||||
$this->clickLink('Add custom block');
|
||||
// The seven theme has markup inside the link, we cannot use clickLink().
|
||||
if ($default_theme == 'seven') {
|
||||
$options = $theme != $default_theme ? ['query' => ['theme' => $theme]] : [];
|
||||
$this->assertSession()->linkByHrefExists(Url::fromRoute('block_content.add_form', ['block_content_type' => 'foo'], $options)->toString());
|
||||
$this->drupalGet('block/add/foo', $options);
|
||||
}
|
||||
else {
|
||||
$this->clickLink('foo');
|
||||
}
|
||||
// Create a new block.
|
||||
$edit = ['info[0][value]' => $this->randomMachineName(8)];
|
||||
$this->submitForm($edit, 'Save');
|
||||
|
|
|
@ -185,7 +185,7 @@ class BreakpointDiscoveryTest extends KernelTestBase {
|
|||
*/
|
||||
public function testBreakpointGroups() {
|
||||
$expected = [
|
||||
'bartik' => 'Bartik',
|
||||
'olivero' => 'Olivero',
|
||||
'breakpoint_module_test' => 'Breakpoint test module',
|
||||
'breakpoint_theme_test' => 'Breakpoint test theme',
|
||||
'breakpoint_theme_test.group2' => 'breakpoint_theme_test.group2',
|
||||
|
|
|
@ -2,4 +2,4 @@ name: 'Breakpoint test theme'
|
|||
type: theme
|
||||
description: 'Test theme for breakpoint.'
|
||||
version: VERSION
|
||||
base theme: bartik
|
||||
base theme: olivero
|
||||
|
|
|
@ -96,8 +96,8 @@ class AddedStylesheetsTest extends BrowserTestBase {
|
|||
|
||||
/** @var \Drupal\Core\Extension\ThemeInstallerInterface $theme_installer */
|
||||
$theme_installer = \Drupal::service('theme_installer');
|
||||
$theme_installer->install(['test_ckeditor_stylesheets_relative', 'seven']);
|
||||
$this->config('system.theme')->set('admin', 'seven')->save();
|
||||
$theme_installer->install(['test_ckeditor_stylesheets_relative', 'claro']);
|
||||
$this->config('system.theme')->set('admin', 'claro')->save();
|
||||
$this->config('node.settings')->set('use_admin_theme', TRUE)->save();
|
||||
|
||||
$this->drupalGet('node/add/article');
|
||||
|
|
|
@ -18,7 +18,7 @@ class CommentDisplayConfigurableTest extends CommentTestBase {
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected $defaultTheme = 'bartik';
|
||||
protected $defaultTheme = 'olivero';
|
||||
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
|
|
@ -102,7 +102,7 @@ class EditorImageDialogTest extends EntityKernelTestBase {
|
|||
],
|
||||
'_drupal_ajax' => '1',
|
||||
'ajax_page_state' => [
|
||||
'theme' => 'bartik',
|
||||
'theme' => 'olivero',
|
||||
'theme_token' => 'some-token',
|
||||
'libraries' => '',
|
||||
],
|
||||
|
|
|
@ -92,18 +92,18 @@ class MenuLinkContentTranslationUITest extends ContentTranslationUITestBase {
|
|||
$this->drupalLogin($this->administrator);
|
||||
$entityId = $this->createEntity([], 'en');
|
||||
|
||||
// Set up Seven as the admin theme to test.
|
||||
$this->container->get('theme_installer')->install(['seven']);
|
||||
// Set up the default admin theme to test.
|
||||
$this->container->get('theme_installer')->install(['claro']);
|
||||
$edit = [];
|
||||
$edit['admin_theme'] = 'seven';
|
||||
$edit['admin_theme'] = 'claro';
|
||||
$this->drupalGet('admin/appearance');
|
||||
$this->submitForm($edit, 'Save configuration');
|
||||
// Check that edit uses the admin theme.
|
||||
$this->drupalGet('admin/structure/menu/item/' . $entityId . '/edit');
|
||||
$this->assertSession()->responseContains('core/themes/seven/css/base/elements.css');
|
||||
$this->assertSession()->responseContains('core/themes/claro/css/base/elements.css');
|
||||
// Check that translation uses admin theme as well.
|
||||
$this->drupalGet('admin/structure/menu/item/' . $entityId . '/edit/translations');
|
||||
$this->assertSession()->responseContains('core/themes/seven/css/base/elements.css');
|
||||
$this->assertSession()->responseContains('core/themes/claro/css/base/elements.css');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -165,7 +165,6 @@ class NodeDisplayConfigurableTest extends NodeTestBase {
|
|||
*/
|
||||
public function provideThemes() {
|
||||
return [
|
||||
['bartik', 'header', TRUE],
|
||||
['claro', 'footer', TRUE],
|
||||
// @todo Remove Classy from data provider in
|
||||
// https://www.drupal.org/project/drupal/issues/3110137.
|
||||
|
@ -173,7 +172,6 @@ class NodeDisplayConfigurableTest extends NodeTestBase {
|
|||
// @todo Add coverage for olivero after fixing
|
||||
// https://www.drupal.org/project/drupal/issues/3215220.
|
||||
// ['olivero', 'footer', TRUE],
|
||||
['seven', 'footer', TRUE],
|
||||
['stable', 'footer', FALSE],
|
||||
['stable9', 'footer', FALSE],
|
||||
];
|
||||
|
|
|
@ -252,16 +252,16 @@ class NodeTranslationUITest extends ContentTranslationUITestBase {
|
|||
$this->drupalLogin($this->administrator);
|
||||
$article = $this->drupalCreateNode(['type' => 'article', 'langcode' => $this->langcodes[0]]);
|
||||
|
||||
// Set up Seven as the admin theme and use it for node editing.
|
||||
$this->container->get('theme_installer')->install(['seven']);
|
||||
// Set up the default admin theme and use it for node editing.
|
||||
$this->container->get('theme_installer')->install(['claro']);
|
||||
$edit = [];
|
||||
$edit['admin_theme'] = 'seven';
|
||||
$edit['admin_theme'] = 'claro';
|
||||
$edit['use_admin_theme'] = TRUE;
|
||||
$this->drupalGet('admin/appearance');
|
||||
$this->submitForm($edit, 'Save configuration');
|
||||
$this->drupalGet('node/' . $article->id() . '/translations');
|
||||
// Verify that translation uses the admin theme if edit is admin.
|
||||
$this->assertSession()->responseContains('core/themes/seven/css/base/elements.css');
|
||||
$this->assertSession()->responseContains('core/themes/claro/css/base/elements.css');
|
||||
|
||||
// Turn off admin theme for editing, assert inheritance to translations.
|
||||
$edit['use_admin_theme'] = FALSE;
|
||||
|
@ -269,7 +269,7 @@ class NodeTranslationUITest extends ContentTranslationUITestBase {
|
|||
$this->submitForm($edit, 'Save configuration');
|
||||
$this->drupalGet('node/' . $article->id() . '/translations');
|
||||
// Verify that translation uses the frontend theme if edit is frontend.
|
||||
$this->assertSession()->responseNotContains('core/themes/seven/css/base/elements.css');
|
||||
$this->assertSession()->responseNotContains('core/themes/claro/css/base/elements.css');
|
||||
|
||||
// Assert presence of translation page itself (vs. DisabledBundle below).
|
||||
$this->assertSession()->statusCodeEquals(200);
|
||||
|
|
|
@ -106,13 +106,13 @@ class ResponsiveImageStyleConfigEntityUnitTest extends UnitTestCase {
|
|||
$this->breakpointManager->expects($this->any())
|
||||
->method('getGroupProviders')
|
||||
->with('test_group')
|
||||
->willReturn(['bartik' => 'theme', 'toolbar' => 'module']);
|
||||
->willReturn(['olivero' => 'theme', 'toolbar' => 'module']);
|
||||
|
||||
\Drupal::getContainer()->set('entity_type.repository', $entity_type_repository);
|
||||
|
||||
$dependencies = $entity->calculateDependencies()->getDependencies();
|
||||
$this->assertEquals(['toolbar'], $dependencies['module']);
|
||||
$this->assertEquals(['bartik'], $dependencies['theme']);
|
||||
$this->assertEquals(['olivero'], $dependencies['theme']);
|
||||
$this->assertEquals(['image.style.fallback', 'image.style.large', 'image.style.medium', 'image.style.small'], $dependencies['config']);
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ class SearchAdminThemeTest extends BrowserTestBase {
|
|||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $adminTheme = 'seven';
|
||||
protected $adminTheme = 'claro';
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
|
|
|
@ -34,7 +34,7 @@ class UserBatchActionTest extends BrowserTestBase {
|
|||
* Tests user admin batch.
|
||||
*/
|
||||
public function testUserAction() {
|
||||
$themes = ['bartik', 'classy', 'olivero', 'seven', 'test_subseven'];
|
||||
$themes = ['classy', 'olivero', 'claro'];
|
||||
$this->container->get('theme_installer')->install($themes);
|
||||
|
||||
$this->drupalLogin($this->rootUser);
|
||||
|
|
|
@ -244,7 +244,7 @@ class DisplayPageTest extends ViewsKernelTestBase {
|
|||
'html_list' => '//div[@class="item-list"]//li',
|
||||
];
|
||||
|
||||
$themes = ['bartik', 'classy', 'olivero', 'seven', 'stable', 'stark'];
|
||||
$themes = ['classy', 'olivero', 'stable', 'stark', 'claro'];
|
||||
|
||||
foreach ($themes as $theme) {
|
||||
\Drupal::service('theme_installer')->install([$theme]);
|
||||
|
|
Loading…
Reference in New Issue