Skip to content

Commit

Permalink
MDL-59437 behat: avoid using participants page for tag tests
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
stronk7 authored and Damyon Wiese committed Jul 13, 2017
1 parent 28fcc33 commit d131489
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
15 changes: 9 additions & 6 deletions tag/tests/behat/edit_tag.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
13 changes: 8 additions & 5 deletions tag/tests/behat/flag_tags.feature
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,28 @@ 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"
And I should see "The person responsible will be notified"
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"
Expand Down

0 comments on commit d131489

Please sign in to comment.