Altinn / altinn-receipt

Altinn platform microservice for handling receipts
0 stars 3 forks source link

Receipt app is not using the `altinnPersistentContext` cookie for current language #259

Closed khanrn closed 7 months ago

khanrn commented 8 months ago

Description of the bug

While working on the #151 we found that this app isn't using the altinnPersistentContext set by the altinn.no and calling the /receipt/api/v1/users/current API every time to get the current language set by the user, which isn't working well for now as the /receipt/api/v1/users/current API is caching the output and therefore this app isn't getting the very recent change made by the user regarding the language in the frontend.

Steps To Reproduce

1.Log in to TT02 as 46886601549 (tenor login)

  1. Select the person "POSSESSIV BILLETTLUKE" if asked to pick a reportee
  2. Pick language any langauge, i.e. Nynorsk or English
  3. Visit the Archive section of the messagebox.
  4. Open one of the elements called "Tilgjengelig: formueinntekt-skattemelding-v2, 2022"
  5. Observe that the messagebox is using the app id and not the app title/name.
  6. Click the button "See submitted form"
  7. Then go back to the "inbox" tab.
  8. Change the language to something else.
  9. Again visit the Archive section of the messagebox.
  10. Open one of the elements called "Tilgjengelig: formueinntekt-skattemelding-v2, 2022"
  11. Observe that the messagebox is using the app id and not the app title/name.
  12. Click the button "See submitted form"
  13. You'll see the language hasn't changed.

Tasks

Related Issue

SandGrainOne commented 7 months ago

Let's consider this completed. I had some strange behaviour with language switching between nb and en during one of my tests, but I've been unable to recreate the issue.