Fix openAboutHomeTab to work with the changes to the tablet about:home UI

RESOLVED FIXED in Firefox 26

Status

()

defect
P1
normal
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: AdrianT, Assigned: AdrianT)

Tracking

Trunk
Firefox 26
ARM
Android
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [fixed-fig])

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

6 years ago
Posted patch openAboutHomeTabFix.patch (obsolete) — Splinter Review
It seems that waitForEnabledText does not work anymore for this test since in the Tablet UI  the tabs titles are now always enabled. I am adding a waitForAboutHomeTab method to wait for the tab to be changed after dragging left or right. This should fix the fails of testWebContentContextMenu.
Attachment #792189 - Flags: review?(lucasr.at.mozilla)
Comment on attachment 792189 [details] [diff] [review]
openAboutHomeTabFix.patch

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

Good.

::: mobile/android/base/tests/AboutHomeTest.java.in
@@ +307,5 @@
>          }
>      }
>  
> +   // A wait in order for the about:home tab to be rendered after drag/tab selection
> +    private void waitForAboutHomeTab(final int tabNumber) {

Rename to tabIndex.

@@ +312,5 @@
> +        boolean correctTab = waitForTest(new BooleanTest() {
> +            @Override
> +            public boolean test() {
> +              ViewPager pager = (ViewPager)mSolo.getView(ViewPager.class, 0);
> +              if (pager.getCurrentItem() == tabNumber) {

Change that to simply:

return (pager.getCurrentItem() == tabNumber)

@@ +334,5 @@
>          ViewPager pager = (ViewPager)mSolo.getView(ViewPager.class, 0);
>          switch (tab) {
>              case BOOKMARKS : {
> +                mSolo.clickOnText(BOOKMARKS_LABEL);
> +                waitForAboutHomeTab(aboutHomeTabs.indexOf(tab.toString()));

tab.toString() -> BOOKMARKS_LABEL ?
Attachment #792189 - Flags: review?(lucasr.at.mozilla) → review+
(Assignee)

Comment 2

6 years ago
Made the requested changes
Attachment #792189 - Attachment is obsolete: true
Priority: -- → P1
The orangeness in the try build is caused by an intermittent failure in testWebContentContextMenu which has been backed out now.

Pushed: https://hg.mozilla.org/projects/fig/rev/1d639fdd1f26
Whiteboard: [fixed-fig]
https://hg.mozilla.org/mozilla-central/rev/1d639fdd1f26
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 26
You need to log in before you can comment on or make changes to this bug.