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

[tests-only] Run acceptance tests with postgres:9.4 #38060

Closed
wants to merge 3 commits into from
Closed
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: 2 additions & 2 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -1311,11 +1311,11 @@ def acceptance(ctx):
'federatedServerVersions': [''],
'browsers': ['chrome'],
'phpVersions': ['7.4'],
'databases': ['mariadb:10.2'],
'databases': ['postgres:9.4'],
'federatedPhpVersion': '7.2',
'federatedServerNeeded': False,
'federatedDb': '',
'filterTags': '',
'filterTags': '~@skipOnDbPgsql',
'logLevel': '2',
'emailNeeded': False,
'ldapNeeded': False,
Expand Down
2 changes: 1 addition & 1 deletion tests/acceptance/features/apiVersions/fileVersions.feature
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Feature: dav-versions
Then the content of file "/textfile0.txt" for user "Alice" should be "Dav-Test"

@skipOnStorage:ceph @skipOnStorage:scality @files_primary_s3-issue-156
@issue-ocis-reva-196 @skipOnOracle
@issue-ocis-reva-196 @skipOnDbOracle
Scenario: Restore a file and check, if the content and correct checksum is now in the current file
Given user "Alice" has uploaded file with content "AAAAABBBBBCCCCC" and checksum "MD5:45a72715acdd5019c5be30bdbb75233e" to "/davtest.txt"
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/davtest.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a"
Expand Down
10 changes: 10 additions & 0 deletions tests/acceptance/features/bootstrap/WebUIGeneralContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,16 @@ public function theUserDismissesTheNotificationOnTheWebUI() {
$this->owncloudPage->dismissNotification();
}

/**
* @When the user dismisses all notifications on the webUI
*
* @return void
* @throws ElementNotFoundException
*/
public function theUserDismissesAllNotificationsOnTheWebUI() {
$this->owncloudPage->dismissAllNotifications();
}

/**
* @Then no notification should be displayed on the webUI
*
Expand Down
39 changes: 39 additions & 0 deletions tests/acceptance/features/lib/OwncloudPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,45 @@ public function dismissNotification() {
$dismissButton->click();
}

/**
* Dismiss all notifications
*
* @return void
* @throws ElementNotFoundException
*/
public function dismissAllNotifications() {
$notifications = $this->findById($this->notificationId);
if ($notifications === null) {
// debug - we did this step when there was nothing to dismiss
echo "dismissAllNotifications: no notifications found to dismiss\n";
// There are no notifications found, so there is nothing to dismiss
return;
}

$allNotifications = $notifications->findAll("xpath", "div");
$notificationsCount = \count($allNotifications);
echo "dismissAllNotifications: found $notificationsCount notifications to dismiss\n";

foreach ($allNotifications as $notificationElement) {
// debug - see what the notification text is
$x = $this->getTrimmedText($notificationElement);
echo "dismissAllNotifications: dismissing '$x'\n";
$dismissButton = $notificationElement->find(
"xpath", $this->notificationCloseBtnXpath
);

// We want to dismiss all notifications. If there is a notification that does not
// have a dismiss button, then we cannot dismiss all notifications, so fail.
$this->assertElementNotNull(
$dismissButton,
__METHOD__ .
" xpath $this->notificationCloseBtnXpath could not find dismiss button of notification"
);

$dismissButton->click();
}
}

/**
* Get the text of the first notification
*
Expand Down
17 changes: 14 additions & 3 deletions tests/acceptance/features/webUIWebdavLocks/unlock.feature
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ Feature: Unlock locked files and folders
| exclusive |
| shared |

@skipOnFIREFOX @files_sharing-app-required @skipOnLDAP
# This scenario depends on the order of locks displayed on the UI.
# Pgsql database can have different sorting, so allow this scenario to be skipped on Pgsql
@skipOnFIREFOX @files_sharing-app-required @skipOnLDAP @skipOnDbPgsql
Scenario: deleting the first one of multiple shared locks on the webUI
Given these users have been created with skeleton files:
| username |
Expand Down Expand Up @@ -149,7 +151,9 @@ Feature: Unlock locked files and folders
And 2 locks should be reported for folder "FOLDER_TO_SHARE" of user "receiver1" by the WebDAV API
And 2 locks should be reported for folder "FOLDER_TO_SHARE" of user "receiver2" by the WebDAV API

@skipOnFIREFOX @files_sharing-app-required @skipOnLDAP
# This scenario depends on the order of locks displayed on the UI.
# Pgsql database can have different sorting, so allow this scenario to be skipped on Pgsql
@skipOnFIREFOX @files_sharing-app-required @skipOnLDAP @skipOnDbPgsql
Scenario: deleting the second one of multiple shared locks on the webUI
Given these users have been created with skeleton files:
| username |
Expand Down Expand Up @@ -188,7 +192,9 @@ Feature: Unlock locked files and folders
And 2 locks should be reported for folder "FOLDER_TO_SHARE" of user "receiver1" by the WebDAV API
And 2 locks should be reported for folder "FOLDER_TO_SHARE" of user "receiver2" by the WebDAV API

@skipOnFIREFOX @files_sharing-app-required @skipOnLDAP
# This scenario depends on the order of locks displayed on the UI.
# Pgsql database can have different sorting, so allow this scenario to be skipped on Pgsql
@skipOnFIREFOX @files_sharing-app-required @skipOnLDAP @skipOnDbPgsql
Scenario: deleting the last one of multiple shared locks on the webUI
Given these users have been created with skeleton files:
| username |
Expand All @@ -213,14 +219,19 @@ Feature: Unlock locked files and folders
| lockscope | shared |
And the user has browsed to the files page
When the user unlocks the lock no 3 of file "lorem.txt" on the webUI
And the user dismisses all notifications on the webUI
Then file "lorem.txt" should be marked as locked on the webUI
And the user dismisses all notifications on the webUI
And file "lorem.txt" should be marked as locked by user "receiver1" in the locks tab of the details panel on the webUI
And the user dismisses all notifications on the webUI
And file "lorem.txt" should be marked as locked by user "receiver2" in the locks tab of the details panel on the webUI
And 2 locks should be reported for file "lorem.txt" of user "brand-new-user" by the WebDAV API
And 2 locks should be reported for file "lorem (2).txt" of user "receiver1" by the WebDAV API
And 2 locks should be reported for file "lorem (2).txt" of user "receiver2" by the WebDAV API
When the user unlocks the lock no 3 of folder "FOLDER_TO_SHARE" on the webUI
And the user dismisses all notifications on the webUI
Then folder "FOLDER_TO_SHARE" should be marked as locked on the webUI
And the user dismisses all notifications on the webUI
And folder "FOLDER_TO_SHARE" should be marked as locked by user "receiver1" in the locks tab of the details panel on the webUI
And folder "FOLDER_TO_SHARE" should be marked as locked by user "receiver2" in the locks tab of the details panel on the webUI
And 2 locks should be reported for folder "FOLDER_TO_SHARE" of user "brand-new-user" by the WebDAV API
Expand Down