Robocop: Make editBookmark and checkBookmarkEdit methods available to other tests

RESOLVED FIXED in Firefox 22

Status

()

RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: AdrianT, Assigned: AdrianT)

Tracking

Trunk
Firefox 22
ARM
Android
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

6 years ago
Follow-up to Bug 817970 covering the modifications to the editBoolmark and checkBookmarkEdit in testBookmarksTab in order to make them accessible for other tests.

Probably the solution is to add the methods to BaseTest.java.in along with the getBookmarksList method which is needed in the methods to get the list of bookmarks
(Assignee)

Updated

6 years ago
Depends on: 817970
(Assignee)

Comment 1

6 years ago
Created attachment 726717 [details] [diff] [review]
Move editBookmark and checkBookmark in BaseTest

Moved the 2 methods in BaseTest. Added the ListView parameter to the methods to make sure the order of the bookmarks is the same as sometimes I have seen that the order in which the bookmarks are added in the ListView is not the same as the one they appear in

Link to try server run: https://tbpl.mozilla.org/?tree=Try&rev=6f9cd2e386da
Attachment #726717 - Flags: review?(jmaher)
Comment on attachment 726717 [details] [diff] [review]
Move editBookmark and checkBookmark in BaseTest

Review of attachment 726717 [details] [diff] [review]:
-----------------------------------------------------------------

This patch is nice and green on try server, I just have one spelling fix and a question about about:home.  I understand about:home was used in all the places for the original functions, but is this the most reliable set of text to wait for?

::: mobile/android/base/tests/BaseTest.java.in
@@ +563,5 @@
>          hitEnterAndWait();
>      }
>  
> +    /**
> +    * This method will edit the bookmark with index = bookmarkIndex from the lit of bookmarks

s/lit/list/

@@ +576,5 @@
> +        View child;
> +        mSolo.clickOnText("Bookmarks");
> +        child = list.getChildAt(bookmarkIndex);
> +        mAsserter.ok(child != null, "edit item can be retrieved", child != null ? child.toString() : "null!");
> +        waitForText("about:home");

can we really guarantee this?  There might not be another choice, but this seems fragile.
Attachment #726717 - Flags: review?(jmaher) → review+
(Assignee)

Comment 3

6 years ago
Created attachment 728969 [details] [diff] [review]
Move editBookmark and checkBookmark in BaseTest v1.1

Corrected the spelling error.

Changed the waitForText to wait for "about:home" or "Firefox". Although this is hardcoded "about:home" is a default bookmark and the other default bookmarks will have Firefox in the name so even if about:home is changed at least the others will most likely be there. In the worst possible case it will wait 30 seconds (the wait for text timeout) and will continue after the timeout - timeout that does not affect the test results since there is no general text that will always be in view.

This is green on try: https://tbpl.mozilla.org/?tree=Try&rev=a097b066093a
Attachment #726717 - Attachment is obsolete: true
Attachment #728969 - Flags: review?(jmaher)
Comment on attachment 728969 [details] [diff] [review]
Move editBookmark and checkBookmark in BaseTest v1.1

Review of attachment 728969 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks!
Attachment #728969 - Flags: review?(jmaher) → review+
https://hg.mozilla.org/mozilla-central/rev/5a569ac82c36
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 22
You need to log in before you can comment on or make changes to this bug.