Skip to content

fix: hanging test in direct.spec.js - #5972

Open
elzody wants to merge 3 commits into
mainfrom
fix/failing-save-as-test
Open

fix: hanging test in direct.spec.js#5972
elzody wants to merge 3 commits into
mainfrom
fix/failing-save-as-test

Conversation

@elzody

@elzody elzody commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Fixes hanging tests in direct.spec.js because the sessions were not being cleared properly, and fixes a psalm error regarding a change to OCP.

Assisted-by: ClaudeCode:claude-sonnet-4-6

Checklist

  • Code is properly formatted
  • Sign-off message is added to all commits
  • Documentation (manuals or wiki) has been updated or is not required

elzody added 2 commits August 11, 2026 23:53
Assisted-by: ClaudeCode:claude-sonnet-4-6
Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
Nextcloud 35 uses modifyColumn instead of changeColumn

Assisted-by: ClaudeCode:claude-sonnet-4-6
Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
@elzody
elzody force-pushed the fix/failing-save-as-test branch from 0e85d9d to a489668 Compare August 12, 2026 03:54
@elzody
elzody marked this pull request as ready for review August 12, 2026 04:08
@elzody
elzody requested a review from juliusknorr as a code owner August 12, 2026 04:08
@elzody elzody self-assigned this Aug 12, 2026
@elzody elzody added the 3. to review Ready to be reviewed label Aug 12, 2026
@elzody elzody changed the title fix(cypress): replace stale iframe check with postMessage in Save as test fix: hanging test in direct.spec.js Aug 12, 2026
@moodyjmz

Copy link
Copy Markdown
Contributor

Save-As test regains its hang-fix but drops an assertion it doesn't need to drop.

cy.get('@loleafletframe').within(() => { cy.verifyOpen('document.rtf') }) was verifying that Collabora actually reopened the file as document.rtf after Save As. Swapping to cy.waitForPostMessage('Action_Save_Resp', { success: true }) fixes the hang (the @loleafletframe alias is stale after the Save-As reload, so .within() was retrying against a detached node until timeout) — but now the test passes on any successful save, not specifically a save-as-rtf.

The fix is already established in this repo: cypress/e2e/integration.spec.js:96 runs the same Save-As-to-rtf flow and asserts on the fileName field in the same postMessage payload:

cy.waitForPostMessage('Action_Save_Resp', { success: true, fileName: exportFilename })

Suggest mirroring that here instead of dropping the check entirely:

-				cy.get('@loleafletframe').within(() => {
-					cy.verifyOpen('document.rtf')
-				})
+				cy.waitForPostMessage('Action_Save_Resp', { success: true, fileName: 'document.rtf' })

checkExpectedValues in cypress/support/commands.js does per-key equality against message.Values, so this is a drop-in — no new plumbing needed. Keeps the hang fixed, restores the coverage.

(Everything else in the PR — the migration changeColumnmodifyColumn, and the logout command switching from a stale cy.session cache to clearAllSavedSessions()/clearCookies() — looks correct as-is, no changes requested there.)

Assisted-by: ClaudeCode:claude-sonnet-4-6
Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>

@moodyjmz moodyjmz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fix applied exactly as suggested (fileName assertion restored). All three changes verified against actual repo/runtime behavior — LGTM.

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

Labels

3. to review Ready to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants