Skip to content

test(files): migrate copy/move e2e from Cypress to Playwright#61165

Draft
pringelmann wants to merge 1 commit into
masterfrom
test/migrate-files-copy-move-playwright
Draft

test(files): migrate copy/move e2e from Cypress to Playwright#61165
pringelmann wants to merge 1 commit into
masterfrom
test/migrate-files-copy-move-playwright

Conversation

@pringelmann

Copy link
Copy Markdown
Contributor

Summary

Migrates the files and files_sharing copy/move specs. Adds a CopyMoveDialogPage file-picker section, an OCS share helper, and an owner/recipient fixture for the sharing cases.

NOTE: The sharing "move without delete permission" case is omitted: the recipient's permission view propagates too inconsistently to assert reliably (the cypress original was flaky for the same reason). Noted for a follow-up PR.

Checklist

  • Sign-off message is added to all commits
  • Tests are included
  • Documentation has been updated or is not required

AI (if applicable)

  • The content of this PR was partly generated using AI

Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
@pringelmann pringelmann self-assigned this Jun 10, 2026
@pringelmann pringelmann added CI tests Related to tests labels Jun 10, 2026
@pringelmann pringelmann added this to the Nextcloud 35 milestone Jun 10, 2026
'Content-Type': mimeType,
requesttoken,
},
data: typeof content === 'string' ? content : content,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

debugging remnant? decided to clean it up. Let me know if this was a legitimate but partially completed check

const response = await request.fetch(davUrl(user, parentPath), {
method: 'PROPFIND',
headers: { requesttoken, Depth: '1' },
data: '<?xml version="1.0"?><d:propfind xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns"><d:prop><oc:permissions/></d:prop></d:propfind>',

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was mostly written by Claude. I'm still learning WebDAV so cannot easily judge if this is good. Would appreciate feedback.

baseURL,
// send: 'always' — the OCS API doesn't issue a Basic auth challenge, so
// credentials must be sent preemptively (DAV would challenge, OCS won't)
httpCredentials: { username: owner.userId, password: owner.password, send: 'always' },

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is a once-off API seeding action, I decided to keep it simple and use http auth. (as opposed to creating a context for the second user)

Happy to debate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI tests Related to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant