diff --git a/apps/e2e/tests/backend/endpoints/api/v1/users.test.ts b/apps/e2e/tests/backend/endpoints/api/v1/users.test.ts index 76efb547a..71986b760 100644 --- a/apps/e2e/tests/backend/endpoints/api/v1/users.test.ts +++ b/apps/e2e/tests/backend/endpoints/api/v1/users.test.ts @@ -774,7 +774,53 @@ describe("with server access", () => { `); }); - it.todo("should be able to list users"); + it("should be able to list users", async ({ expect }) => { + await Project.createAndSwitch({ config: { magic_link_enabled: true } }); + await Auth.Otp.signIn(); + + const response = await niceBackendFetch("/api/v1/users", { + accessType: "server", + }); + expect(response).toMatchInlineSnapshot(` + NiceResponse { + "status": 200, + "body": { + "is_paginated": false, + "items": [ + { + "auth_methods": [ + { + "contact_channel": { + "email": "@stack-generated.example.com", + "type": "email", + }, + "type": "otp", + }, + ], + "auth_with_email": true, + "client_metadata": null, + "client_read_only_metadata": null, + "connected_accounts": [], + "display_name": null, + "has_password": false, + "id": "", + "last_active_at_millis": , + "oauth_providers": [], + "primary_email": "@stack-generated.example.com", + "primary_email_verified": true, + "profile_image_url": null, + "requires_totp_mfa": false, + "selected_team": null, + "selected_team_id": null, + "server_metadata": null, + "signed_up_at_millis": , + }, + ], + }, + "headers": Headers {