-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Component/s: Rest API
-
Epic Link:
-
Tags:
-
Sprint:nxfit 11.1.9
-
Story Points:2
Install the nuxeo/nuxeo:master Docker image and run
yarn test user-enricher ● GET /user/USER_ID enrichers.users=userprofile > existing user profile expect(received).toMatchObject(expected) - Expected + Received @@ -1,13 +1,13 @@ Object { "contextParameters": Object { "userprofile": Object { "avatar": null, - "birthdate": "1980-12-20T00:00:00.000Z", + "birthdate": null, "gender": false, - "locale": "en", - "phonenumber": "06 78 65 98 45", + "locale": null, + "phonenumber": null, }, }, "entity-type": "user", "extendedGroups": Array [], "id": "joe", 50 | }); 51 | expect(statusCode).toBe(200); > 52 | expect(body).toMatchObject(JOE_USERPROFILE); | ^ 53 | }, 54 | ); 55 | at Object.toMatchObject (test/v1/user/user-enrichers.js:52:18)
This is because the /default-domain/UserWorkspaces document doesn't exist initially, so the user workspace creation fails with a 404 and so does the user profile one.
Let's:
- Create the user workspace root before the test.
- When possible, fail requests that don't return a 2XX status code during the setup/teardown phases. This should always be possible except for some cases, like when afterAll tries to delete a resource that has not been created by a test on purpose (unauthorized, conflict, etc.).
- is related to
-
NXP-27169 Add user profile enricher tests for the user endpoint
- Resolved