[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/tag/tests/behat/ -> collections.feature (source)

   1  @core @core_tag @javascript
   2  Feature: Managers can create and manage tag collections
   3    In order to use tags effectively
   4    As a manager
   5    I need to be able to manage tag collections
   6  
   7    Background:
   8      Given the following "users" exist:
   9        | username | firstname | lastname | email                |
  10        | manager1 | Manager   | 1        | manager1@example.com |
  11        | user1    | User      | 1        | user1@example.com    |
  12      And the following "system role assigns" exist:
  13        | user     | course               | role    |
  14        | manager1 | Acceptance test site | manager |
  15      And the following "tags" exist:
  16        | name | isstandard |
  17        | Tag0 | 1          |
  18        | Tag1 | 1          |
  19        | Tag2 | 1          |
  20        | Tag3 | 1          |
  21      And I log in as "manager1"
  22      And I navigate to "Manage tags" node in "Site administration > Appearance"
  23      And I follow "Add tag collection"
  24      And I set the following fields to these values:
  25        | Name | Hobbies |
  26      And I press "Create"
  27  
  28    Scenario: Adding tag collections
  29      When I follow "Hobbies"
  30      Then I should see "Nothing to display"
  31      And I log out
  32  
  33    Scenario: Editing tag collections
  34      When I click on "Edit tag collection name" "link" in the "//table[contains(@class,'tag-collections-table')]//tr[contains(.,'Hobbies')]" "xpath_element"
  35      And I set the field "New name for tag collection Hobbies" to "Newname"
  36      And I press key "13" in the field "New name for tag collection Hobbies"
  37      Then I should not see "Hobbies"
  38      And I should see "Newname"
  39      And I log out
  40  
  41    Scenario: Resorting tag collections
  42      When I follow "Add tag collection"
  43      And I set the following fields to these values:
  44        | Name | Blogging |
  45      And I press "Create"
  46      Then "Blogging" "link" should appear after "Hobbies" "link"
  47      And I click on "Move up" "link" in the "Blogging" "table_row"
  48      And "Blogging" "link" should appear before "Hobbies" "link"
  49      And I click on "Move down" "link" in the "Blogging" "table_row"
  50      And "Blogging" "link" should appear after "Hobbies" "link"
  51      And I log out
  52  
  53    Scenario: Deleting tag collections
  54      When I click on "Delete" "link" in the "Hobbies" "table_row"
  55      Then I should see "Are you sure you want to delete tag collection \"Hobbies\"?"
  56      And I press "Yes"
  57      And I should not see "Hobbies"
  58      And I log out
  59  
  60    Scenario: Assigning tag area to tag collection
  61      And I should see "User interests" in the "//table[contains(@class,'tag-collections-table')]//tr[contains(.,'Default collection')]" "xpath_element"
  62      And I should not see "User interests" in the "//table[contains(@class,'tag-collections-table')]//tr[contains(.,'Hobbies')]" "xpath_element"
  63      When I click on "Change tag collection" "link" in the "//table[contains(@class,'tag-areas-table')]//tr[contains(.,'User interests')]" "xpath_element"
  64      And I set the field "Change tag collection of area User interests" to "Hobbies"
  65      Then I should not see "User interests" in the "//table[contains(@class,'tag-collections-table')]//tr[contains(.,'Default collection')]" "xpath_element"
  66      And I should see "User interests" in the "//table[contains(@class,'tag-collections-table')]//tr[contains(.,'Hobbies')]" "xpath_element"
  67      And I should see "Hobbies" in the "//table[contains(@class,'tag-areas-table')]//tr[contains(.,'User interests')]" "xpath_element"
  68      And I log out
  69  
  70    Scenario: Disabling tag areas
  71      When I click on "Disable" "link" in the "//table[contains(@class,'tag-areas-table')]//tr[contains(.,'User interests')]" "xpath_element"
  72      And I should not see "User interests" in the "table.tag-collections-table" "css_element"
  73      And I click on "Enable" "link" in the "//table[contains(@class,'tag-areas-table')]//tr[contains(.,'User interests')]" "xpath_element"
  74      And I should see "User interests" in the "//table[contains(@class,'tag-collections-table')]//tr[contains(.,'Default collection')]" "xpath_element"
  75      And I log out
  76  
  77    Scenario: Deleting non-empty tag collections
  78      When I click on "Change tag collection" "link" in the "//table[contains(@class,'tag-areas-table')]//tr[contains(.,'User interests')]" "xpath_element"
  79      And I set the field "Change tag collection of area User interests" to "Hobbies"
  80      And I click on "Delete" "link" in the "Hobbies" "table_row"
  81      Then I should see "Are you sure you want to delete tag collection \"Hobbies\"?"
  82      And I press "Yes"
  83      And I should not see "Hobbies"
  84      And I should see "User interests" in the "//table[contains(@class,'tag-collections-table')]//tr[contains(.,'Default collection')]" "xpath_element"
  85      And I log out
  86  
  87    Scenario: Moving tags when changing tag collections
  88      And I follow "Preferences" in the user menu
  89      And I follow "Edit profile"
  90      And I expand all fieldsets
  91      And I set the field "List of interests" to "Swimming, Tag0, Tag3"
  92      And I press "Update profile"
  93      And I navigate to "Manage tags" node in "Site administration > Appearance"
  94      When I click on "Change tag collection" "link" in the "//table[contains(@class,'tag-areas-table')]//tr[contains(.,'User interests')]" "xpath_element"
  95      And I set the field "Change tag collection of area User interests" to "Hobbies"
  96      And I follow "Hobbies"
  97      Then I should see "Swimming"
  98      And I should see "Tag0"
  99      And I should see "Tag3"
 100      And I should not see "Tag1"
 101      And I should not see "Tag2"
 102      And I follow "Manage tags"
 103      And I follow "Default collection"
 104      # Tag "Swimming" was not standard and was moved completely.
 105      And I should not see "Swimming"
 106      # Standard tag was not removed.
 107      And I should see "Tag0"
 108      And I should see "Tag3"
 109      And I should see "Tag1"
 110      And I should see "Tag2"
 111      And I log out
 112  
 113    Scenario: Creating searchable and non-searchable tag collections
 114      And I follow "Add tag collection"
 115      And I set the following fields to these values:
 116        | Name | Hiddencoll |
 117        | Searchable | 0 |
 118      And I press "Create"
 119      And "Yes" "text" should not exist in the "//table[contains(@class,'tag-collections-table')]//tr[contains(.,'Hiddencoll')]" "xpath_element"
 120      And I navigate to "Tags" node in "Site pages"
 121      Then the "Select tag collection" select box should contain "Default collection"
 122      And the "Select tag collection" select box should contain "Hobbies"
 123      And the "Select tag collection" select box should not contain "Hiddencoll"
 124      And I navigate to "Manage tags" node in "Site administration > Appearance"
 125      And I click on "Change searchable" "link" in the "Hobbies" "table_row"
 126      And I navigate to "Tags" node in "Site pages"
 127      And "Select tag collection" "select" should not exist
 128      And I log out


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1