From bbd77ac10bdc658d6ae2b8507d265e3ea864ea5a Mon Sep 17 00:00:00 2001 From: Peter Ringelmann Date: Wed, 29 Apr 2026 09:32:20 +0200 Subject: [PATCH] test(settings): seed manager setting as JSON array in users_manager spec Signed-off-by: Peter Ringelmann --- cypress/e2e/settings/users_manager.cy.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cypress/e2e/settings/users_manager.cy.ts b/cypress/e2e/settings/users_manager.cy.ts index 9715e8cb9ce..429b2beab55 100644 --- a/cypress/e2e/settings/users_manager.cy.ts +++ b/cypress/e2e/settings/users_manager.cy.ts @@ -51,8 +51,12 @@ describe('Settings: User Manager Management', function() { }) it('Can remove a manager through the edit dialog', function() { - // Set manager via backend first - cy.runOccCommand(`user:setting '${user.userId}' settings manager '${manager.userId}'`) + // Set manager via backend first. + // User::getManagerUids() decodes this with JSON_THROW_ON_ERROR, so we + // must store a JSON array, matching what setManagerUids() writes. + // Double-quotes are escaped because runOccCommand passes the command + // through `bash -c "..."`, which would otherwise eat them. + cy.runOccCommand(`user:setting '${user.userId}' settings manager '[\\"${manager.userId}\\"]'`) cy.visit('/settings/users')