diff options
Diffstat (limited to 'core/tests/Drupal/FunctionalJavascriptTests')
49 files changed, 116 insertions, 110 deletions
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxCallbacksTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxCallbacksTest.php index d1c07c20124e..1211cfb351b7 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxCallbacksTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxCallbacksTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalJavascriptTests\Ajax; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests Ajax callbacks on FAPI elements. - * - * @group Ajax */ +#[Group('Ajax')] class AjaxCallbacksTest extends WebDriverTestBase { /** diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormCacheTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormCacheTest.php index b2ae9386bd0a..1eff2c19bbee 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormCacheTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormCacheTest.php @@ -6,12 +6,12 @@ namespace Drupal\FunctionalJavascriptTests\Ajax; use Drupal\Core\Url; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the usage of form caching for AJAX forms. - * - * @group Ajax */ +#[Group('Ajax')] class AjaxFormCacheTest extends WebDriverTestBase { /** diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormImageButtonTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormImageButtonTest.php index c9a4b3ef2722..347e8ac86f1a 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormImageButtonTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormImageButtonTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalJavascriptTests\Ajax; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the Ajax image buttons work with key press events. - * - * @group Ajax */ +#[Group('Ajax')] class AjaxFormImageButtonTest extends WebDriverTestBase { /** diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormPageCacheTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormPageCacheTest.php index a80a627a89cc..c11430fdebff 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormPageCacheTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormPageCacheTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalJavascriptTests\Ajax; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Performs tests on AJAX forms in cached pages. - * - * @group Ajax */ +#[Group('Ajax')] class AjaxFormPageCacheTest extends WebDriverTestBase { /** diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxInGroupTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxInGroupTest.php index a8282b2b6cfe..6618ec6acede 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxInGroupTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxInGroupTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalJavascriptTests\Ajax; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests that form elements in groups work correctly with AJAX. - * - * @group Ajax */ +#[Group('Ajax')] class AjaxInGroupTest extends WebDriverTestBase { /** diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxMaintenanceModeTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxMaintenanceModeTest.php index 180381e45c1b..3f4543996f1f 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxMaintenanceModeTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxMaintenanceModeTest.php @@ -8,12 +8,12 @@ use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\Tests\field_ui\Traits\FieldUiTestTrait; use Drupal\Tests\file\Functional\FileFieldCreationTrait; use Drupal\Tests\TestFileCreationTrait; +use PHPUnit\Framework\Attributes\Group; /** * Tests maintenance message during an AJAX call. - * - * @group Ajax */ +#[Group('Ajax')] class AjaxMaintenanceModeTest extends WebDriverTestBase { use FieldUiTestTrait; diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxTest.php index 03bd477123c1..284a3e35fa9b 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxTest.php @@ -6,12 +6,12 @@ namespace Drupal\FunctionalJavascriptTests\Ajax; use Drupal\Component\Utility\UrlHelper; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests AJAX responses. - * - * @group Ajax */ +#[Group('Ajax')] class AjaxTest extends WebDriverTestBase { /** diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/CommandsTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/CommandsTest.php index cc81d142d453..877f255a6591 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/CommandsTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/CommandsTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalJavascriptTests\Ajax; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Performs tests on AJAX framework commands. - * - * @group Ajax */ +#[Group('Ajax')] class CommandsTest extends WebDriverTestBase { /** diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/DialogTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/DialogTest.php index be434633e5ef..beab4c6a242c 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/DialogTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/DialogTest.php @@ -7,14 +7,13 @@ namespace Drupal\FunctionalJavascriptTests\Ajax; use Drupal\ajax_test\Controller\AjaxTestController; use Drupal\Core\Ajax\OpenModalDialogWithUrl; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; // cspell:ignore testdialog - /** * Performs tests on opening and manipulating dialogs via AJAX commands. - * - * @group Ajax */ +#[Group('Ajax')] class DialogTest extends WebDriverTestBase { /** diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/ElementValidationTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/ElementValidationTest.php index 60fd1f40b95f..5040430abae4 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/ElementValidationTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/ElementValidationTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalJavascriptTests\Ajax; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Various tests of AJAX behavior. - * - * @group Ajax */ +#[Group('Ajax')] class ElementValidationTest extends WebDriverTestBase { /** diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/FocusFirstCommandTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/FocusFirstCommandTest.php index 7a9b91c52b90..2a27a09a987a 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/FocusFirstCommandTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/FocusFirstCommandTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalJavascriptTests\Ajax; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests setting focus via AJAX command. - * - * @group Ajax */ +#[Group('Ajax')] class FocusFirstCommandTest extends WebDriverTestBase { /** * {@inheritdoc} diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/FormValuesTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/FormValuesTest.php index 2ee6b8ddb2ce..68a9683a4906 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/FormValuesTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/FormValuesTest.php @@ -5,12 +5,13 @@ declare(strict_types=1); namespace Drupal\FunctionalJavascriptTests\Ajax; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; /** * Tests that form values are properly delivered to AJAX callbacks. - * - * @group Ajax */ +#[Group('Ajax')] class FormValuesTest extends WebDriverTestBase { /** @@ -33,9 +34,8 @@ class FormValuesTest extends WebDriverTestBase { /** * Submits forms with select and checkbox elements via Ajax. - * - * @dataProvider formModeProvider */ + #[DataProvider('formModeProvider')] public function testSimpleAjaxFormValue($form_mode): void { $this->drupalGet('ajax_forms_test_get_form'); diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/MessageCommandTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/MessageCommandTest.php index 69b49916163e..f18bf953dd82 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/MessageCommandTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/MessageCommandTest.php @@ -5,13 +5,13 @@ declare(strict_types=1); namespace Drupal\FunctionalJavascriptTests\Ajax; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\ExpectationFailedException; /** * Tests adding messages via AJAX command. - * - * @group Ajax */ +#[Group('Ajax')] class MessageCommandTest extends WebDriverTestBase { /** diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/MultiFormTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/MultiFormTest.php index 6a0026976a90..40ed7ac76704 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/MultiFormTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/MultiFormTest.php @@ -8,12 +8,12 @@ use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\field\Entity\FieldConfig; use Drupal\field\Entity\FieldStorageConfig; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests AJAX-enabled forms when multiple instances of the form are on a page. - * - * @group Ajax */ +#[Group('Ajax')] class MultiFormTest extends WebDriverTestBase { /** diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/ThrobberTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/ThrobberTest.php index 6b2a17d4c6eb..92905a0c08ba 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/ThrobberTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/ThrobberTest.php @@ -6,12 +6,12 @@ namespace Drupal\FunctionalJavascriptTests\Ajax; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\hold_test\HoldTestHelper; +use PHPUnit\Framework\Attributes\Group; /** * Tests the throbber. - * - * @group Ajax */ +#[Group('Ajax')] class ThrobberTest extends WebDriverTestBase { /** diff --git a/core/tests/Drupal/FunctionalJavascriptTests/AjaxWaitTest.php b/core/tests/Drupal/FunctionalJavascriptTests/AjaxWaitTest.php index 0a61c5f03cbe..adade6bc4208 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/AjaxWaitTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/AjaxWaitTest.php @@ -4,12 +4,14 @@ declare(strict_types=1); namespace Drupal\FunctionalJavascriptTests; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\IgnoreDeprecations; + /** * Tests that unnecessary or untracked XHRs will cause a test failure. - * - * @group javascript - * @group legacy */ +#[Group('javascript')] +#[IgnoreDeprecations] class AjaxWaitTest extends WebDriverTestBase { /** diff --git a/core/tests/Drupal/FunctionalJavascriptTests/BrowserWithJavascriptTest.php b/core/tests/Drupal/FunctionalJavascriptTests/BrowserWithJavascriptTest.php index 2f11f7525eed..74c88ac48eed 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/BrowserWithJavascriptTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/BrowserWithJavascriptTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalJavascriptTests; use PHPUnit\Framework\AssertionFailedError; +use PHPUnit\Framework\Attributes\Group; /** * Tests if we can execute JavaScript in the browser. - * - * @group javascript */ +#[Group('javascript')] class BrowserWithJavascriptTest extends WebDriverTestBase { /** diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Components/ComponentRenderTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Components/ComponentRenderTest.php index 5b77de188aa2..95847a5d2290 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Components/ComponentRenderTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Components/ComponentRenderTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalJavascriptTests\Components; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the correct rendering of components. - * - * @group sdc */ +#[Group('sdc')] class ComponentRenderTest extends WebDriverTestBase { /** diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Core/CsrfTokenRaceTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Core/CsrfTokenRaceTest.php index f16b300441de..3684ec3c4976 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Core/CsrfTokenRaceTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Core/CsrfTokenRaceTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalJavascriptTests\Core; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Test race condition for CSRF tokens for simultaneous requests. - * - * @group Session */ +#[Group('Session')] class CsrfTokenRaceTest extends WebDriverTestBase { /** diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Core/Field/TimestampFormatterWithTimeDiffTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Core/Field/TimestampFormatterWithTimeDiffTest.php index 53b2c5dcb7a5..6e615f4b4f91 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Core/Field/TimestampFormatterWithTimeDiffTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Core/Field/TimestampFormatterWithTimeDiffTest.php @@ -10,12 +10,12 @@ use Drupal\entity_test\Entity\EntityTest; use Drupal\field\Entity\FieldConfig; use Drupal\field\Entity\FieldStorageConfig; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the 'timestamp' formatter when is used with time difference setting. - * - * @group Field */ +#[Group('Field')] class TimestampFormatterWithTimeDiffTest extends WebDriverTestBase { /** diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Core/Field/TimestampFormatterWithTimeDiffViewsTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Core/Field/TimestampFormatterWithTimeDiffViewsTest.php index 0b5176182390..f35b5c72171b 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Core/Field/TimestampFormatterWithTimeDiffViewsTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Core/Field/TimestampFormatterWithTimeDiffViewsTest.php @@ -7,12 +7,12 @@ namespace Drupal\FunctionalJavascriptTests\Core\Field; use Drupal\entity_test\Entity\EntityTest; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\views\Tests\ViewTestData; +use PHPUnit\Framework\Attributes\Group; /** * Tests the timestamp formatter used with time difference setting in views. - * - * @group Field */ +#[Group('Field')] class TimestampFormatterWithTimeDiffViewsTest extends WebDriverTestBase { /** diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Core/Form/FormGroupingElementsTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Core/Form/FormGroupingElementsTest.php index 7c8af15a2e31..f538690daf99 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Core/Form/FormGroupingElementsTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Core/Form/FormGroupingElementsTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalJavascriptTests\Core\Form; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests for form grouping elements. - * - * @group form */ +#[Group('form')] class FormGroupingElementsTest extends WebDriverTestBase { /** diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Core/Form/JavascriptStatesTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Core/Form/JavascriptStatesTest.php index 189af6e49e61..ac41f01653fe 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Core/Form/JavascriptStatesTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Core/Form/JavascriptStatesTest.php @@ -6,6 +6,7 @@ namespace Drupal\FunctionalJavascriptTests\Core\Form; use Drupal\filter\Entity\FilterFormat; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the state of elements based on another elements. @@ -14,9 +15,8 @@ use Drupal\FunctionalJavascriptTests\WebDriverTestBase; * module under 'system' (core/modules/system/tests/module/form_test). * * @see Drupal\form_test\Form\JavascriptStatesForm - * - * @group javascript */ +#[Group('javascript')] class JavascriptStatesTest extends WebDriverTestBase { /** diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Core/JsMessageTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Core/JsMessageTest.php index ce4cf583cd8c..4acec8e11102 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Core/JsMessageTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Core/JsMessageTest.php @@ -6,12 +6,12 @@ namespace Drupal\FunctionalJavascriptTests\Core; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\js_message_test\Controller\JSMessageTestController; +use PHPUnit\Framework\Attributes\Group; /** * Tests core/drupal.message library. - * - * @group Javascript */ +#[Group('Javascript')] class JsMessageTest extends WebDriverTestBase { /** diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Core/MachineNameTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Core/MachineNameTest.php index 31f044175860..b990be12549c 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Core/MachineNameTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Core/MachineNameTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalJavascriptTests\Core; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests for the machine name field. - * - * @group field */ +#[Group('field')] class MachineNameTest extends WebDriverTestBase { /** @@ -196,7 +196,7 @@ class MachineNameTest extends WebDriverTestBase { $assert->fieldExists('Name')->setValue('test 1'); $machine_name_value = $page->find('css', '#edit-name-machine-name-suffix .machine-name-value'); $this->assertNotEmpty($machine_name_value, 'Machine name field must be initialized'); - $this->assertJsCondition('jQuery("#edit-name-machine-name-suffix .machine-name-value").html() == "' . 'test_1' . '"'); + $this->assertJsCondition('jQuery("#edit-name-machine-name-suffix .machine-name-value").html() == "test_1"'); // Ensure that machine name generation still occurs after a non-HTML 5 // validation failure. diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Core/Session/SessionTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Core/Session/SessionTest.php index 8adf7a5685a5..94387c04633e 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Core/Session/SessionTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Core/Session/SessionTest.php @@ -6,12 +6,12 @@ namespace Drupal\FunctionalJavascriptTests\Core\Session; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\menu_link_content\Entity\MenuLinkContent; +use PHPUnit\Framework\Attributes\Group; /** * Tests that sessions don't expire. - * - * @group session */ +#[Group('session')] class SessionTest extends WebDriverTestBase { /** diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Dialog/DialogDeprecationsTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Dialog/DialogDeprecationsTest.php index abc6fd4c5ca4..2085b5518419 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Dialog/DialogDeprecationsTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Dialog/DialogDeprecationsTest.php @@ -5,13 +5,13 @@ declare(strict_types=1); namespace Drupal\FunctionalJavascriptTests\Dialog; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\Attributes\IgnoreDeprecations; /** * Tests jQuery events deprecations. - * - * @group dialog */ +#[Group('dialog')] class DialogDeprecationsTest extends WebDriverTestBase { /** diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Dialog/DialogPositionTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Dialog/DialogPositionTest.php index ed73ac1ff706..abda27ed3b70 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Dialog/DialogPositionTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Dialog/DialogPositionTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalJavascriptTests\Dialog; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the JavaScript functionality of the dialog position. - * - * @group dialog */ +#[Group('dialog')] class DialogPositionTest extends WebDriverTestBase { /** diff --git a/core/tests/Drupal/FunctionalJavascriptTests/EntityReference/EntityReferenceAutocompleteWidgetTest.php b/core/tests/Drupal/FunctionalJavascriptTests/EntityReference/EntityReferenceAutocompleteWidgetTest.php index 971af632a993..18fe44d8c4c3 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/EntityReference/EntityReferenceAutocompleteWidgetTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/EntityReference/EntityReferenceAutocompleteWidgetTest.php @@ -4,18 +4,18 @@ declare(strict_types=1); namespace Drupal\FunctionalJavascriptTests\EntityReference; -use Drupal\FunctionalJavascriptTests\WebDriverTestBase; -use Drupal\Tests\field\Traits\EntityReferenceFieldCreationTrait; use Drupal\Core\Entity\Entity\EntityFormDisplay; use Drupal\entity_test\Entity\EntityTest; +use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use Drupal\Tests\field\Traits\EntityReferenceFieldCreationTrait; use Drupal\Tests\node\Traits\ContentTypeCreationTrait; use Drupal\Tests\node\Traits\NodeCreationTrait; +use PHPUnit\Framework\Attributes\Group; /** * Tests the output of entity reference autocomplete widgets. - * - * @group entity_reference */ +#[Group('entity_reference')] class EntityReferenceAutocompleteWidgetTest extends WebDriverTestBase { use ContentTypeCreationTrait; diff --git a/core/tests/Drupal/FunctionalJavascriptTests/JavascriptDeprecationTest.php b/core/tests/Drupal/FunctionalJavascriptTests/JavascriptDeprecationTest.php index e45026d8960a..cb2fce7a36c1 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/JavascriptDeprecationTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/JavascriptDeprecationTest.php @@ -4,12 +4,14 @@ declare(strict_types=1); namespace Drupal\FunctionalJavascriptTests; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\IgnoreDeprecations; + /** * Tests Javascript deprecation notices. - * - * @group javascript - * @group legacy */ +#[Group('javascript')] +#[IgnoreDeprecations] class JavascriptDeprecationTest extends WebDriverTestBase { /** diff --git a/core/tests/Drupal/FunctionalJavascriptTests/JavascriptErrorsSuppressionTest.php b/core/tests/Drupal/FunctionalJavascriptTests/JavascriptErrorsSuppressionTest.php index a310d4c9e6e4..c67e27551c07 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/JavascriptErrorsSuppressionTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/JavascriptErrorsSuppressionTest.php @@ -4,11 +4,12 @@ declare(strict_types=1); namespace Drupal\FunctionalJavascriptTests; +use PHPUnit\Framework\Attributes\Group; + /** * Tests that Drupal.throwError can be suppressed to allow a test to pass. - * - * @group javascript */ +#[Group('javascript')] class JavascriptErrorsSuppressionTest extends WebDriverTestBase { /** diff --git a/core/tests/Drupal/FunctionalJavascriptTests/JavascriptErrorsTest.php b/core/tests/Drupal/FunctionalJavascriptTests/JavascriptErrorsTest.php index 3fb355523406..5f96e95dc2bb 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/JavascriptErrorsTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/JavascriptErrorsTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalJavascriptTests; use PHPUnit\Framework\AssertionFailedError; +use PHPUnit\Framework\Attributes\Group; /** * Tests that Drupal.throwError will cause a test failure. - * - * @group javascript */ +#[Group('javascript')] class JavascriptErrorsTest extends WebDriverTestBase { /** diff --git a/core/tests/Drupal/FunctionalJavascriptTests/JavascriptGetDrupalSettingsTest.php b/core/tests/Drupal/FunctionalJavascriptTests/JavascriptGetDrupalSettingsTest.php index 31ec8c91675b..8054a7395997 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/JavascriptGetDrupalSettingsTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/JavascriptGetDrupalSettingsTest.php @@ -4,11 +4,12 @@ declare(strict_types=1); namespace Drupal\FunctionalJavascriptTests; +use PHPUnit\Framework\Attributes\Group; + /** * Tests Drupal settings retrieval in WebDriverTestBase tests. - * - * @group javascript */ +#[Group('javascript')] class JavascriptGetDrupalSettingsTest extends WebDriverTestBase { /** diff --git a/core/tests/Drupal/FunctionalJavascriptTests/MachineName/MachineNameTransliterationTest.php b/core/tests/Drupal/FunctionalJavascriptTests/MachineName/MachineNameTransliterationTest.php index ad9ba4f89d8e..19cc4bf3a401 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/MachineName/MachineNameTransliterationTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/MachineName/MachineNameTransliterationTest.php @@ -5,15 +5,15 @@ declare(strict_types=1); namespace Drupal\FunctionalJavascriptTests\MachineName; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; - use Drupal\language\Entity\ConfigurableLanguage; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; /** * Tests the machine name transliteration functionality. - * - * @group javascript - * @group #slow */ +#[Group('javascript')] +#[Group('#slow')] class MachineNameTransliterationTest extends WebDriverTestBase { /** @@ -46,9 +46,8 @@ class MachineNameTransliterationTest extends WebDriverTestBase { /** * Test for machine name transliteration functionality. - * - * @dataProvider machineNameInputOutput */ + #[DataProvider('machineNameInputOutput')] public function testMachineNameTransliterations($langcode, $input, $output): void { $page = $this->getSession()->getPage(); if ($langcode !== 'en') { diff --git a/core/tests/Drupal/FunctionalJavascriptTests/PerformanceTestBase.php b/core/tests/Drupal/FunctionalJavascriptTests/PerformanceTestBase.php index d624e03c00d9..60f7b44fe0f4 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/PerformanceTestBase.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/PerformanceTestBase.php @@ -13,7 +13,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface; * * @ingroup testing */ -class PerformanceTestBase extends WebDriverTestBase { +abstract class PerformanceTestBase extends WebDriverTestBase { use PerformanceTestTrait; /** diff --git a/core/tests/Drupal/FunctionalJavascriptTests/TableDrag/TableDragTest.php b/core/tests/Drupal/FunctionalJavascriptTests/TableDrag/TableDragTest.php index a9350a1976e6..0a14594369b6 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/TableDrag/TableDragTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/TableDrag/TableDragTest.php @@ -7,12 +7,12 @@ namespace Drupal\FunctionalJavascriptTests\TableDrag; use Behat\Mink\Element\NodeElement; use Behat\Mink\Exception\ExpectationException; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests draggable table. - * - * @group javascript */ +#[Group('javascript')] class TableDragTest extends WebDriverTestBase { /** diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Tests/DrupalSelenium2DriverTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Tests/DrupalSelenium2DriverTest.php index 1ab9d65b3be7..e598f5cc04a4 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Tests/DrupalSelenium2DriverTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Tests/DrupalSelenium2DriverTest.php @@ -6,16 +6,18 @@ namespace Drupal\FunctionalJavascriptTests\Tests; use Behat\Mink\Driver\Selenium2Driver; use Drupal\entity_test\Entity\EntityTest; +use Drupal\FunctionalJavascriptTests\DrupalSelenium2Driver; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\Tests\file\Functional\FileFieldCreationTrait; use Drupal\Tests\TestFileCreationTrait; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Group; /** * Tests the DrupalSelenium2Driver methods. - * - * @coversDefaultClass \Drupal\FunctionalJavascriptTests\DrupalSelenium2Driver - * @group javascript */ +#[CoversClass(DrupalSelenium2Driver::class)] +#[Group('javascript')] class DrupalSelenium2DriverTest extends WebDriverTestBase { use TestFileCreationTrait; diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Tests/JSInteractionTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Tests/JSInteractionTest.php index 866f04e3a72a..a8018c7b013a 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Tests/JSInteractionTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Tests/JSInteractionTest.php @@ -5,13 +5,13 @@ declare(strict_types=1); namespace Drupal\FunctionalJavascriptTests\Tests; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; use WebDriver\Exception; /** * Tests fault tolerant interactions. - * - * @group javascript */ +#[Group('javascript')] class JSInteractionTest extends WebDriverTestBase { /** diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Tests/JSWebAssertTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Tests/JSWebAssertTest.php index f200ed28ac98..6388bd0844e1 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Tests/JSWebAssertTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Tests/JSWebAssertTest.php @@ -8,12 +8,12 @@ use Behat\Mink\Element\NodeElement; use Behat\Mink\Exception\ElementHtmlException; use Drupal\Component\Utility\Timer; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests for the JSWebAssert class. - * - * @group javascript */ +#[Group('javascript')] class JSWebAssertTest extends WebDriverTestBase { /** diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroBlockFilterTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroBlockFilterTest.php index dbc7874c735f..62ae39c4db49 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroBlockFilterTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroBlockFilterTest.php @@ -5,14 +5,14 @@ declare(strict_types=1); namespace Drupal\FunctionalJavascriptTests\Theme; use Drupal\Tests\block\FunctionalJavascript\BlockFilterTest; +use PHPUnit\Framework\Attributes\Group; /** * Runs BlockFilterTest in Claro. * - * @group block - * * @see \Drupal\Tests\block\FunctionalJavascript\BlockFilterTest. */ +#[Group('block')] class ClaroBlockFilterTest extends BlockFilterTest { /** diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroEntityDisplayTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroEntityDisplayTest.php index 85476468d815..c8e018ebfbe5 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroEntityDisplayTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroEntityDisplayTest.php @@ -6,14 +6,14 @@ namespace Drupal\FunctionalJavascriptTests\Theme; use Drupal\entity_test\EntityTestHelper; use Drupal\Tests\field_ui\FunctionalJavascript\EntityDisplayTest; +use PHPUnit\Framework\Attributes\Group; /** * Runs EntityDisplayTest in Claro. * - * @group claro - * * @see \Drupal\Tests\field_ui\FunctionalJavascript\EntityDisplayTest. */ +#[Group('claro')] class ClaroEntityDisplayTest extends EntityDisplayTest { /** diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroMenuUiJavascriptTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroMenuUiJavascriptTest.php index 32f6256396b3..930c7f963a7b 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroMenuUiJavascriptTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroMenuUiJavascriptTest.php @@ -5,14 +5,14 @@ declare(strict_types=1); namespace Drupal\FunctionalJavascriptTests\Theme; use Drupal\Tests\menu_ui\FunctionalJavascript\MenuUiJavascriptTest; +use PHPUnit\Framework\Attributes\Group; /** * Runs MenuUiJavascriptTest in Claro. * - * @group claro - * * @see \Drupal\Tests\menu_ui\FunctionalJavascript\MenuUiJavascriptTest; */ +#[Group('claro')] class ClaroMenuUiJavascriptTest extends MenuUiJavascriptTest { /** diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroModalDisplayTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroModalDisplayTest.php index c78ff99c80a3..7f110c1a4282 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroModalDisplayTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroModalDisplayTest.php @@ -9,12 +9,12 @@ use Drupal\field\Entity\FieldConfig; use Drupal\field\Entity\FieldStorageConfig; use Drupal\Tests\media_library\FunctionalJavascript\MediaLibraryTestBase; use Drupal\Tests\TestFileCreationTrait; +use PHPUnit\Framework\Attributes\Group; /** * Tests that buttons in modals are not in their button pane. - * - * @group claro */ +#[Group('claro')] class ClaroModalDisplayTest extends MediaLibraryTestBase { use TestFileCreationTrait; diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroPasswordConfirmWidgetTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroPasswordConfirmWidgetTest.php index af01db8d2a8f..c090f658dc56 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroPasswordConfirmWidgetTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroPasswordConfirmWidgetTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalJavascriptTests\Theme; use Drupal\Tests\user\FunctionalJavascript\PasswordConfirmWidgetTest; +use PHPUnit\Framework\Attributes\Group; /** * Tests the password confirm widget with Claro theme. - * - * @group claro */ +#[Group('claro')] class ClaroPasswordConfirmWidgetTest extends PasswordConfirmWidgetTest { /** diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroTableDragTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroTableDragTest.php index 9938ad22d095..7dda74a5348e 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroTableDragTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroTableDragTest.php @@ -5,14 +5,14 @@ declare(strict_types=1); namespace Drupal\FunctionalJavascriptTests\Theme; use Drupal\FunctionalJavascriptTests\TableDrag\TableDragTest; +use PHPUnit\Framework\Attributes\Group; /** * Tests draggable tables with Claro theme. * - * @group claro - * * @see \Drupal\FunctionalJavascriptTests\TableDrag\TableDragTest */ +#[Group('claro')] class ClaroTableDragTest extends TableDragTest { /** diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroViewsBulkOperationsTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroViewsBulkOperationsTest.php index e752b79a65af..3f6c21ad8755 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroViewsBulkOperationsTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroViewsBulkOperationsTest.php @@ -7,12 +7,12 @@ namespace Drupal\FunctionalJavascriptTests\Theme; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\Tests\node\Traits\ContentTypeCreationTrait; use Drupal\Tests\node\Traits\NodeCreationTrait; +use PHPUnit\Framework\Attributes\Group; /** * Tests Claro's Views Bulk Operations form. - * - * @group claro */ +#[Group('claro')] class ClaroViewsBulkOperationsTest extends WebDriverTestBase { use ContentTypeCreationTrait; use NodeCreationTrait; diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroViewsUiTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroViewsUiTest.php index 28b3c46a9996..67474ad08a60 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroViewsUiTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroViewsUiTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalJavascriptTests\Theme; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Runs tests on Views UI using Claro. - * - * @group claro */ +#[Group('claro')] class ClaroViewsUiTest extends WebDriverTestBase { /** diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Theme/OliveroAvoidStorageUsingTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Theme/OliveroAvoidStorageUsingTest.php index ee1261a354b0..24d3ca85af26 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Theme/OliveroAvoidStorageUsingTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Theme/OliveroAvoidStorageUsingTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalJavascriptTests\Theme; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests usage of localStorage. - * - * @group olivero */ +#[Group('olivero')] final class OliveroAvoidStorageUsingTest extends WebDriverTestBase { /** diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Theme/OliveroMessagesTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Theme/OliveroMessagesTest.php index 6b0472702c0c..74278efdf4bc 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Theme/OliveroMessagesTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Theme/OliveroMessagesTest.php @@ -6,14 +6,14 @@ namespace Drupal\FunctionalJavascriptTests\Theme; use Drupal\FunctionalJavascriptTests\Core\JsMessageTest; use Drupal\js_message_test\Controller\JSMessageTestController; +use PHPUnit\Framework\Attributes\Group; /** * Runs OliveroMessagesTest in Olivero. * - * @group olivero - * * @see \Drupal\FunctionalJavascriptTests\Core\JsMessageTest. */ +#[Group('olivero')] class OliveroMessagesTest extends JsMessageTest { /** |