From b60cb734b792eee3cd2c80010b37572151a7d116 Mon Sep 17 00:00:00 2001 From: Jun Pataleta Date: Wed, 18 Jan 2023 22:32:05 +0800 Subject: [PATCH] MDL-76942 course: Adjust activity chooser Behat tests * Try to use the button name instead of CSS selectors whenever possible. --- course/tests/behat/activity_chooser_plus.feature | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/course/tests/behat/activity_chooser_plus.feature b/course/tests/behat/activity_chooser_plus.feature index d62559ef219..0599b93e02f 100644 --- a/course/tests/behat/activity_chooser_plus.feature +++ b/course/tests/behat/activity_chooser_plus.feature @@ -25,12 +25,12 @@ Feature: Use the activity chooser to insert activities anywhere in a section Scenario: The activity chooser icon is hidden by default and be made visible on hover Given I hover ".navbar-brand" "css_element" And "[data-action='insert-before-Test Forum'] button" "css_element" should not be visible - When I hover "[data-action='insert-before-Test Forum']" "css_element" + When I hover "Insert an activity or resource before 'Test Forum'" "button" Then "[data-action='insert-before-Test Forum'] button" "css_element" should be visible Scenario: The activity chooser can be used to insert modules before existing modules - Given I hover "[data-action='insert-before-Test Forum']" "css_element" - And I click on "[data-action='insert-before-Test Forum'] button" "css_element" + Given I hover "Insert an activity or resource before 'Test Forum'" "button" + And I press "Insert an activity or resource before 'Test Forum'" And I should see "Add an activity or resource" in the ".modal-title" "css_element" When I click on "Add a new Assignment" "link" in the "Add an activity or resource" "dialogue" And I set the following fields to these values: