[marionette-js-client] Implement new action chain marionette apis

RESOLVED FIXED

Status

Firefox OS
General
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: lightsofapollo, Assigned: evanxd)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [FT: Productivity], [Sprint: 1])

Attachments

(2 attachments)

(Reporter)

Description

5 years ago
Should directly mirror the python api https://mxr.mozilla.org/mozilla-central/source/testing/marionette/client/marionette/marionette.py#104.
(Reporter)

Comment 1

5 years ago
Hey Evan,

Here is more docs for the existing marionette js client functionality:

https://github.com/mozilla-b2g/marionette_js_client

Take a look let me know what you think.
Flags: needinfo?(evanxd)
Component: General → Gaia::Clock
A Pivotal Tracker story has been created for this Bug: http://www.pivotaltracker.com/story/show/53204465
Component: Gaia::Clock → General
Dylan Oliver deleted the linked story in Pivotal Tracker
(Reporter)

Comment 4

5 years ago
marionette python examples:

http://mxr.mozilla.org/mozilla-central/source/testing/marionette/client/marionette/tests/unit/test_multi_finger.py
(Reporter)

Comment 5

5 years ago
To be clear we want to implement the functionality from Actions and MultiActions.

Quick code example:

var action = new Marionette.Action();
action.press(element).move(element).wait(3).release();

We should define the entire API first but it should be fairly clear as long as we follow the python examples.
(Assignee)

Updated

5 years ago
Flags: needinfo?(evanxd)
(Assignee)

Updated

5 years ago
Assignee: nobody → evanxd
(Assignee)

Comment 6

5 years ago
Created attachment 779203 [details]
multi-actions-errors.log
(Assignee)

Updated

5 years ago
Attachment #779203 - Attachment mime type: text/x-log → text/plain
(Assignee)

Comment 7

5 years ago
Hi James,

It is the WIP patch https://github.com/evanxd/marionette_js_client/commit/8bfba0b51f3539480c6436134dc16776ce88b50c. The implementation, testing, and documentation of Actions is done.

But I have problems with MultiActions implementations.
The MultiActions cannot work in B2G desktop build client.
It always showed the below errors:
https://bug892257.bugzilla.mozilla.org/attachment.cgi?id=779203

And we could use the below example for seeing the errors:
https://github.com/evanxd/marionette_js_client/blob/8bfba0b51f3539480c6436134dc16776ce88b50c/playground/multi-actions.js.

And I am working on this issue. If you know the clues for fixing it, please help me.
Thanks. :)
Flags: needinfo?(jlal)
(Reporter)

Comment 8

5 years ago
Evan this looks awesome! I will try to figure out what the error is...

The only other thing I would like to see is an "integration" test (see test/integration) that actually starts a b2g-desktop instance and runs a set of actions.
Flags: needinfo?(jlal)
(Reporter)

Comment 9

5 years ago
Interesting looks like marionette throws an error for me?

  error: 
   { message: 'doc.createTouch is not a function',
     stacktrace: 'createATouch@chrome://marionette/content/marionette-listener.js:781\nsetDispatch@chrome://marionette/content/marionette-listener.js:966\nmultiAction@chrome://marionette/content/marionette-listener.js:1052\n' } }
See bug 890079, sounds like a similar issue.
(Assignee)

Comment 11

5 years ago
Hi all,

The issue in Comment 8 is due to Marionette server side in B2G desktop client.
The MultiActions APIs could run correctly with using real device.

And the Marionette Python Client also has the issue when we use B2G desktop client.
We already filed a bug for that in https://github.com/mozilla/gaia-ui-tests/issues/1137.
(Assignee)

Comment 12

5 years ago
Created attachment 780410 [details]
The pull request

Hi James,

I already the integration test for the Actions module.

Please help me review the patch.

Thanks. :)
Attachment #780410 - Flags: review?(jlal)
(Assignee)

Updated

5 years ago
Attachment #780410 - Attachment description: pull-request.html → The pull request
(Reporter)

Comment 13

5 years ago
Comment on attachment 780410 [details]
The pull request

r=me looks fantastic!

We might want some more docs on how to use these things in the future but that will probably define itself as we use the api to write real tests.
Attachment #780410 - Flags: review?(jlal) → review+
(Reporter)

Comment 14

5 years ago
https://github.com/mozilla-b2g/marionette_js_client/commit/4c192ffd1e013209327ae11f7126f6cea0894f8e
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
(Assignee)

Comment 15

5 years ago
Hi James,

OK, I got it.

Thanks. :)
Dylan Oliver changed story state to accepted in Pivotal Tracker
Whiteboard: [FT: Productivity], [Sprint: 1]
You need to log in before you can comment on or make changes to this bug.