Skip to content

test(playwright): create public share links through the OCS API - #1506

Open
hweihwang wants to merge 1 commit into
mainfrom
fix/playwright-public-share-link
Open

hweihwang wants to merge 1 commit into
mainfrom
fix/playwright-public-share-link

Conversation

@hweihwang

Copy link
Copy Markdown
Contributor

Playwright on server master fails both public share tests since nextcloud/server#66380 (for example https://github.com/nextcloud/whiteboard/actions/runs/42303232006/job/128186034990). They wait for a "Copy public link" button, and the Vue 3 sharing sidebar renders it as a link now.

The tests only reached the sidebar because the API call before it never worked: it posted to the relative ocs/v2.php/..., which from the Files app resolves to /index.php/apps/files/ocs/v2.php/.... The helper now posts to /ocs/v2.php/..., as createUserShare in playwright/support/utils.ts already does, and the sidebar fallback is gone. The share API is the same on stable31, stable32 and master, so the tests no longer depend on the sidebar markup.

Tests: on a local master container, the old helper fails both tests at the copy button, and the new one passes them with one share request each. Both also pass on local stable31 and stable32 containers.

AI

  • Prepared with AI assistance.

The share helper posted to a relative `ocs/v2.php` URL, which resolves to
`/index.php/apps/files/ocs/v2.php` from the Files app, so every call failed
and the tests created the link through the share sidebar instead. The
Vue 3 sidebar on server master (nextcloud/server#66380) renders the copy
action as a link, so the fallback no longer finds it.

Post to `/ocs/v2.php` so the API call works on stable31, stable32 and
master, and drop the sidebar fallback.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Hoang Pham <hoangmaths96@gmail.com>
@hweihwang
hweihwang requested a review from grnd-alt as a code owner November 6, 2026 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant