MDL-59437 behat: avoid using participants page for tag tests
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Wed, 12 Jul 2017 23:39:45 +0000 (01:39 +0200)
committerDamyon Wiese <damyon@moodle.com>
Thu, 13 Jul 2017 03:48:35 +0000 (11:48 +0800)
While participants page is being refactored, there are links (fullname)
going and changing, leading to inestability in tests that were using
those links.

When possible, provide an alternative, stable path, in this case, the
tags page itself can be used to jump to the user profile, keeping the
tag tests better isolated.

tag/tests/behat/edit_tag.feature
tag/tests/behat/flag_tags.feature

index 82d89d0..e048f44 100644 (file)
@@ -32,9 +32,10 @@ Feature: Users can edit tags to add description or rename
     And I log out
     When I log in as "editor1"
     And I press "Customise this page"
-    # TODO MDL-57120 site "Participants" link not accessible without navigation block.
+    # TODO MDL-57120 site "Tags" link not accessible without navigation block.
     And I add the "Navigation" block if not present
-    And I navigate to "Participants" node in "Site pages"
+    And I navigate to "Tags" node in "Site pages"
+    And I follow "Turtle"
     And I follow "User 1"
     And I follow "Cat"
     And I follow "Edit this tag"
@@ -56,9 +57,10 @@ Feature: Users can edit tags to add description or rename
   Scenario: Manager can change tag description, related tags and rename the tag from tag view page
     When I log in as "manager1"
     And I press "Customise this page"
-    # TODO MDL-57120 site "Participants" link not accessible without navigation block.
+    # TODO MDL-57120 site "Tags" link not accessible without navigation block.
     And I add the "Navigation" block if not present
-    And I navigate to "Participants" node in "Site pages"
+    And I navigate to "Tags" node in "Site pages"
+    And I follow "Turtle"
     And I follow "User 1"
     And I follow "Cat"
     And I follow "Edit this tag"
@@ -88,9 +90,10 @@ Feature: Users can edit tags to add description or rename
   Scenario: Renaming the tag from tag view page
     When I log in as "manager1"
     And I press "Customise this page"
-      # TODO MDL-57120 site "Participants" link not accessible without navigation block.
+      # TODO MDL-57120 site "Tags" link not accessible without navigation block.
     And I add the "Navigation" block if not present
-    And I navigate to "Participants" node in "Site pages"
+    And I navigate to "Tags" node in "Site pages"
+    And I follow "Turtle"
     And I follow "User 1"
     And I follow "Cat"
     And I follow "Edit this tag"
index 11758be..7c384d2 100644 (file)
@@ -25,15 +25,17 @@ Feature: Users can flag tags and manager can reset flags
     And I log out
     And I log in as "user2"
     And I press "Customise this page"
-    # TODO MDL-57120 site "Participants" link not accessible without navigation block.
+    # TODO MDL-57120 site "Tags" link not accessible without navigation block.
     And I add the "Navigation" block if not present
-    And I navigate to "Participants" node in "Site pages"
+    And I navigate to "Tags" node in "Site pages"
+    And I follow "Nicetag"
     And I follow "User 1"
     And I follow "Badtag"
     And I follow "Flag as inappropriate"
     And I should see "The person responsible will be notified"
     And I am on homepage
-    And I navigate to "Participants" node in "Site pages"
+    And I navigate to "Tags" node in "Site pages"
+    And I follow "Nicetag"
     And I follow "User 1"
     And I follow "Sweartag"
     And I follow "Flag as inappropriate"
@@ -41,9 +43,10 @@ Feature: Users can flag tags and manager can reset flags
     And I log out
     And I log in as "user3"
     And I press "Customise this page"
-    # TODO MDL-57120 site "Participants" link not accessible without navigation block.
+    # TODO MDL-57120 site "Tags" link not accessible without navigation block.
     And I add the "Navigation" block if not present
-    And I navigate to "Participants" node in "Site pages"
+    And I navigate to "Tags" node in "Site pages"
+    And I follow "Nicetag"
     And I follow "User 1"
     And I follow "Sweartag"
     And I follow "Flag as inappropriate"