aeharding / voyager

Voyager — a beautiful app for Lemmy
https://vger.app
GNU Affero General Public License v3.0
1.5k stars 168 forks source link

Override lemmy server URL when 'VITE__TEST_MODE' is set #1593

Closed aashu16 closed 2 months ago

aashu16 commented 3 months ago

After the user logs in, state.auth.currentInstance changes from <hostname>:<PORT> to <hostname> [1]. Setting VITE__TEST_MODE=1 will override this behaviour with a couple of small changes and no side-effects. Using this var name because similar overrides might be needed elsewhere in the future and this should cover most (or all) of them.

Also updated the build step in e2e action.

[1]: Lemmy sets the iss claim to hostname when creating JWTs. authSlice.addJwt updates state.auth.currentInstance with the value of this claim.

aashu16 commented 3 months ago

Missed an import. Added in the second commit.