From 504fefe27d48e8c1a4d5ec99e5a0205a7340f93d Mon Sep 17 00:00:00 2001 From: Ricardo Sanz Date: Fri, 22 Sep 2023 10:00:58 +0200 Subject: [PATCH] Add another expression to step that uses a default value for media widget --- src/Behat/Context/MediaContext.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) mode change 100755 => 100644 src/Behat/Context/MediaContext.php diff --git a/src/Behat/Context/MediaContext.php b/src/Behat/Context/MediaContext.php old mode 100755 new mode 100644 index 1617a95..bf3b41f --- a/src/Behat/Context/MediaContext.php +++ b/src/Behat/Context/MediaContext.php @@ -72,8 +72,9 @@ public function iSelectMedia($widget, $xpath) { * Upload a media to media field. * * @Then I upload media with name :media_title to :field field using :widget widget + * @Then I assign the media with name :media_title to :field field */ - public function iUploadMediaWithNameToField($media_title, $field, $widget) { + public function iUploadMediaWithNameToField($media_title, $field, $widget = 'media_library') { if ($widget == 'media_library') { $this->uiContext->iClickOnTheElementWithXpath("//input[contains(@id, 'edit-" . $field . "-open-button')]"); $this->waitingContext->iWaitForAjaxToFinish(30);