Skip to content

Commit

Permalink
Merge pull request #5909 from owncloud/run-ci-against-oc10-latest-202…
Browse files Browse the repository at this point in the history
…11015

Run CI against latest oC10 release
  • Loading branch information
phil-davis authored Oct 15, 2021
2 parents c0a9288 + a91d0da commit 844dbc9
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 39 deletions.
4 changes: 0 additions & 4 deletions .drone.env
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# The version of OCIS to use in pipelines that test against OCIS
OCIS_COMMITID=b2c2416ae13e17b7bb5f2cc4e90459e79f4ecb2b
OCIS_BRANCH=master

# The test runner source for API tests
CORE_COMMITID=11c85238feabba1a7147bd7c0517e129b49edd57
CORE_BRANCH=master
24 changes: 12 additions & 12 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ config = {
"webUISharingFilePermissionMultipleUsers",
"webUISharingFilePermissionsGroups",
],
"webUISharingFolderAdvancedPermissionMultipleUsers": "oC10SharingFolderAdvancedPermissionMU",
"webUISharingFolderAdvancedPermissionsGroups": "oC10SharingFolderAdvPermissionsGrp",
"webUISharingFolderAdvancedPermissionMultipleUsers": "oC10SharingFolderAdvPermMU",
"webUISharingFolderAdvancedPermissionsGroups": "oC10SharingFolderAdvPermsGrp",
"oC10SharingFolderPermissions": [
"webUISharingFolderPermissionMultipleUsers",
"webUISharingFolderPermissionsGroups",
Expand All @@ -94,7 +94,7 @@ config = {
"webUISharingInternalGroupsToRoot",
"webUISharingInternalGroupsToRootEdgeCases",
],
"oC10SharingInternalGroupsSharingIndicator": [
"oC10SharingInternalGroupsSharingInd": [
"webUISharingInternalGroupsSharingIndicator",
"webUISharingInternalGroupsToRootSharingIndicator",
],
Expand All @@ -104,7 +104,7 @@ config = {
"webUISharingInternalUsersShareWithPage",
],
"webUISharingInternalUsersBlacklisted": "oC10SharingInternalUsersBlacklisted",
"oC10SharingInternalUsersSharingIndicator": [
"oC10SharingInternalUsersSharingInd": [
"webUISharingInternalUsersSharingIndicator",
"webUISharingInternalUsersToRootSharingIndicator",
],
Expand Down Expand Up @@ -169,7 +169,7 @@ config = {
},
"notificationsAppNeeded": True,
"federatedServerNeeded": True,
"federatedServerVersion": "daily-master-qa",
"federatedServerVersion": "latest",
},
"webUI-XGA-Notifications": {
"type": NOTIFICATIONS,
Expand Down Expand Up @@ -361,6 +361,9 @@ config = {
},
"webUI-ocis": {
"type": FULL,
"servers": [
"",
],
"suites": {
"oCISBasic": [
"webUILogin",
Expand Down Expand Up @@ -1060,7 +1063,7 @@ def acceptance(ctx):
errorFound = False

default = {
"servers": [""],
"servers": ["latest"],
"browsers": ["chrome"],
"databases": ["mysql:5.5"],
"extraEnvironment": {},
Expand All @@ -1069,7 +1072,7 @@ def acceptance(ctx):
"logLevel": "2",
"notificationsAppNeeded": False,
"federatedServerNeeded": False,
"federatedServerVersion": "",
"federatedServerVersion": "latest",
"runningOnOCIS": False,
"screenShots": False,
"visualTesting": False,
Expand Down Expand Up @@ -1130,7 +1133,8 @@ def acceptance(ctx):
errorFound = True

browserString = "" if browser == "" else "-" + browser
name = "%s%s" % (suiteName, browserString)
serverString = "" if server == "" else "-" + server.replace("daily-", "").replace("-qa", "")
name = "%s%s%s" % (suiteName, browserString, serverString)
maxLength = 50
nameLength = len(name)
if nameLength > maxLength:
Expand Down Expand Up @@ -1527,8 +1531,6 @@ def installCore(version, db):
"db_password": password,
}})
stepDefinition.update({"commands": [
". %s/.drone.env" % dir["web"],
"export PLUGIN_GIT_REFERENCE=$CORE_COMMITID",
"if test -f runUnitTestsOnly || test -f runTestsForDocsChangeOnly; then echo 'skipping installCore'; else bash /usr/sbin/plugin.sh; fi",
]})

Expand Down Expand Up @@ -1574,8 +1576,6 @@ def installFederatedServer(version, db, dbSuffix = "-federated"):
"db_password": password,
}})
stepDefinition.update({"commands": [
". %s/.drone.env" % dir["web"],
"export PLUGIN_GIT_REFERENCE=$CORE_COMMITID",
"if test -f runUnitTestsOnly || test -f runTestsForDocsChangeOnly; then echo 'skipping installFederatedServer'; else bash /usr/sbin/plugin.sh; fi",
]})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ Other free text and markdown formatting can be used elsewhere in the document if
- [webUIFavorites/favoritesFile.feature:46](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFavorites/favoritesFile.feature#L46)
- [webUIFavorites/favoritesFile.feature:65](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFavorites/favoritesFile.feature#L65)
- [webUIFavorites/favoritesFile.feature:74](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFavorites/favoritesFile.feature#L74)
- [webUIFavorites/favoritesFile.feature:80](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFavorites/favoritesFile.feature#L80)
- [webUIFavorites/favoritesFile.feature:85](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFavorites/favoritesFile.feature#L85)
- [webUIFavorites/favoritesFile.feature:110](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFavorites/favoritesFile.feature#L110)
- [webUIFavorites/favoritesFile.feature:131](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFavorites/favoritesFile.feature#L131)
- [webUIFavorites/favoritesFile.feature:81](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFavorites/favoritesFile.feature#L81)
- [webUIFavorites/favoritesFile.feature:86](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFavorites/favoritesFile.feature#L86)
- [webUIFavorites/favoritesFile.feature:111](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFavorites/favoritesFile.feature#L111)
- [webUIFavorites/favoritesFile.feature:130](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFavorites/favoritesFile.feature#L130)
- [webUIFavorites/unfavoriteFile.feature:13](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFavorites/unfavoriteFile.feature#L13)
- [webUIFavorites/unfavoriteFile.feature:34](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFavorites/unfavoriteFile.feature#L34)
- [webUIFavorites/unfavoriteFile.feature:55](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFavorites/unfavoriteFile.feature#L55)
Expand Down Expand Up @@ -206,7 +206,6 @@ Other free text and markdown formatting can be used elsewhere in the document if
- [webUISharingPublicDifferentRoles/shareByPublicLinkDifferentRoles.feature:295](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingPublicDifferentRoles/shareByPublicLinkDifferentRoles.feature#L295)
- [webUISharingPublicDifferentRoles/shareByPublicLinkDifferentRoles.feature:304](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingPublicDifferentRoles/shareByPublicLinkDifferentRoles.feature#L304)
- [webUISharingPublicDifferentRoles/shareByPublicLinkDifferentRoles.feature:313](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingPublicDifferentRoles/shareByPublicLinkDifferentRoles.feature#L313)
- [webUIFilesActionMenu/versions.feature:36](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFilesActionMenu/versions.feature#L36)
- [webUIFilesCopy/copy.feature:98](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFilesCopy/copy.feature#L98)
- [webUIMoveFilesFolders/moveFiles.feature:97](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIMoveFilesFolders/moveFiles.feature#L97)
- [webUIMoveFilesFolders/moveFolders.feature:72](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIMoveFilesFolders/moveFolders.feature#L72)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,10 @@ Feature: Mark file as favorite


Scenario: navigate to the favorites page and back to files page using the menu
Given the user has browsed to the favorites page using the webUI
Given user "Alice" has uploaded file "data.zip" to "data.zip"
And the user has browsed to the favorites page using the webUI
When the user browses to the files page using the webUI
Then the count of files and folders shown on the webUI should be 1
Then file "data.zip" should be listed on the webUI

@issue-1910
Scenario: favorites list appears empty when no favorites are defined
Expand Down Expand Up @@ -126,8 +127,6 @@ Feature: Mark file as favorite
And as "Alice" folder "simple-folder" should not exist




Scenario: Favourite files and folders with comma in the names
Given user "Alice" has created file "sample,1.txt"
And user "Alice" has created folder "Sample,Folder,With,Comma"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Feature: Versions of a file
And the user restores the file to last version using the webUI
Then the content of file "lorem-file.txt" for user "user0" should be "lorem content"

@issue-ocis-1328 @disablePreviews
@skipOnOC10 @skipOnOCIS @issue-ocis-1328 @disablePreviews
Scenario: sharee can see the versions of a file
Given user "user0" has uploaded file with content "lorem content" to "lorem-file.txt"
And user "user0" has uploaded file with content "lorem" to "lorem-file.txt"
Expand Down
35 changes: 22 additions & 13 deletions tests/acceptance/helpers/sharingHelper.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const httpHelper = require('./httpHelper')
const { normalize } = require('./path')
const codify = require('../helpers/codify')
const assert = require('assert')
const { client } = require('nightwatch-api')
Expand Down Expand Up @@ -320,20 +319,24 @@ module.exports = {
* eg: if "simple-folder/subfolder" has been shared, the share details is shown
* as path: "/subfolder"
*/
if (client.globals.ocis) {
const splitted = filename.split('/')
filename = splitted[splitted.length - 1]
}
const splitted = filename.split('/')
filename = splitted[splitted.length - 1]
const allShares = await this.getAllSharesSharedWithUser(user)
const elementsToDecline = allShares.filter((element) => {
const splitPath = element.path.split('/')
const resourceAtEndOfPath = splitPath[splitPath.length - 1]
return (
element.state === this.SHARE_STATE.pending &&
normalize(element.path) === filename &&
resourceAtEndOfPath === filename &&
element.uid_owner === sharer
)
})
let errorString = ''
if (elementsToDecline.length < 1) {
throw new Error('Could not find the share to be declined')
for (const element of allShares) {
errorString = errorString + ' ' + element.path
}
throw new Error('Could not find the share to be declined' + errorString)
}
/**
* TODO: loop only run once because the return
Expand Down Expand Up @@ -369,21 +372,27 @@ module.exports = {
* only the resource in the path and not the containing folder
* eg: if "simple-folder/subfolder" has been shared, the share details is shown
* as path: "/subfolder"
*
* We always check just for the last part of the path.
*/
if (client.globals.ocis) {
const splitted = filename.split('/')
filename = splitted[splitted.length - 1]
}
const splitted = filename.split('/')
filename = splitted[splitted.length - 1]
const allShares = await this.getAllSharesSharedWithUser(user)
const elementsToAccept = allShares.filter((element) => {
const splitPath = element.path.split('/')
const resourceAtEndOfPath = splitPath[splitPath.length - 1]
return (
element.state === this.SHARE_STATE.pending &&
element.path.slice(1) === filename &&
resourceAtEndOfPath === filename &&
element.uid_owner === sharer
)
})
let errorString = ''
if (elementsToAccept.length < 1) {
throw new Error('Could not find the share to be accepted')
for (const element of allShares) {
errorString = errorString + ' ' + element.path
}
throw new Error('Could not find the share to be accepted:' + errorString)
}
/**
* TODO: loop only run once because the return
Expand Down

0 comments on commit 844dbc9

Please sign in to comment.