-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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 #28793 from owncloud/stable10-ui-tests-sharing
[stable10] UI tests for sharing feature
- Loading branch information
Showing
8 changed files
with
282 additions
and
6 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
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
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
44 changes: 44 additions & 0 deletions
44
tests/ui/features/lib/OwncloudPageElement/SettingsMenu.php
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,44 @@ | ||
<?php | ||
|
||
/** | ||
* ownCloud | ||
* | ||
* @author Artur Neumann <artur@jankaritech.com> | ||
* @copyright 2017 Artur Neumann artur@jankaritech.com | ||
* | ||
* This library is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE | ||
* License as published by the Free Software Foundation; either | ||
* version 3 of the License, or any later version. | ||
* | ||
* This library is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU AFFERO GENERAL PUBLIC LICENSE for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public | ||
* License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
*/ | ||
|
||
namespace Page\OwncloudPageElement; | ||
|
||
use Page\OwncloudPage; | ||
use SensioLabs\Behat\PageObjectExtension\PageObject\Exception\ElementNotFoundException; | ||
|
||
/** | ||
* The Settings Menu | ||
* | ||
*/ | ||
class SettingsMenu extends OwncloudPage { | ||
protected $logoutButtonId = 'logout'; | ||
|
||
public function logout() { | ||
$logoutButton = $this->findById($this->logoutButtonId); | ||
if (is_null($logoutButton)) { | ||
throw new ElementNotFoundException("could not find logout button"); | ||
} | ||
$logoutButton->click(); | ||
} | ||
} | ||
|
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,45 @@ | ||
Feature: Sharing | ||
|
||
Background: | ||
Given these users exist: | ||
|username|password|displayname|email | | ||
|user1 |1234 |User One |u1@oc.com.np| | ||
|user2 |1234 |User Two |u2@oc.com.np| | ||
|user3 |1234 |User Three |u2@oc.com.np| | ||
And these groups exist: | ||
|groupname| | ||
|grp1 | | ||
And the user "user1" is in the group "grp1" | ||
And the user "user2" is in the group "grp1" | ||
And I am on the login page | ||
And I login with username "user1" and password "1234" | ||
And I logout | ||
And I login with username "user2" and password "1234" | ||
|
||
Scenario: share a file & folder with another internal user | ||
And the folder "simple-folder" is shared with the user "User One" | ||
And the file "testimage.jpg" is shared with the user "User One" | ||
And I logout | ||
And I login with username "user1" and password "1234" | ||
Then the folder "simple-folder (2)" should be listed | ||
And the folder "simple-folder (2)" should be marked as shared by "User Two" | ||
And the file "testimage (2).jpg" should be listed | ||
And the file "testimage (2).jpg" should be marked as shared by "User Two" | ||
|
||
Scenario: share a folder with an internal group | ||
And I logout | ||
And I login with username "user3" and password "1234" | ||
And the folder "simple-folder" is shared with the group "grp1" | ||
And the file "testimage.jpg" is shared with the group "grp1" | ||
And I logout | ||
And I login with username "user1" and password "1234" | ||
Then the folder "simple-folder (2)" should be listed | ||
And the folder "simple-folder (2)" should be marked as shared with "grp1" by "User Three" | ||
And the file "testimage (2).jpg" should be listed | ||
And the file "testimage (2).jpg" should be marked as shared with "grp1" by "User Three" | ||
And I logout | ||
And I login with username "user2" and password "1234" | ||
Then the folder "simple-folder (2)" should be listed | ||
And the folder "simple-folder (2)" should be marked as shared with "grp1" by "User Three" | ||
And the file "testimage (2).jpg" should be listed | ||
And the file "testimage (2).jpg" should be marked as shared with "grp1" by "User Three" |