Robocop: Make editBookmark and checkBookmarkEdit methods available to other tests

RESOLVED FIXED in Firefox 22



6 years ago
6 years ago


(Reporter: AdrianT, Assigned: AdrianT)


Firefox 22

Firefox Tracking Flags

(Not tracked)



(1 attachment, 1 obsolete attachment)



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 along with the getBookmarksList method which is needed in the methods to get the list of bookmarks


6 years ago
Depends on: 817970

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:
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/
@@ +563,5 @@
>          hitEnterAndWait();
>      }
> +    /**
> +    * This method will edit the bookmark with index = bookmarkIndex from the lit of bookmarks


@@ +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+

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:
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]:

Attachment #728969 - Flags: review?(jmaher) → review+
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.