From 5b0a46346d54aa464439b06fa155899d5d3958e1 Mon Sep 17 00:00:00 2001 From: Saw-jan Date: Wed, 28 Jan 2026 11:55:01 +0545 Subject: [PATCH 1/3] ci: wait for web-office using discovery endpoint Signed-off-by: Saw-jan --- .woodpecker.star | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.woodpecker.star b/.woodpecker.star index 0242183a22..40d3fb0084 100644 --- a/.woodpecker.star +++ b/.woodpecker.star @@ -574,7 +574,7 @@ 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") @@ -582,7 +582,7 @@ def e2eTests(ctx): 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") @@ -1670,3 +1670,15 @@ 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 -sk -o /dev/null -w \"%{http_code}\" %s) != 200 ]; do echo \"Waiting...\" && sleep 1; done'" % office_url, + ], + }] From 656d9a0b60d13180714eefce6506212269bcb4b3 Mon Sep 17 00:00:00 2001 From: Saw-jan Date: Wed, 28 Jan 2026 12:04:05 +0545 Subject: [PATCH 2/3] test: fix lock selector Signed-off-by: Saw-jan --- .woodpecker.star | 5 ++++- tests/e2e/support/objects/app-files/resource/actions.ts | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.woodpecker.star b/.woodpecker.star index 40d3fb0084..030725f448 100644 --- a/.woodpecker.star +++ b/.woodpecker.star @@ -1679,6 +1679,9 @@ def waitForWebOffice(office_url = ""): "name": "wait-for-weboffice", "image": OC_CI_NODEJS, "commands": [ - "timeout 300 bash -c 'while [ $(curl -sk -o /dev/null -w \"%{http_code}\" %s) != 200 ]; do echo \"Waiting...\" && sleep 1; done'" % office_url, + "timeout 300 bash -c " + + "'while [ `curl %s" % office_url + + " -w \"%{http_code}\" -o /dev/null -sk` != \"200\" ]; do " + + "echo \"Waiting...\" && sleep 2; done'", ], }] diff --git a/tests/e2e/support/objects/app-files/resource/actions.ts b/tests/e2e/support/objects/app-files/resource/actions.ts index 767fe18b17..bfa1a34413 100644 --- a/tests/e2e/support/objects/app-files/resource/actions.ts +++ b/tests/e2e/support/objects/app-files/resource/actions.ts @@ -109,7 +109,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")]` From 738a2df2aa735a49dbd7c5e696a34fede42003bb Mon Sep 17 00:00:00 2001 From: Saw-jan Date: Wed, 28 Jan 2026 14:49:28 +0545 Subject: [PATCH 3/3] test: increase test timeout during large file upload Signed-off-by: Saw-jan --- tests/e2e/support/objects/app-files/resource/actions.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/e2e/support/objects/app-files/resource/actions.ts b/tests/e2e/support/objects/app-files/resource/actions.ts index bfa1a34413..f59bac9eb1 100644 --- a/tests/e2e/support/objects/app-files/resource/actions.ts +++ b/tests/e2e/support/objects/app-files/resource/actions.ts @@ -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' @@ -731,9 +732,14 @@ export const resumeResourceUpload = async (page: Page): Promise => { 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() }