Skip to content

Commit

Permalink
Add another expression to step that uses a default value for media wi…
Browse files Browse the repository at this point in the history
…dget
  • Loading branch information
rsanzante committed Sep 22, 2023
1 parent ba6bbb0 commit 504fefe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Behat/Context/MediaContext.php
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 504fefe

Please sign in to comment.