mozilla / testpilot

Test Pilot is a platform for performing controlled tests of new product concepts in Firefox
https://testpilot.firefox.com/
250 stars 123 forks source link

Survey launched by "Give Feedback" button opens in current tab #642

Closed pdehaan closed 8 years ago

pdehaan commented 8 years ago

Found in http://testpilot.dev.mozaws.net/__version__ (70d7a7582fbd8b181bef7f8d3a1d1658171e97c9):

{ "source": "https://github.com/mozilla/testpilot",
  "commit": "70d7a7582fbd8b181bef7f8d3a1d1658171e97c9",
  "version": "" }

Steps to reproduce:

  1. Go to http://testpilot.dev.mozaws.net/experiments/tabcenter
  2. Click the [Give Feedback] button.

    Actual results:

It looks like the link tries to go to https://qsurvey.mozilla.com/s3/tabcenter?ref=givefeedback&experiment=Tab%20Center and implodes (HTTP 302) and redirects to http://www.surveygizmo.com/online-survey-not-found/?utm_source=Customer%2BSurveys&utm_medium=Redirect&utm_campaign=Online%2BSurvey%20Not%20Found&__sid=qsurvey.mozilla.com%2Fs3%2Ftabcenter (HTTP 404).

nothing_found_for_online_survey_not_found__utm_source_customer_2bsurveys_utm_medium_redirect_utm_campaign_online_2bsurvey_20not_20found___sid_qsurvey_mozilla_com_2fs3_2ftabcenter

pdehaan commented 8 years ago

Also possibly of note is that the "Give Feedback" button takes me to SurveyGizmo in the current browser tab. Not sure if we want to put that in a new window/tab so it doesn't replace my current Test Pilot browsing session.

lmorchard commented 8 years ago

These surveys don't actually fully exist, yet. They're being developed by another team. But, I think the URLs are correct.

Also possibly of note is that the "Give Feedback" button takes me to SurveyGizmo in the current browser tab.

That should be fixed, though. The surveys should open in a new window / tab.

lmorchard commented 8 years ago

That should be fixed, though. The surveys should open in a new window / tab.

Having said that, though, I can't reproduce that on my local machine or on the dev server. The survey does open in a new tab for me, and the code to make that happen looks correct.

lmorchard commented 8 years ago

Or, rather, I should say the URL pattern looks correct. The pattern is filled in with the "slug" of the experiment record, so we need to be sure it matches the survey URLs from the user advocacy team. In this case, the dev data has "tabcenter" but the survey is at "tab-center"

lmorchard commented 8 years ago

Can anyone else reproduce the not-opening-in-new-tab behavior? If I can't reproduce it, there's no action I can take on this issue, because everything looks correct otherwise

pdehaan commented 8 years ago

I can still reproduce it after enabling http://testpilot.dev.mozaws.net/experiments/tabcenter on FF Nightly (new profile).

issue-642

lmorchard commented 8 years ago

I can still reproduce it after enabling http://testpilot.dev.mozaws.net/experiments/tabcenter on FF Nightly (new profile).

Ugh. Okay, I take it back: I can reproduce on a fresh profile of release Firefox. For some reason, it's working as expected on my workaday Fx Dev Edition profile, no idea why yet

meandavejustice commented 8 years ago

This is probably because I am using the window.open().focus() trick https://github.com/mozilla/testpilot/blob/master/testpilot/frontend/static-src/app/main.js#L75

We'll probably get away from this weird method after we get around to #604

lmorchard commented 8 years ago

This issue is on the public launch blockers list, but #604 is not. So, adding #604 to public launch blockers.

lmorchard commented 8 years ago

(Alternatively, we can find a non-#604 fix or decide that this is not a public launch blocker)

lmorchard commented 8 years ago

(Also, tweaked title to reflect discussion)

lmorchard commented 8 years ago

Oh, wait! I think I found the problem, and it doesn't require #604.