From 0fddc49d99671786e1a9ce326542e7c816714327 Mon Sep 17 00:00:00 2001 From: Killesreiter Volker Date: Tue, 3 Sep 2024 10:37:34 +0200 Subject: [PATCH] Remove submitMediaLibrary() helper --- .../src/FunctionalJavascript/MediaGalleryModifyTest.php | 3 ++- .../ThunderMediaLibraryTestTrait.php | 9 --------- tests/src/FunctionalJavascript/ThunderMediaTestTrait.php | 3 ++- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/tests/src/FunctionalJavascript/MediaGalleryModifyTest.php b/tests/src/FunctionalJavascript/MediaGalleryModifyTest.php index 6f791df5c..57ef9dc2c 100644 --- a/tests/src/FunctionalJavascript/MediaGalleryModifyTest.php +++ b/tests/src/FunctionalJavascript/MediaGalleryModifyTest.php @@ -152,7 +152,8 @@ public function testAddRemove(): void { $media = $this->getMediaByName('reference.jpg'); $this->toggleMedia([$media->id()]); - $this->submitMediaLibrary(); + $this->clickCssSelector('.media-library-widget-modal .form-actions button.button--primary'); + $this->assertWaitOnAjaxRequest(); $this->clickSave(); diff --git a/tests/src/FunctionalJavascript/ThunderMediaLibraryTestTrait.php b/tests/src/FunctionalJavascript/ThunderMediaLibraryTestTrait.php index 424dc8461..a8a0c7b2d 100644 --- a/tests/src/FunctionalJavascript/ThunderMediaLibraryTestTrait.php +++ b/tests/src/FunctionalJavascript/ThunderMediaLibraryTestTrait.php @@ -22,15 +22,6 @@ public function openMediaLibrary(string $fieldName): void { $this->clickCssSelector($button_selector); } - /** - * Submit changes in media library modal. - */ - public function submitMediaLibrary(): void { - $this->clickCssSelector('.media-library-widget-modal .form-actions button'); - - $this->assertWaitOnAjaxRequest(); - } - /** * Upload file inside media library. * diff --git a/tests/src/FunctionalJavascript/ThunderMediaTestTrait.php b/tests/src/FunctionalJavascript/ThunderMediaTestTrait.php index f5398eda1..56b2c7b79 100644 --- a/tests/src/FunctionalJavascript/ThunderMediaTestTrait.php +++ b/tests/src/FunctionalJavascript/ThunderMediaTestTrait.php @@ -25,7 +25,8 @@ public function selectMedia(string $fieldName, array $medias): void { $this->toggleMedia($medias); - $this->submitMediaLibrary(); + $this->clickCssSelector('.media-library-widget-modal .form-actions button.button--primary'); + $this->assertWaitOnAjaxRequest(); } /**