Commit 16914120 authored by Rebecca Blundell's avatar Rebecca Blundell

Bug 1677929: Behat test: Add test for displaying profile info

-Adds profile image
-Adds profile block to a page
-Selects profile information to display
-Confirms selected information is displayed
-include test for add/delete profile pic from edit_admin_profile
and delete that scenario

Change-Id: I5137befab88f1c2fca6bddbdfa54b5f45a592c44
parent 1da878f8
......@@ -75,23 +75,3 @@ Scenario: Editing admin profile page (Bug: 1426983)
# Verifying changes has been made navigating to dashboard page to checked
And I choose "Dashboard" from main menu
And I should see "Admin User"
Scenario: Editing admin profile picture (Bug: 1578000)
# Log in
Given I log in as "admin" with password "Kupuh1pa!"
# Add new profile picture
When I choose "Profile pictures" in "Content" from main menu
And I attach the file "Image2.png" to "Profile picture"
And I fill in the following:
| Image title | New avatar |
And I press "Upload"
Then I should see "Your profile picture has been uploaded to your 'images' folder."
# Update profile picture
And I select the radio "Set default for \"New avatar\""
And I press "Set default"
Then I should see "Default profile picture set successfully"
# Delete the new profile picture
And I fill in the following:
| Mark "New avatar" for deletion | 1 |
And I press "Delete"
Then I should see "Profile picture deleted"
@javascript @core
Feature: Profile block displays correctly; add/delete profile picture,
As a user
I want to add a profile block to my page
And ensure it displays my name, email and profile picture correctly
Additionally, this is a test for adding/deleting a profile picture
Background:
Given the following "users" exist:
| username | password | email | firstname | lastname | institution | authname | role |
| UserA | Kupuh1pa! | UserA@example.org | Angela | User | mahara | internal | member |
And the following "pages" exist:
| title | description| ownertype | ownername |
| Page UserA_01 | Page 01 | user | UserA |
Scenario: Profile block displays my information correctly (Bug 1677929)
Given I log in as "UserA" with password "Kupuh1pa!"
And I choose "Profile pictures" in "Content" from main menu
# Add profile image
And I attach the file "Image2.png" to "Profile picture"
And I set the field "Image title" to "Angela"
And I press "Upload"
And I select the radio "Set default for \"Angela\""
And I press "Set default"
Then I should see "Default profile picture set successfully"
# Add profile block to page
And I choose "Pages and collections" in "Portfolio" from main menu
And I follow "Page UserA_01"
And I follow "Edit"
And I expand "Personal info" node
And I follow "Profile information"
And I press "Add"
# Choose information to display
And I check "First name"
And I check "Last name"
And I set the field "Angela" to "1"
And I set the field "UserA@example.org" to "1"
And I press "Save"
# Confirm information displays on page
And I display the page
Then I should see "First name: Angela"
And I should see "Last name: User"
And I should see "Email address: UserA@example.org"
# This checks an image is displayed, not the specific image
And I should see images within the block "Profile information"
# Delete the profile picture
And I choose "Profile pictures" in "Content" from main menu
And I select the radio "Mark \"Angela\" for deletion"
And I press "Delete"
Then I should see "Profile picture deleted"
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