Commit 2ba50bf7 authored by Niranjan Bandi's avatar Niranjan Bandi
Browse files

Bug 1713382: Improved add_tags.feature for checking the tags displayed.

Made changes according to the code review.

Change-Id: Ie3d169216b831450967fefbe2dc85289ee72355f
parent 36cc7a45
@javascript @core @core_content
Feature: Adding tags and Verifying them
In order to add a tag
As an admin I need to be able to go Content
So I can create a file and tag
In order to add a tag
As an userA I need to be able to go Content
So I can create a file and tag
Background:
Given the following "users" exist:
| username | password | email | firstname | lastname | institution | authname | role |
| userA | Kupuhipa1 | test01@example.com | Pete | Mc | mahara | internal | member |
Scenario: Adding tags to files (Bug 1426983)
# Log in as the admin user
Given I log in as "admin" with password "Kupuhipa1"
Scenario: Adding tags to files (Bug 1426983)
# Log in as the userA
Given I log in as "userA" with password "Kupuhipa1"
# Verifying log in was successful
And I should see "Admin User"
Then I should see "Pete Mc"
# Creating a folder with a tag
When I choose "Files" in "Content" from main menu
And I set the following fields to these values:
......@@ -20,7 +24,7 @@ Scenario: Adding tags to files (Bug 1426983)
And I press "Edit folder \"folder1\""
And I set the following fields to these values:
| Description | This is a subdirectory |
And I fill in select2 input "files_filebrowser_edit_tags" with "folder" and select "folder"
And I fill in select2 input "files_filebrowser_edit_tags" with "red" and select "red"
And I press "Save changes"
#Creating a Journal with tag
And I choose "Journals" in "Content" from main menu
......@@ -29,8 +33,7 @@ Scenario: Adding tags to files (Bug 1426983)
| Title * | Journal one |
| Entry | This is a test |
And I scroll to the base of id "editpost_tags_container"
And I fill in select2 input "editpost_tags" with "journal" and select "journal"
And I fill in select2 input "editpost_tags" with "test" and select "test"
And I fill in select2 input "editpost_tags" with "blue" and select "blue"
And I press "Save entry"
# Creating a Plan with a tag
And I choose "Plans" in "Content" from main menu
......@@ -39,8 +42,7 @@ Scenario: Adding tags to files (Bug 1426983)
| Title * | Plan 9 from outer space |
| Description | Woooo |
And I scroll to the base of id "addplan_tags_container"
And I fill in select2 input "addplan_tags" with "plan" and select "plan"
And I fill in select2 input "addplan_tags" with "test" and select "test"
And I fill in select2 input "addplan_tags" with "blue" and select "blue"
And I press "Save plan"
# Creating a Task with a tag
And I follow "New task"
......@@ -48,8 +50,7 @@ Scenario: Adding tags to files (Bug 1426983)
| Title * | Task one |
| Completion date * | 2020/12/31 |
And I scroll to the base of id "addtasks_tags_container"
And I fill in select2 input "addtasks_tags" with "task" and select "task"
And I fill in select2 input "addtasks_tags" with "test" and select "test"
And I fill in select2 input "addtasks_tags" with "blue" and select "blue"
And I press "Save task"
# Creating page 1 with a tag
And I choose "Portfolio" from main menu
......@@ -57,8 +58,7 @@ Scenario: Adding tags to files (Bug 1426983)
And I click on "Page" in the dialog
And I set the following fields to these values:
| Page title * | Test page 1 |
And I fill in select2 input "settings_tags" with "page" and select "page"
And I fill in select2 input "settings_tags" with "test" and select "test"
And I fill in select2 input "settings_tags" with "blue" and select "blue"
And I press "Save"
And I choose "Portfolio" from main menu
# Creating page 2 with a tag
......@@ -66,19 +66,27 @@ Scenario: Adding tags to files (Bug 1426983)
And I click on "Page" in the dialog
And I set the following fields to these values:
| Page title * | Testing page 2 |
And I fill in select2 input "settings_tags" with "page" and select "page"
And I fill in select2 input "settings_tags" with "test" and select "test"
And I fill in select2 input "settings_tags" with "orange" and select "orange"
And I press "Save"
# Creating a Note with a tag
And I expand "General" node
And I follow "Note" in the "div#general" "css_element"
And I press "Add"
And I fill in select2 input "instconf_tags" with "box" and select "box"
And I fill in select2 input "instconf_tags" with "test" and select "test"
And I fill in select2 input "instconf_tags" with "black" and select "black"
And I press "Save"
And I go to "/view/index.php"
Then I follow "Tags"
# Verifying tags are saved
And I should see "Note"
And I should see "Journal entry"
And I should see "Plan"
And I should see "blue"
And I should see "black"
And I should see "orange"
And I should see "red"
#Check the repeated tags
And I follow "blue"
And I should see "Journal one"
And I should see "woooo"
And I should see "task one"
#Check single tag
And I follow "orange"
And I should see "Testing page 2"
And I should not see "Note"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment