diff -u b/core/modules/system/tests/src/Functional/Ajax/FrameworkTest.php b/core/modules/system/tests/src/Functional/Ajax/FrameworkTest.php --- b/core/modules/system/tests/src/Functional/Ajax/FrameworkTest.php +++ b/core/modules/system/tests/src/Functional/Ajax/FrameworkTest.php @@ -3,7 +3,6 @@ namespace Drupal\Tests\system\Functional\Ajax; use Drupal\Component\Serialization\Json; -use Drupal\Core\Ajax\AddCssCommand; use Drupal\Core\Ajax\AlertCommand; use Drupal\Core\Ajax\AppendCommand; use Drupal\Core\Ajax\HtmlCommand; only in patch2: unchanged: --- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/CommandsTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/CommandsTest.php @@ -33,10 +33,6 @@ public function testAjaxCommands() { $this->drupalLogin($web_user); $this->drupalGet($form_path); - // Tests the 'add_css' command. - $page->pressButton("AJAX 'add_css' command"); - $this->assertWaitPageContains('my/file.css'); - // Tests the 'after' command. $page->pressButton("AJAX 'After': Click to put something after the div"); $this->assertWaitPageContains('
Something can be inserted after this
This will be placed after'); @@ -140,6 +136,19 @@ public function testAjaxCommands() { $this->assertWaitPageContains('
42
'); } + /** + * Tests the deprecated Ajax Commands. + * + * @group legacy + */ + public function testDeprecatedAjaxCommands() { + $page = $this->getSession()->getPage(); + + // Tests the 'add_css' command. + $page->pressButton("AJAX 'add_css' command"); + $this->assertWaitPageContains('my/file.css'); + } + /** * Asserts that page contains a text after waiting. *