Skip to content
Draft
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
19 changes: 17 additions & 2 deletions .woodpecker.star
Original file line number Diff line number Diff line change
Expand Up @@ -574,15 +574,15 @@ def e2eTests(ctx):
if "app-provider-onlyOffice" in suite:
environment["FAIL_ON_UNCAUGHT_CONSOLE_ERR"] = False
steps += onlyofficeService() + \
waitForService("onlyoffice", "443") + \
waitForWebOffice("https://onlyoffice") + \
openCloudService(params["extraServerEnvironment"]) + \
wopiCollaborationService("onlyoffice") + \
waitForService("wopi-onlyoffice", "9300")

elif "app-provider" in suite:
environment["FAIL_ON_UNCAUGHT_CONSOLE_ERR"] = False
steps += collaboraService() + \
waitForService("collabora", "9980") + \
waitForWebOffice("https://collabora:9980") + \
openCloudService(params["extraServerEnvironment"]) + \
wopiCollaborationService("collabora") + \
waitForService("wopi-collabora", "9300")
Expand Down Expand Up @@ -1670,3 +1670,18 @@ def restoreBrowsersCache(browser):
],
},
]

def waitForWebOffice(office_url = ""):
if office_url == "":
return []
office_url += "/hosting/discovery"
return [{
"name": "wait-for-weboffice",
"image": OC_CI_NODEJS,
"commands": [
"timeout 300 bash -c " +
"'while [ `curl %s" % office_url +
" -w \"%{http_code}\" -o /dev/null -sk` != \"200\" ]; do " +
"echo \"Waiting...\" && sleep 2; done'",
],
}]
8 changes: 7 additions & 1 deletion tests/e2e/support/objects/app-files/resource/actions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Download, Locator, Page, expect } from '@playwright/test'
import { setDefaultTimeout } from '@cucumber/cucumber'
import util from 'util'
import path from 'path'
import { waitForResources } from './utils'
Expand Down Expand Up @@ -109,7 +110,7 @@ const filesContextMenuAction = 'div[id^="context-menu-drop"] button.oc-files-act
const highlightedTileCardSelector = '.oc-tile-card-selected'
const emptyTrashbinButtonSelector = '.oc-files-actions-empty-trash-bin-trigger'
const resourceLockIcon =
'//*[@data-test-resource-name="%s"]/ancestor::tr//td//span[@data-test-indicator-type="resource-locked"]'
'//*[@data-test-resource-name="%s"]/ancestor::*[self::li or self::tr]//span[@data-test-indicator-type="resource-locked"]'
const sharesNavigationButtonSelector = '.oc-sidebar-nav [data-nav-name="files-shares"]'
const keepBothButton = '.oc-modal-body-actions-confirm'
const mediaNavigationButton = `//button[contains(@class, "preview-controls-%s")]`
Expand Down Expand Up @@ -731,9 +732,14 @@ export const resumeResourceUpload = async (page: Page): Promise<void> => {
await pauseResumeUpload(page)
await page.locator(pauseUploadButton).waitFor()

// increase the test timeout for large uploads
setDefaultTimeout(config.largeUploadTimeout * 1000)
await page
.locator(uploadInfoSuccessLabelSelector)
.waitFor({ timeout: config.largeUploadTimeout * 1000 })
// revert to the default timeout
setDefaultTimeout(config.timeout * 1000)

await page.locator(uploadInfoCloseButton).click()
}

Expand Down