1.6 KiB
Jasmine Javascript Unit Tests
Open browser to localhost:3000/teaspoon Test
##Custom URL Scheme handling
URLs starting as jamkazam:// are considered custom urls that can be used to open up / bring up the JK client program and load a screen or call an internal function.
Let's say a user clicks or submits a from which in turns call a custom URL. For example in the new react web interface, when a session is created using the form in https://www.jamkazam.com/sessions/new let's say it calls following custom URL
jamkazam://https//www.jamkazam.com/client#/createSession/custom~yes%7Cprivacy~2%7Cdescription~Testing%20session%20creation%20from%20beta%20website%7CinviteeIds~062deeba-b917-46e2-bfa3-e829405ca602
In the JK client this url is passed to the front end by the back end either by
-
onLoggedIn - This function is been called when the client is loaded (after user login). Used to handled the CustomUrl if the app is not already up and running
-
asyncJamClient 3012 event - If the app is up and running this event is fired with the CustomUrl
In either case the CustomUrl is stored in the localStorage and handled by the respective function being called.
Currently we have two customUrls
-
Session create by custom URL - call it using shell by open "jamkazam://www.jamkazam.com/client#/createSession/custom~yes%7Cprivacy~2%7Cdescription~Testing%20session%20creation%20from%20beta%20website%7CinviteeIds~062deeba-b917-46e2-bfa3-e829405ca602"
-
Join to an existing session open "jamkazam://www.jamkazam.com/client#/joinSession/custom~yes%7CsessionId~3190c211-f741-47d1-9171-05cf8df020d0"