JabRef / JabRefOnline

https://www.jabref.org
MIT License
31 stars 9 forks source link

Deployment task fails due to some api test #2428

Open Siedlerchr opened 3 months ago

Siedlerchr commented 3 months ago

https://github.com/JabRef/JabRefOnline/actions/runs/9521419725/job/26248786681

Run pnpm test:api

> jabref-online@1.0.0 test:api D:\a\JabRefOnline\JabRefOnline
> vitest e2e.test.ts

[warn] [nuxt-og-image] Nuxt OG Image is enabled but SSR is disabled.

You should enable SSR (`ssr: true`) or disable the module (`ogImage: { enabled: false }`).

 RUN  v1.6.0 D:/a/JabRefOnline/JabRefOnline

 ✓ server/e2e.test.ts  (2 tests) 1065ms
 ✓ server/api.e2e.test.ts  (4 tests) 1652ms
 ❯ server/user/e2e.test.ts  (4 tests | 2 failed | 1 skipped) 2092ms
   ❯ server/user/e2e.test.ts > mutation > login > sets the cookie
     → expected { login: { problems: [ { …(2) } ] } } to strictly equal { Object (login) }
   ❯ server/user/e2e.test.ts > query > me > returns the user when logged in
     → expected { me: null } to strictly equal { Object (me) }
 ✓ server/getLatestRelease.e2e.test.ts  (1 test) 543ms
Vitest Annotations

AssertionError: expected { login: { problems: [ { …(2) } ] } } to strictly equal { Object (login) }

- Expected
+ Received

  Object {
    "login": Object {
-     "user": Object {
-       "id": "ckn4oul7100004cv7y3t94n8j",
+     "problems": Array [
+       Object {
+         "message": "Wrong email or password",
+         "path": Array [
+           "email",
+           "password",
+         ],
        },
+     ],
    },
  }

 ❯ server/user/e2e.test.ts:31:20
     29|         })
     30|       expect(errors).toEqual(undefined)
     31|       expect(data).toStrictEqual({
       |                    ^
     32|         login: { user: { id: 'ckn4oul7100004cv7y3t94n8j' } },
     33|       })

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/2]⎯

 FAIL  server/user/e2e.test.ts > query > me > returns the user when logged in
AssertionError: expected { me: null } to strictly equal { Object (me) }

- Expected
+ Received

  Object {
-   "me": Object {
-     "id": "ckn4oul7100004cv7y3t94n8j",
-   },
+   "me": null,
  }

 ❯ server/user/e2e.test.ts:107:20
    105|       `)
    106|       expect(errors).toEqual(undefined)
    107|       expect(data).toStrictEqual({
       |                    ^
    108|         me: { id: 'ckn4oul7100004cv7y3t94n8j' },
    109|       })

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/2]⎯

 Test Files  1 failed | 3 passed (4)
      Tests  2 failed | 8 passed | 1 skipped (11)
   Start at  20:05:50
   Duration  4.31s (transform 452ms, setup 3.78s, collect 1.02s, tests 5.35s, environment 1ms, prepare 714ms)

 ELIFECYCLE  Command failed with exit code 1.
Error: Process completed with exit code 1.
tobiasdiez commented 5 days ago

Also happens for the staging env: https://github.com/JabRef/JabRefOnline/actions/runs/10899371994/job/30500814869 Need to think about how to have the test data also in the production db...