-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2806 from owncloud/userProfile
Acceptance test to view user profile
- Loading branch information
Showing
6 changed files
with
91 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
tests/acceptance/features/webUIAccount/userProfile.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Feature: view profile | ||
As a user | ||
I want to be able to view and browse to my profile | ||
So that I can manage my account | ||
|
||
Background: | ||
Given user "user1" has been created with default attributes | ||
|
||
Scenario: view user profile for the logged in user | ||
When user "user1" logs in using the webUI | ||
Then the user profile should be visible in the webUI | ||
When the user opens the user profile | ||
Then username "User One" should be visible in the webUI | ||
|
||
Scenario: browse to account page to manage user account | ||
Given user "user1" has logged in using the webUI | ||
When the user opens the user profile | ||
And the user browses to manage the account | ||
Then the accounts page should be visible in the webUI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
module.exports = { | ||
commands: { | ||
getUserProfileName: async function () { | ||
let userInfo | ||
await this | ||
.waitForElementVisible('@profileInfoContainer') | ||
.waitForElementVisible('@userProfileName') | ||
.api.element('@userProfileName', result => { | ||
this.api.elementIdText(result.value.ELEMENT, text => { | ||
userInfo = text.value | ||
}) | ||
}) | ||
return userInfo | ||
}, | ||
browseToManageAccount: function () { | ||
return this.waitForElementVisible('@manageAccount') | ||
.click('@manageAccount') | ||
} | ||
}, | ||
elements: { | ||
profileInfoContainer: { | ||
selector: '#account-info-container' | ||
}, | ||
userProfileName: { | ||
selector: '//div/h3[@class="uk-card-title"]', | ||
locateStrategy: 'xpath' | ||
}, | ||
manageAccount: { | ||
selector: '//div//span[.="Manage your account"]', | ||
locateStrategy: 'xpath' | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters