I haven't looked at the other Marketplace tests, but it seems to me that all the code starting here and up to and including https://github.com/mozilla/gaia-ui-tests/pull/1046/files#L3R45 could be encapsulated into a `login` method on the marketplace app object. It is used twice in this test alone, and I'd guess it could be useful in other tests as well.