lookit / lookit-api

Codebase for Lookit v2 and Experimenter v2. Includes an API. Docs: http://lookit.readthedocs.io/
https://lookit.mit.edu/
MIT License
10 stars 18 forks source link

QA: Redirect from lookit.mit.edu to childrenhelpingscience.com #1355

Closed okaycj closed 5 months ago

okaycj commented 6 months ago

Summary

It was requested that our two-domain solution be replaced with a redirect from any mit.edu domain to {children|babies}helpingscience.com: #1352

We have implemented this on the staging site and now need to test it before making it live on production.

QA

Domain Replacement

All requests of the site should replace just the domain. The path and query string should remain untouched and present. Here are some examples of URLs. The left column is the original old URL and the right is what the old URL should transform into. Please feel free to add any notable tests to this table. Also, in case you didn't know, holding cmd/win key while clicking will preserve this tab and open the site in another one.

Old New
Base https://lookit-staging.mit.edu/ https://babieshelpingscience.com/
Login with next query string https://lookit-staging.mit.edu/login/?next=%2F https://babieshelpingscience.com/login/?next=%2F
Researcher studies link /w search query string https://lookit-staging.mit.edu/exp/studies/mystudies?match=blah&sort=name&state=myStudies&page=1 https://babieshelpingscience.com/exp/studies/mystudies?match=blah&sort=name&state=myStudies&page=1
Labs page with search querystring https://lookit-staging.mit.edu/exp/labs/?match=asdf&set=myLabs&page=1 https://babieshelpingscience.com/exp/labs/?match=asdf&set=myLabs&page=1
Study link https://lookit-staging.mit.edu/studies/87b437cd-0cc8-49a0-b175-6a51ed1bd5d5/ https://babieshelpingscience.com/studies/87b437cd-0cc8-49a0-b175-6a51ed1bd5d5/

Study Announcement Emails

In emails sent from the staging site, the domain for study links should now be babieshelpingscience.com (https://github.com/lookit/lookit-api/issues/1336). E.g. in this study announcement text:

You and your child can participate any time you want by going to "Study Name!".

The domain for the "Study Name!" link should be babieshelpingscience.com.

You will have to create an account on the staging site and register a child. The child will have to be eligible for an existing study. Once you have your account with a child, you will have wait some time for an email to arrive at the parent's email address.

Exit URL

When creating a new study on the staging site, the study's default exit URL should now use the babieshelpingscience.com domain (https://github.com/lookit/lookit-api/issues/1274).

Go to https://lookit-staging.mit.edu/exp/studies/create/, scroll down to the exit URL field, and double-check that the domain is correct.

becky-gilbert commented 5 months ago

@okaycj @ianchandlercampbell I've tested everything here. A few things:

  1. The pipe and AWS Lambda API calls were failing because of the domain change. Both got a 405 HTTP response error. I've changed Pipe's staging environment and the Lambda staging function to use the babieshelpingscience domain, and can confirm that both are working now. We'll need to make sure that we change the domain for the Pipe and Lambda production webhooks whenever the production release goes out.
  2. Are there other lookit API consumers that will encounter similar errors was above? (I think the study response API calls aren't affected because the studies are hosted on the same domain, so they are relative paths.)
  3. I haven't received a study announcement email from staging and don't know how to trigger one, so I wasn't able to check that.