Closed
Bug 826261
Opened 8 years ago
Closed 8 years ago
Robocop: Add test for Share Link option from the Firefox Mobile Menu
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 20
People
(Reporter: AdrianT, Assigned: AdrianT)
References
Details
Attachments
(1 file, 2 obsolete files)
6.10 KB,
patch
|
Details | Diff | Splinter Review |
This Robocop test covers the share link feature. It tests that all available share options are displayed in the share options list. Moztrap test case: https://moztrap.mozilla.org/manage/case/295/
Assignee | ||
Updated•8 years ago
|
Attachment #697430 -
Flags: review?(jmaher)
![]() |
||
Comment 1•8 years ago
|
||
Comment on attachment 697430 [details] [diff] [review] Share Link test Review of attachment 697430 [details] [diff] [review]: ----------------------------------------------------------------- ::: mobile/android/base/tests/testShareLink.java.in @@ +96,5 @@ > + } > + > + private boolean optionDisplayed(String shareOption, ArrayList<String> displayedOptions) { > + for (String displayedOption: displayedOptions) { > + if (shareOption == displayedOption) { Use .equals in preference to == for string comparison. @@ +115,5 @@ > + return true; > + } > + return false; > + } > + }, WAIT_FOR_TEST_TIMEOUT); Use BaseTest.MAX_WAIT_MS - https://hg.mozilla.org/mozilla-central/file/6955309291ee/mobile/android/base/tests/BaseTest.java.in#l35 - unless you really need a different timeout value.
Assignee | ||
Comment 2•8 years ago
|
||
Made the changes requested by Geoff
Attachment #697430 -
Attachment is obsolete: true
Attachment #697430 -
Flags: review?(jmaher)
Attachment #697438 -
Flags: review?(jmaher)
Comment 3•8 years ago
|
||
Comment on attachment 697438 [details] [diff] [review] Share Link test v1.1 Review of attachment 697438 [details] [diff] [review]: ----------------------------------------------------------------- Thanks for the patch. please upload a new patch with the nit's addressed and I can land. This passes consistently while running locally! ::: mobile/android/base/tests/testShareLink.java.in @@ +51,5 @@ > + } > + return shareOptions; > + } > + > + public void verifyOptions(ArrayList<String> shareOptions){ nit: space between ){ @@ +53,5 @@ > + } > + > + public void verifyOptions(ArrayList<String> shareOptions){ > + Device device = new Device(); > + if (device.version == "2.x") { how about "device.version.equals("2.x")" @@ +58,5 @@ > + ArrayList<String> displayedOptions = new ArrayList(); > + ListView shareMenu = getDisplayedShareList(); > + > + /* Will have to go in the ListView, get each child, for the child separate the icon and the label > + and from the label get the label text in a String Array */ nit: align the two lines of text: /* Will .. and ... */ @@ +59,5 @@ > + ListView shareMenu = getDisplayedShareList(); > + > + /* Will have to go in the ListView, get each child, for the child separate the icon and the label > + and from the label get the label text in a String Array */ > + for (int i = 0; i < shareMenu.getAdapter().getCount();i++){ nit: space between ){ @@ +82,5 @@ > + } > + > + for (String option:shareOptions) { > + // Verify if the option is present in the list of displayed share options > + mAsserter.ok(optionDisplayed(option,displayedOptions), "Share option found", option); nit: space between (option, displayedOptions) @@ +118,5 @@ > + }, MAX_WAIT_MS); > + mAsserter.ok(success,"Got the displayed share options?", "Got the share options list"); > + return list; > + } > + nit: extra whitespace.
Attachment #697438 -
Flags: review?(jmaher) → review+
Assignee | ||
Comment 4•8 years ago
|
||
Cleaned up the patch as requested
Attachment #697438 -
Attachment is obsolete: true
Comment 5•8 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/5a20d8fd94cd
Assignee: nobody → adrian.tamas
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 20
Updated•2 months ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•