Closed Bug 822964 Opened 12 years ago Closed 11 years ago

marionette tests for native identity

Categories

(Core Graveyard :: Identity, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: jedp, Assigned: jedp)

References

Details

Attachments

(1 file)

We would like to have front-end tests in CI that prove that the native identity implementation works on device through the navigator.id dom calls, with the Trusty UI, etc.
I have a functional example. Here's a movie of it working: https://vimeo.com/55900520 Here's the code: https://github.com/jedp/gaia-ui-tests/commit/9920b4c8cfab27f70a15eed8ec2e284cbe8b25fc Before I submit a PR for gaia-ui-tests, I need to resolve - where the gaia test_app will live (uitests or separate) - how to clear system app cookies and localStorage That last one is scary. No-one I've talked to yet knows how to do that from marionette. Not sure what the best approach will be, but I need to be able to clear the state for Persona in these tests.
Depends on: 822963
(In reply to Jed Parsons [:jparsons] from comment #1) > I have a functional example. Here's a movie of it working: > > https://vimeo.com/55900520 Updated, with more tests: http://vimeo.com/56116016 > Here's the code: Now with more tests! https://github.com/jedp/gaia-ui-tests/commit/5b6c15323aee4b13cc3b572c756baa4df87e0c38 > Before I submit a PR for gaia-ui-tests, I need to resolve > - where the gaia test_app will live (uitests or separate) In uitests seems best - keeps all the tests in one place https://github.com/jedp/gaia/commit/6b851aff741547d979b29545cd831c996c7467fb > - how to clear system app cookies and localStorage Will work on this next
Clearing state tracked in Bug 823566
Attached file gaia-ui-tests PR 249
Marionette tests to exercise native identity and Trusty UI
Attachment #700615 - Flags: review?(jgriffin)
Comment on attachment 700615 [details] gaia-ui-tests PR 249 Moving primary reviewer to Zac, who is our Gaia UI tests master.
Attachment #700615 - Flags: review?(zcampbell)
Attachment #700615 - Flags: review?(jgriffin)
Attachment #700615 - Flags: feedback?(jgriffin)
AutomatedTester, can you look at https://github.com/mozilla/gaia-ui-tests/pull/249, there's a question for you there.
jgriffin, AutomatedTester and I have talked a bit on IRC about clearing http-only cookies for the system app and resetting localStorage, and we haven't worked it out yet. I don't think this is blocked on that, though. I've written the tests to account for the possibility of some browserid state already being set.
Comment on attachment 700615 [details] gaia-ui-tests PR 249 This looks good to me, but we should get Zac's feedback as well. One thing that may need to change is that Gaia recently deprecated mouse events, which causes things like self.marionette.find('foo').click() not to work any longer, for most apps at least. Instead, you have to use tap() events, and the syntax is slightly different, due to issues with the WebDriver spec: self.marionette.tap(self.marionette.find_element('foo')) You'd need to run your tests on a current build to determine if these changes are needed.
Attachment #700615 - Flags: feedback?(jgriffin) → feedback+
See bug 823619 for a discussion of these changes.
jgriffin good to know. click() works at present, but I will update the tests to use tap().
I'm not getting any love from tap() on desktop, only click(). But I can easily work around it with this solution: def hit(self, element): """ A wrapper that calls tap() on device builds, and click() on desktop builds. Since tap() does not work on desktop, and click() does not work on device, we must do something. """ if self.isDesktopBuild(): element.click() else: self.marionette.tap(element)
Jed and Edwong are working on a new version of this.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
Attachment #700615 - Flags: review?(zcampbell)
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: