PRX/PRX.org-Frontend — pull request #44 by chrisrhoden (2014-04-16 20:03:42+00:00)
Title: Feat/producers desktop link

Desktop Version link at the bottom of account pages directs to the correct url.

Added the first e2e tests to verify the correct links.

This is definitely a hack, for a couple of reasons. Until https://github.com/PRX/prx.org/pull/15 rolls in (not sure why it hasn't yet) there's not a uniform way to address accounts. We can't wait until the state has loaded or else our analytics get all messed up, so I do it in this middle ground by adding an account-specific translation as part of the state resolution. It's ugly, but it's the only thing I could think of that will do what we need it to. Thankfully, once we get https://github.com/PRX/prx.org/pull/15 in and run the dedupe we will be able to take the hack out.

The other reason this is a hack is that by running our e2e tests on this repo, we're having to rely on production data for the sake of our tests and slowing them down significantly - up from ~ 3 minutes to ~ 7 minutes because we need to download and unpack the sauce connect package and start a tunnel. Obviously, this needs to change.

I'm using the half-way pretty urls because it's the only way I can avoid making a second request for individual accounts so I can get their user id. I know that we generally shy away from using them on v3 internally, but I thought the tradeoff was worth it here.

The gulpfile is starting to get a little long in the tooth, will likely need some love someday soon.