Skip to content
Snippets Groups Projects
Commit 0444b520 authored by catch's avatar catch
Browse files

Issue #3281434 by Vighneshh, Spokje, quietone, deviantintegral, nod_,...

Issue #3281434 by Vighneshh, Spokje, quietone, deviantintegral, nod_, guptahemant: Update System module tests to not use Bartik and Seven
parent 5c444d0c
No related branches found
No related tags found
38 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!54479.5.x SF update,!5014Issue #3071143: Table Render Array Example Is Incorrect,!4868Issue #1428520: Improve menu parent link selection,!4289Issue #1344552 by marcingy, Niklas Fiekas, Ravi.J, aleevas, Eduardo Morales...,!4114Issue #2707291: Disable body-level scrolling when a dialog is open as a modal,!4100Issue #3249600: Add support for PHP 8.1 Enums as allowed values for list_* data types,!3630Issue #2815301 by Chi, DanielVeza, kostyashupenko, smustgrave: Allow to create...,!3600Issue #3344629: Passing null to parameter #1 ($haystack) of type string is deprecated,!3291Issue #3336463: Rewrite rules for gzipped CSS and JavaScript aggregates never match,!3102Issue #3164428 by DonAtt, longwave, sahil.goyal, Anchal_gupta, alexpott: Use...,!2853#3274419 Makes BaseFieldOverride inherit the internal property from the base field.,!2661Issue #3295972 by Munavijayalakshmi, nitin_lama, arunkumark, cilefen,...,!2378Issue #2875033: Optimize joins and table selection in SQL entity query implementation,!2334Issue #3228209: Add hasRole() method to AccountInterface,!2074Issue #2707689: NodeForm::actions() checks for delete access on new entities,!2062Issue #3246454: Add weekly granularity to views date sort,!1591Issue #3199697: Add JSON:API Translation experimental module,!1484Exposed filters get values from URL when Ajax is on,!1255Issue #3238922: Refactor (if feasible) uses of the jQuery serialize function to use vanillaJS,!1254Issue #3238915: Refactor (if feasible) uses of the jQuery ready function to use VanillaJS,!1162Issue #3100350: Unable to save '/' root path alias,!1105Issue #3025039: New non translatable field on translatable content throws error,!1073issue #3191727: Focus states on mobile second level navigation items fixed,!10223132456: Fix issue where views instances are emptied before an ajax request is complete,!957Added throwing of InvalidPluginDefinitionException from getDefinition().,!925Issue #2339235: Remove taxonomy hard dependency on node module,!877Issue #2708101: Default value for link text is not saved,!873Issue #2875228: Site install not using batch API service,!872Draft: Issue #3221319: Race condition when creating menu links and editing content deletes menu links,!844Resolve #3036010 "Updaters",!712Issue #2909128: Autocomplete intermittent on Chrome Android,!617Issue #3043725: Provide a Entity Handler for user cancelation,!579Issue #2230909: Simple decimals fail to pass validation,!560Move callback classRemove outside of the loop,!555Issue #3202493,!485Sets the autocomplete attribute for username/password input field on login form.,!30Issue #3182188: Updates composer usage to point at ./vendor/bin/composer
Showing
with 2115 additions and 2269 deletions
......@@ -156,10 +156,10 @@ protected function assertOffCanvasBlockFormIsValid() {
* {@inheritdoc}
*/
protected function getTestThemes() {
// Remove 'seven' theme. Settings Tray "Edit Mode" will not work with
// 'seven' because it removes all contextual links.
// Remove 'claro' theme. Settings Tray "Edit Mode" will not work with this
// theme because it removes all contextual links.
return array_filter(parent::getTestThemes(), function ($theme) {
return $theme !== 'seven';
return ($theme !== 'claro');
});
}
......
......@@ -18,7 +18,7 @@ class ImageLazyLoadController extends ControllerBase {
public function renderImage() {
$images['with-dimensions'] = [
'#theme' => 'image',
'#uri' => '/core/themes/bartik/logo.svg',
'#uri' => '/core/themes/olivero/logo.svg',
'#alt' => 'Image lazy load testing image',
'#prefix' => '<div id="with-dimensions">',
'#suffix' => '</div>',
......@@ -28,7 +28,7 @@ public function renderImage() {
$images['without-dimensions'] = [
'#theme' => 'image',
'#uri' => '/core/themes/bartik/logo.svg',
'#uri' => '/core/themes/olivero/logo.svg',
'#alt' => 'Image lazy load testing image without dimensions',
'#prefix' => '<div id="without-dimensions">',
'#suffix' => '</div>',
......@@ -36,7 +36,7 @@ public function renderImage() {
$images['override-loading-attribute'] = [
'#theme' => 'image',
'#uri' => '/core/themes/bartik/logo.svg',
'#uri' => '/core/themes/olivero/logo.svg',
'#alt' => 'Image lazy load test loading attribute can be overridden',
'#prefix' => '<div id="override-loading-attribute">',
'#suffix' => '</div>',
......
......@@ -286,11 +286,11 @@ public function testThemeSettingsRenderCacheClear() {
* Tests the administration theme functionality.
*/
public function testAdministrationTheme() {
$this->container->get('theme_installer')->install(['seven']);
$this->container->get('theme_installer')->install(['claro']);
// Install an administration theme and show it on the node admin pages.
$edit = [
'admin_theme' => 'seven',
'admin_theme' => 'claro',
'use_admin_theme' => TRUE,
];
$this->drupalGet('admin/appearance');
......@@ -307,7 +307,7 @@ public function testAdministrationTheme() {
// Check that the administration theme is used on an administration page.
$this->drupalGet('admin/config');
$this->assertSession()->responseContains('core/themes/seven');
$this->assertSession()->responseContains('core/themes/claro');
// Check that the site default theme used on node page.
$this->drupalGet('node/' . $this->node->id());
......@@ -315,11 +315,11 @@ public function testAdministrationTheme() {
// Check that the administration theme is used on the add content page.
$this->drupalGet('node/add');
$this->assertSession()->responseContains('core/themes/seven');
$this->assertSession()->responseContains('core/themes/claro');
// Check that the administration theme is used on the edit content page.
$this->drupalGet('node/' . $this->node->id() . '/edit');
$this->assertSession()->responseContains('core/themes/seven');
$this->assertSession()->responseContains('core/themes/claro');
// Disable the admin theme on the node admin pages.
$edit = [
......@@ -334,7 +334,7 @@ public function testAdministrationTheme() {
// Check that the administration theme is used on an administration page.
$this->drupalGet('admin/config');
$this->assertSession()->responseContains('core/themes/seven');
$this->assertSession()->responseContains('core/themes/claro');
// Ensure that the admin theme is also visible on the 403 page.
$normal_user = $this->drupalCreateUser(['view the administration theme']);
......@@ -342,7 +342,7 @@ public function testAdministrationTheme() {
// Check that the administration theme is used on an administration page.
$this->drupalGet('admin/config');
$this->assertSession()->statusCodeEquals(403);
$this->assertSession()->responseContains('core/themes/seven');
$this->assertSession()->responseContains('core/themes/claro');
$this->drupalLogin($this->adminUser);
// Check that the site default theme used on the add content page.
......@@ -421,25 +421,24 @@ public function testInvalidTheme() {
* Tests uninstalling of themes works.
*/
public function testUninstallingThemes() {
// Install Olivero and set it as the default theme.
// Install olivero.
\Drupal::service('theme_installer')->install(['olivero']);
// Set up seven as the admin theme.
\Drupal::service('theme_installer')->install(['seven']);
// Set up claro as the admin theme.
\Drupal::service('theme_installer')->install(['claro']);
$edit = [
'admin_theme' => 'seven',
'admin_theme' => 'claro',
'use_admin_theme' => TRUE,
];
$this->drupalGet('admin/appearance');
$this->submitForm($edit, 'Save configuration');
$this->drupalGet('admin/appearance');
$this->clickLink('Set as default');
// Check that seven cannot be uninstalled as it is the admin theme.
$this->assertSession()->responseNotContains('Uninstall Seven theme');
// Set olivero as the default theme.
$this->cssSelect('a[title="Set Olivero as default theme"]')[0]->click();
// Check that claro cannot be uninstalled as it is the admin theme.
$this->assertSession()->responseNotContains('Uninstall claro theme');
// Check that olivero cannot be uninstalled as it is the default theme.
$this->assertSession()->responseNotContains('Uninstall Olivero theme');
// Check that the classy theme cannot be uninstalled as it is a base theme
// of seven and olivero.
// of claro and olivero.
$this->assertSession()->responseNotContains('Uninstall Classy theme');
// Install Stark and set it as the default theme.
......@@ -452,8 +451,8 @@ public function testUninstallingThemes() {
$this->drupalGet('admin/appearance');
$this->submitForm($edit, 'Save configuration');
// Check that seven can be uninstalled now.
$this->assertSession()->responseContains('Uninstall Seven theme');
// Check that claro can be uninstalled now.
$this->assertSession()->responseContains('Uninstall claro theme');
// Check that the classy theme still cannot be uninstalled as it is a
// base theme of olivero.
$this->assertSession()->responseNotContains('Uninstall Classy theme');
......@@ -468,12 +467,11 @@ public function testUninstallingThemes() {
// base themes have been.
$this->assertSession()->responseNotContains('Uninstall Classy theme');
// Uninstall each of the three themes starting with Olivero.
$this->clickLink('Uninstall');
// Uninstall each of the two themes starting with Olivero.
$this->cssSelect('a[title="Uninstall Olivero theme"]')[0]->click();
$this->assertSession()->responseContains('The <em class="placeholder">Olivero</em> theme has been uninstalled');
// Seven is the second in the list.
$this->clickLink('Uninstall');
$this->assertSession()->responseContains('The <em class="placeholder">Seven</em> theme has been uninstalled');
$this->cssSelect('a[title="Uninstall Claro theme"]')[0]->click();
$this->assertSession()->responseContains('The <em class="placeholder">Claro</em> theme has been uninstalled');
// Check that the classy theme still can't be uninstalled as it is hidden.
$this->assertSession()->responseNotContains('Uninstall Classy theme');
......
......@@ -46,11 +46,11 @@ public function testThemeToken() {
$settings = $this->getDrupalSettings();
$this->assertNull($settings['ajaxPageState']['theme_token']);
// Install 'seven' and configure it as administrative theme.
$this->container->get('theme_installer')->install(['seven']);
$this->config('system.theme')->set('admin', 'seven')->save();
// Install 'claro' and configure it as administrative theme.
$this->container->get('theme_installer')->install(['claro']);
$this->config('system.theme')->set('admin', 'claro')->save();
// Revisit the page. This time the page is displayed using the 'seven' theme
// Revisit the page. This time the page is displayed using the 'claro' theme
// and that is different from the default theme ('classy').
$this->drupalGet('admin/structure/block');
$settings = $this->getDrupalSettings();
......
......@@ -46,7 +46,7 @@ public function testUpdate() {
'checksum' => 0,
];
$insert->fields($fields);
$fields['cid'] = 'element_info_build:seven';
$fields['cid'] = 'element_info_build:claro';
$fields['tags'] = 'element_info_build';
$insert->values(array_values($fields));
$fields['cid'] = 'element_info_build:stark';
......@@ -56,7 +56,7 @@ public function testUpdate() {
$this->runUpdates();
// Caches should have been cleared at this point.
$count = (int) $connection->select('cache_discovery')
->condition('cid', ['element_info', 'element_info_build:seven', 'element_info_build:stark'], 'IN')
->condition('cid', ['element_info', 'element_info_build:claro', 'element_info_build:stark'], 'IN')
->countQuery()
->execute()
->fetchField();
......
......@@ -84,9 +84,6 @@ public function testUpdatedSite() {
}
}
// Make sure the translated slogan appears.
$this->assertSession()->pageTextContains('drupal Spanish');
// Make sure the custom block appears.
$this->drupalGet('<front>');
// Block title.
......@@ -404,8 +401,8 @@ public function testUpdatedSite() {
// Make sure our themes are still enabled.
$expected_enabled_themes = [
'bartik',
'seven',
'olivero',
'claro',
'stark',
];
foreach ($expected_enabled_themes as $theme) {
......
......@@ -110,7 +110,7 @@ protected function getOffCanvasDialog() {
* Theme names to test.
*/
protected function getTestThemes() {
return ['bartik', 'classy', 'olivero', 'seven', 'stable', 'stark'];
return ['claro', 'classy', 'olivero', 'stable', 'stark'];
}
/**
......
......@@ -46,7 +46,7 @@ public function providerSource() {
$tests[0]['source_data']['variable'] = [
[
'name' => 'theme_bartik_settings',
'name' => 'theme_olivero_settings',
'value' => serialize($value),
],
];
......@@ -54,7 +54,7 @@ public function providerSource() {
// The expected results are nearly identical to the source data.
$tests[0]['expected_data'] = [
[
'name' => 'theme_bartik_settings',
'name' => 'theme_olivero_settings',
'value' => $value,
],
];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment