1 |
efrain |
1 |
@repository @repository_wikimedia @javascript
|
|
|
2 |
Feature: Wikimedia repository
|
|
|
3 |
In order to update my profile picture
|
|
|
4 |
As an admin
|
|
|
5 |
I need to choose a picture from Wikimedia
|
|
|
6 |
|
|
|
7 |
Scenario: Users can add profile picture using wikimedia
|
|
|
8 |
Given I log in as "admin"
|
|
|
9 |
And I open my profile in edit mode
|
|
|
10 |
And I click on "Add..." "button" in the "New picture" "form_row"
|
|
|
11 |
# Upload a new user picture using Wikimedia repository.
|
|
|
12 |
And I follow "Wikimedia"
|
|
|
13 |
And I set the field "Search for:" to "cat"
|
|
|
14 |
And I click on "Submit" "button"
|
|
|
15 |
# Click on the link of the first search result.
|
|
|
16 |
And I click on "a.fp-file" "css_element"
|
|
|
17 |
And I click on "Select this file" "button"
|
|
|
18 |
When I click on "Update profile" "button"
|
|
|
19 |
# New profile picture.
|
|
|
20 |
Then "//img[contains(@class, 'userpicture')]" "xpath_element" should exist
|
|
|
21 |
# Default profile picture should not exist any more.
|
|
|
22 |
And "//img[contains(@class, 'defaultuserpic')]" "xpath_element" should not exist
|