Commit 81889951 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review

Merge "Bug 1745890- Behat test for "User search" box"

parents 556af855 d1625f79
@javascript @core
Feature: Front page search box
In order to edit display name settings for search box
As an admin I need to go to Account settings
So I can hide the display name of the user
Background:
Given the following "users" exist:
| username | password | email | firstname | lastname | institution | authname | role |
| UserA | Kupuhipa1 | UserA@example.org | Angela | User | mahara | internal | member |
| UserB | Kupuhipa1 | UserB@example.org | Bob | User | mahara | internal | member |
Scenario: Verifying the "User search" box functionality
# Log in as a normal user
Given I log in as "UserA" with password "Kupuhipa1"
And I fill in "Bob" for "usf_query"
#click on the search icon
And I press "usf_submit"
#Verifying if UserA can see User B in the search results
And I should see "UserB"
#Change the display name of "UserA"
And I choose "Profile" in "Content" from main menu
And I follow "About me"
And I fill in the following:
| Display name | Alpha |
And I press "Save profile"
#Log out as UserA
And I log out
#Log in as UserB and verify the display names
Given I log in as "UserB" with password "Kupuhipa1"
And I fill in "Alpha" for "usf_query"
And I press "usf_submit"
And I should see "Angela"
#Log out as UserB
And I log out
#Log in as admin and change the display name settings
Then I log in as "admin" with password "Kupuhipa1"
And I choose "Site options" in "Configure site" from administration menu
And I expand all fieldsets
And I set the following fields to these values:
| Never display usernames | 1 |
And I press "Update site options"
#Log out as admin user
And I log out
#Verify if the never display username functionality works
Given I log in as "UserA" with password "Kupuhipa1"
And I fill in "UserB" for "usf_query"
And I press "usf_submit"
And I should see "No search results found"
......@@ -36,6 +36,7 @@ Scenario: Enable/disable external resources in mahara pages
And I press "Save"
# Add a "Text" block with an embedded external image
And I scroll to the top
And I follow "Text"
And I press "Add"
And I set the following fields to these values:
......
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