mozilla-rally / rally-sdk

This is the Rally partner support library, `rally.js`, used to manage the lifecycle of Rally studies.
0 stars 4 forks source link

Add rally web platform support #9

Closed rhelmer closed 3 years ago

rhelmer commented 3 years ago

This adds support for Firebase, and for handling messaging between the website and the extension that is embedding the SDK.

Closes issue #5

rhelmer commented 3 years ago

I think this is good enough to land; it has some basic unit tests and I built the integration test with it.

rhelmer commented 3 years ago

I shored up the mocks some more so we can actually test when onSnapshot is registered - still need to go a little further and be able to subsequently call onSnapshot (like we do with onAuthStateChanged) but I want to investigate a bit more and see if there's a better way to do this with Jest, I suspect there is.

rhelmer commented 3 years ago

I'm testing this by embedding it in a test extension in https://github.com/mozilla-rally/rally-web-platform/pull/101 - once tests over there pass I think we'll be good to land this, and then I'll switch this PR to use the release version.