Closed Bug 1023087 Opened 10 years ago Closed 10 years ago

[Window Management] Marionette test for copy-paste

Categories

(Firefox OS Graveyard :: Gaia::System::Window Mgmt, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
2.0 S6 (18july)

People

(Reporter: gduan, Assigned: gduan)

References

Details

(Whiteboard: [p=4])

Attachments

(2 files)

We need marionette test for copy-paste.

Test cases should include,
1. long press text content, check dialog displaying
2. click cut button, and check text is removed
3. click other place of content, check dialog displaying which only contains paste button
4. click paste button, check the text is added or not
I'll disable the test til gecko is landed.
However, I'm now waiting for device's ready, since my unagi with special build cannot run marionette test.
hi George, can we finish this on June 13? Or can you use other device?
Flags: needinfo?(gduan)
Target Milestone: --- → 2.0 S3 (6june)
Attached file long-press.py
Hi Howie,
WIP,
https://github.com/cctuan/gaia/commit/1b48c006bb39653805a61666e8eb02afc99d6a03

I'm working on that. However, I found an API issues that blocks my progress.
I cannot execute longPress event on input field no matter in js marionette(see above wip commit) nor python marionette(see attachment), so that I cannot launch the text selection dialog for following marionette tests.

Hi Morris,
I saw our python marionette api from qa for long_press is like below
""    def long_press(self, element, time_in_seconds): ""
which is different with yours.
I think the our marionette are not the same?
Flags: needinfo?(gduan)
Hi George,
long_press api have been updated a few days ago. Please check bug 1020874.
Thanks Morris,

I've tried latest python-marionette from mozilla-central, but long-press still cannot work.

Now, I'm trying to reuse parts of text_selectioncarets.py from central and see if it works.
Hi Morris, 
I would need your help ..
is it possible for you to use my commit in comment 3 and check whether those events are sent or not? Perhaps print out debug log from backend.
Flags: needinfo?(mtseng)
Assignee: nobody → gduan
Status: NEW → ASSIGNED
Whiteboard: [p=4]
Will do. Keep the ni flag for reminding me.
Thanks,
you can also test it with the commit in comment 3,
and execute 
|make test-integration TEST_FILES=apps/system/test/marionette/copy_paste_test.js  MARIONETTE_RUNNER_HOST=marionette-device-host| to run on device.
According to our code [1], our tap action won't process by APZC. But longtap is fired by APZC so that the test is always fail. bug 932804 try to resolve this issue but not landed yet. :(
Flags: needinfo?(mtseng)
Attached file PR to master
I've modified the test cases as below.
1. tap input field, tap selectAll, tap copy, and tap another input field, and tap paste , and check the content.
2. tap input field, tap selectAll, tap cut, and check the content is cleaned, and tap another input field, and tap paste , and check the content.

I ignore long press test case til bug 932804 is fixed.

Hi Evan,
could you take a look of this patch?
Thanks.
Attachment #8444853 - Flags: review?(evanxd)
Hi George,

I added comments for your patch.

Thanks.
Flags: needinfo?(gduan)
Hi George,

I added comments for the patch.

Thanks.
Comment on attachment 8444853 [details] [review]
PR to master

Hi Evan,
after rebase to latest master, the marionette stable test seems very stable. 
could you review my patch again? Thanks.
Flags: needinfo?(gduan)
Target Milestone: 2.0 S3 (6june) → 2.0 S6 (18july)
Hi George,

I added some commands.
Nice, keep the tests stable.

Thanks.
Flags: needinfo?(gduan)
Hi Evan,
issues addressed and stable tests seems pass.
Please kindly check again, thanks.
Flags: needinfo?(gduan) → needinfo?(evanxd)
Comment on attachment 8444853 [details] [review]
PR to master

Hi George,

Nice work!
Just have some nits for the patch.
Please fix them before doing merge.

Thanks.
Attachment #8444853 - Flags: review?(evanxd) → review+
Flags: needinfo?(evanxd)
Thanks Evan,

tbpl passed (only one expected Gi error)
https://tbpl.mozilla.org/?rev=4a3c4093af45aea5b769ca9dcc9ad084c73aceea&tree=Gaia-Try

merge to master,
https://github.com/mozilla-b2g/gaia/commit/90b96cada15403ae13dadd8090a804ad7c648774
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: