Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix CI #330

Merged
merged 3 commits into from
May 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,6 @@ matrix:
NEED_INSTALL_APP: true
FIX_PERMISSIONS: true
USE_EMAIL: true
NEED_USER_MANAGEMENT_APP: true

- PHP_VERSION: 7.1
OC_VERSION: daily-stable10-qa
Expand All @@ -498,7 +497,6 @@ matrix:
NEED_INSTALL_APP: true
FIX_PERMISSIONS: true
USE_EMAIL: true
NEED_USER_MANAGEMENT_APP: true

- PHP_VERSION: 7.2
OC_VERSION: daily-stable10-qa
Expand All @@ -511,7 +509,6 @@ matrix:
NEED_INSTALL_APP: true
FIX_PERMISSIONS: true
USE_EMAIL: true
NEED_USER_MANAGEMENT_APP: true

- PHP_VERSION: 7.2
OC_VERSION: daily-stable10-qa
Expand All @@ -524,7 +521,6 @@ matrix:
NEED_INSTALL_APP: true
FIX_PERMISSIONS: true
USE_EMAIL: true
NEED_USER_MANAGEMENT_APP: true

- PHP_VERSION: 7.2
OC_VERSION: daily-stable10-qa
Expand Down
28 changes: 0 additions & 28 deletions tests/acceptance/features/bootstrap/WebUIGuestsContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,34 +86,6 @@ public function __construct(SetPasswordPage $setPasswordPage, FilesPage $filesPa
$this->filesPage = $filesPage;
}

/**
* @return string|null
*/
public function getGuestGroupName() {
$configkeyList = $this->featureContext->getConfigKeyList('guests');
foreach ($configkeyList as $config) {
if ($config['configkey'] === 'group') {
return $config['value'];
}
}
return null;
}

/**
* @Given guest user :user has been created with email :email and password :password
*
* @param string $user
* @param string $email
* @param string $password
*
* @return void
* @throws Exception
*/
public function guestUserHasBeenCreatedWithEmailAndPassword($user, $email, $password) {
$this->featureContext->createUser($user, $password, $user, $email);
$this->featureContext->addUserToGroup($user, $this->getGuestGroupName());
}

/**
* @When guest user :user registers and sets password to :password using the webUI
*
Expand Down
21 changes: 11 additions & 10 deletions tests/acceptance/features/webUIGuests/guests.feature
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,17 @@ Feature: Guests
And user "valid@email.com" should exist
# And user "valid@email.com" should not exist

@mailhog
@mailhog @issue-332
Scenario: Administrator changes the guest user's password in users menu
Given guest user "user0" has been created with email "user0@example.com" and password "%alt2%"
Given user "admin" has uploaded file with content "new content" to "new-file.txt"
And the administrator has logged in using the webUI
And the user shares file "new-file.txt" with guest user with email "valid@email.com" using webUI
And the administrator has browsed to the users page
When the administrator changes the password of user "user0" to "newpassword" using the webUI
Then user "user0" should exist
And notifications should be displayed on the webUI with the text
| Password successfully changed |
When the administrator changes the password of user "valid@email.com" to "newpassword" using the webUI
#Then notifications should be displayed on the webUI with the text
# | Password successfully changed |
When the administrator logs out of the webUI
And the user logs in with username "user0" and password "newpassword" using the webUI
And the user logs in with username "valid@email.com" and password "newpassword" using the webUI
Then the user should be redirected to a webUI page with the title "Files - %productname%"

@mailhog @issue-329
Expand All @@ -105,8 +105,9 @@ Feature: Guests

@mailhog
Scenario: Administrator deletes a guest user in user's menu
Given guest user "user0" has been created with email "test@example.com" and password "%alt2%"
Given user "admin" has uploaded file with content "new content" to "new-file.txt"
And the administrator has logged in using the webUI
And the user shares file "new-file.txt" with guest user with email "valid@email.com" using webUI
And the administrator has browsed to the users page
When the administrator deletes user "user0" using the webUI and confirms the deletion using the webUI
Then user "user0" should not exist
When the administrator deletes user "valid@email.com" using the webUI and confirms the deletion using the webUI
Then user "valid@email.com" should not exist