mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 20:45:00 -05:00
Fix the intermittent "Unexpected userId after login" e2e flake (seen in 33-board-domains, which re-logs-in on the same page: admin then non-admin). Meteor.userId() can lag the Meteor.loginWithToken callback by a tick, so reading it immediately sometimes returned the PREVIOUS userId. Poll Meteor.userId() until it settles on the expected id (5s timeout so a genuine mismatch still surfaces). Pure test-helper change; the direct-Mongo-seed + resume-token login path this uses does not go through createUser, so it is unaffected by the session security changes.