diff --git a/core/modules/field/tests/src/Functional/Boolean/BooleanFieldTest.php b/core/modules/field/tests/src/Functional/Boolean/BooleanFieldTest.php index 136ce8b923e..5e7ba126efc 100644 --- a/core/modules/field/tests/src/Functional/Boolean/BooleanFieldTest.php +++ b/core/modules/field/tests/src/Functional/Boolean/BooleanFieldTest.php @@ -29,7 +29,7 @@ class BooleanFieldTest extends BrowserTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'stark'; /** * A field to use in this test class. @@ -122,7 +122,7 @@ class BooleanFieldTest extends BrowserTestBase { // Verify that boolean value is displayed. $entity = EntityTest::load($id); $this->drupalGet($entity->toUrl()); - $this->assertSession()->responseContains('
' . $on . '
'); + $this->assertSession()->pageTextContains($on); // Test with "On" label option. $display_repository->getFormDisplay('entity_test', 'entity_test') diff --git a/core/modules/field/tests/src/Kernel/DisplayApiTest.php b/core/modules/field/tests/src/Kernel/DisplayApiTest.php index b1fc135308e..a460678bb69 100644 --- a/core/modules/field/tests/src/Kernel/DisplayApiTest.php +++ b/core/modules/field/tests/src/Kernel/DisplayApiTest.php @@ -126,8 +126,8 @@ class DisplayApiTest extends FieldKernelTestBase { public function testFieldItemListView() { $items = $this->entity->get($this->fieldName); - \Drupal::service('theme_installer')->install(['classy']); - $this->config('system.theme')->set('default', 'classy')->save(); + \Drupal::service('theme_installer')->install(['stark']); + $this->config('system.theme')->set('default', 'stark')->save(); // No display settings: check that default display settings are used. $build = $items->view(); diff --git a/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceFormatterTest.php b/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceFormatterTest.php index 6c335a91762..c025b2caf89 100644 --- a/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceFormatterTest.php +++ b/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceFormatterTest.php @@ -64,9 +64,9 @@ class EntityReferenceFormatterTest extends EntityKernelTestBase { protected function setUp(): void { parent::setUp(); - // Use Classy theme for testing markup output. - \Drupal::service('theme_installer')->install(['classy']); - $this->config('system.theme')->set('default', 'classy')->save(); + // Use Stark theme for testing markup output. + \Drupal::service('theme_installer')->install(['stark']); + $this->config('system.theme')->set('default', 'stark')->save(); $this->installEntitySchema('entity_test'); // Grant the 'view test entity' permission. $this->installConfig(['user']); @@ -201,12 +201,12 @@ class EntityReferenceFormatterTest extends EntityKernelTestBase { // Test the first field item. $expected_rendered_name_field_1 = ' -
' . $this->referencedEntity->label() . '
+
' . $this->referencedEntity->label() . '
'; $expected_rendered_body_field_1 = ' -
-
Body
-

Hello, world!

+
+
Body
+

Hello, world!

'; $renderer->renderRoot($build[0]); @@ -217,12 +217,12 @@ class EntityReferenceFormatterTest extends EntityKernelTestBase { // Test the second field item. $expected_rendered_name_field_2 = ' -
' . $this->unsavedReferencedEntity->label() . '
+
' . $this->unsavedReferencedEntity->label() . '
'; $expected_rendered_body_field_2 = ' -
-
Body
-

Hello, unsaved world!

+
+
Body
+

Hello, unsaved world!

'; diff --git a/core/modules/field_ui/tests/src/FunctionalJavascript/EntityDisplayTest.php b/core/modules/field_ui/tests/src/FunctionalJavascript/EntityDisplayTest.php index 61c65769b84..16493a5336e 100644 --- a/core/modules/field_ui/tests/src/FunctionalJavascript/EntityDisplayTest.php +++ b/core/modules/field_ui/tests/src/FunctionalJavascript/EntityDisplayTest.php @@ -20,7 +20,7 @@ class EntityDisplayTest extends WebDriverTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'stark'; /** * {@inheritdoc} @@ -74,7 +74,7 @@ class EntityDisplayTest extends WebDriverTestBase { */ public function testEntityView() { $this->drupalGet('entity_test/1'); - $this->assertSession()->elementNotExists('css', '.field--name-field-test-text'); + $this->assertSession()->pageTextNotContains('The field test text value'); $this->drupalGet('entity_test/structure/entity_test/display'); $this->assertSession()->elementExists('css', '.region-content-message.region-empty'); @@ -91,7 +91,7 @@ class EntityDisplayTest extends WebDriverTestBase { $this->assertTrue($this->assertSession()->optionExists('fields[field_test_text][region]', 'content')->isSelected()); $this->drupalGet('entity_test/1'); - $this->assertSession()->elementExists('css', '.field--name-field-test-text'); + $this->assertSession()->pageTextContains('The field test text value'); } /**