Skip to content

chore(playwright): Rewrite password confirmation handler to avoid race conditions#62033

Merged
ChristophWurst merged 1 commit into
masterfrom
fix/login-on-playwright
Jul 14, 2026
Merged

chore(playwright): Rewrite password confirmation handler to avoid race conditions#62033
ChristophWurst merged 1 commit into
masterfrom
fix/login-on-playwright

Conversation

@DerDreschner

@DerDreschner DerDreschner commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

The password confirmation handler on playwright is using a timeout on isVisible. That is deprecated and isn't being considered anymore, which lead to several issues during our playwright tests (especially under high load on our CI runners).

When that issue occurs, the following error can be seen in the playwright tests. The timeout was raised to 90 seconds here and the issue still happened, as the whole test just stuck because of the login never being done.

Notice:   1 failed
    [admin-settings] › tests/playwright/e2e/appstore/admin-settings-apps.spec.ts:159:2 › Settings: App management › Limit app usage to group 
  43 passed (11.2m)

  1) [admin-settings] › tests/playwright/e2e/appstore/admin-settings-apps.spec.ts:159:2 › Settings: App management › Limit app usage to group 

    Test timeout of 90000ms exceeded.

    Error: expect(locator).toHaveCount(expected) failed

    Locator:  locator('#app-sidebar-vue').getByRole('list', { name: 'Limited to groups' })
    Expected: 0
    Received: undefined


      206 |
      207 | 		// Verify the "Limited to groups" list is no longer visible
    > 208 | 		await expect(appstorePage.limitedToGroupsList()).toHaveCount(0)
          | 		                                                 ^
      209 | 	})
      210 | })
      211 |
        at /home/runner/actions-runner/_work/server/server/tests/playwright/e2e/appstore/admin-settings-apps.spec.ts:208:52

    Error Context: test-results/appstore-admin-settings-ap-4ce9a-nt-Limit-app-usage-to-group-admin-settings/error-context.md

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@DerDreschner DerDreschner requested a review from a team as a code owner July 13, 2026 01:50
@DerDreschner DerDreschner requested review from nfebe, sorbaugh and susnux and removed request for a team July 13, 2026 01:50
Copilot AI requested a review from a team as a code owner July 13, 2026 02:29
Copilot AI requested review from icewind1991 and provokateurin and removed request for a team July 13, 2026 02:29
Copilot stopped work on behalf of DerDreschner due to an error July 13, 2026 02:46
Copilot stopped work on behalf of DerDreschner due to an error July 13, 2026 02:51
@DerDreschner DerDreschner reopened this Jul 13, 2026
@DerDreschner DerDreschner force-pushed the fix/login-on-playwright branch from 512a907 to 19b831c Compare July 13, 2026 02:58
@DerDreschner DerDreschner requested a review from odzhychko July 13, 2026 09:40
Comment thread tests/playwright/support/utils/password-confirmation.ts Outdated
Comment thread tests/playwright/support/utils/password-confirmation.ts Outdated
@odzhychko

Copy link
Copy Markdown
Contributor

Just a thought: handlePasswordConfirmation will always make a test wait even if no password confirmation is required. Tests could be setup with locations handlers to only run this code if the password dialog actually becomes visible.

In the future this might be useful, if a test:

  • doesn't care for when the password confirmation appears
  • but has to call handlePasswordConfirmation often because it might appear

@DerDreschner

Copy link
Copy Markdown
Contributor Author

Just a thought: handlePasswordConfirmation will always make a test wait even if no password confirmation is required. Tests could be setup with locations handlers to only run this code if the password dialog actually becomes visible.

Yeah, that was being proposed from Claude as well and I think it should be handled that way either. But I didn't want to make such a fundamental change as it makes the "input/expect password here" being implicit instead of explicit when looking at the tests. There are good points for both ways IMHO. 😄

@DerDreschner DerDreschner force-pushed the fix/login-on-playwright branch 2 times, most recently from da1c1a2 to fe8efc8 Compare July 14, 2026 07:38
@DerDreschner DerDreschner enabled auto-merge July 14, 2026 07:39
@DerDreschner DerDreschner requested review from odzhychko and susnux July 14, 2026 07:39
@DerDreschner DerDreschner force-pushed the fix/login-on-playwright branch from fe8efc8 to 32ff7fe Compare July 14, 2026 08:07
@DerDreschner DerDreschner force-pushed the fix/login-on-playwright branch 2 times, most recently from 0ab5fb3 to 83f469c Compare July 14, 2026 10:08
Assisted-by: ClaudeCode:claude-opus-4.6[1M]
Signed-off-by: David Dreschner <david.dreschner@nextcloud.com>
@DerDreschner DerDreschner force-pushed the fix/login-on-playwright branch from 83f469c to f91a6b1 Compare July 14, 2026 12:49
@DerDreschner DerDreschner disabled auto-merge July 14, 2026 14:48
@DerDreschner DerDreschner enabled auto-merge July 14, 2026 14:48
@ChristophWurst ChristophWurst disabled auto-merge July 14, 2026 15:30
@ChristophWurst ChristophWurst merged commit 0ed899c into master Jul 14, 2026
214 of 224 checks passed
@ChristophWurst ChristophWurst deleted the fix/login-on-playwright branch July 14, 2026 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants