From d131489e3d3a798e61a62012f1dbb7714141f351 Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Thu, 13 Jul 2017 01:39:45 +0200 Subject: [PATCH] MDL-59437 behat: avoid using participants page for tag tests 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 | 15 +++++++++------ tag/tests/behat/flag_tags.feature | 13 ++++++++----- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/tag/tests/behat/edit_tag.feature b/tag/tests/behat/edit_tag.feature index 82d89d0ee35..e048f44c6e9 100644 --- a/tag/tests/behat/edit_tag.feature +++ b/tag/tests/behat/edit_tag.feature @@ -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" diff --git a/tag/tests/behat/flag_tags.feature b/tag/tests/behat/flag_tags.feature index 11758beffb4..7c384d2d706 100644 --- a/tag/tests/behat/flag_tags.feature +++ b/tag/tests/behat/flag_tags.feature @@ -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" -- 2.43.0