[mozmill] Enhance tests for opening a link in a new tab (foreground / background)

RESOLVED FIXED

Status

RESOLVED FIXED
9 years ago
8 years ago

People

(Reporter: whimboo, Assigned: Tobbi)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 7 obsolete attachments)

(Reporter)

Description

9 years ago
We should enhance the Mozmill tests for the Litmus tests 8087/8088 (both 3.6) and 6045/6046 to check the correct tab opening behavior.

For 3.5 the new tabs should appear at the end of the tab bar while in 3.6 they are appended right next to the current tab.
(Reporter)

Comment 1

9 years ago
I have added two new files to our Litmus storage we can use for this test. Both can be found here: http://hg.mozilla.org/webtools/litmus/rev/e7d25bd82eba.

The sync will happen soon so they should appear here:
https://litmus.mozilla.org/testcase_files/firefox/tabbedbrowsing/openinnewtab.html

I will update the Litmus tests accordingly before we start with the Mozmill test. Tobbi, you wanna take it?
(Reporter)

Comment 2

9 years ago
All Litmus tests have been updated. Tobbi, if you want to take the bug please assign yourself.

Here some notes:
* We should have two separate patches for 1.9.2 and 1.9.1
* We will make use of the local httpd server to open the testcase files
(Assignee)

Comment 3

9 years ago
Okay, I'm taking this and will deal with it tomorrow.
Assignee: nobody → tobbi.bugs
Status: NEW → ASSIGNED
(Reporter)

Updated

9 years ago
Depends on: 531392, 536043
(Assignee)

Comment 4

9 years ago
Created attachment 420373 [details] [diff] [review]
WIP: Rewriting testOpenInBackground.js to use the httpd server

This is testOpenInBackground.js rewritten to use the new local server.
Attachment #420373 - Flags: review?(hskupin)
(Reporter)

Comment 5

9 years ago
Comment on attachment 420373 [details] [diff] [review]
WIP: Rewriting testOpenInBackground.js to use the httpd server

Resetting review flag based on our conversation on IRC.
Attachment #420373 - Flags: review?(hskupin)
(Assignee)

Comment 6

9 years ago
Created attachment 420899 [details] [diff] [review]
Rewritten both tests to use the local server and improved the code structure

Current proposal of both tabs
Attachment #420373 - Attachment is obsolete: true
Attachment #420899 - Flags: review?(hskupin)
(Reporter)

Comment 7

9 years ago
Comment on attachment 420899 [details] [diff] [review]
Rewritten both tests to use the local server and improved the code structure

Looks good so far. I have made some little changes like white space cleanup and removing the waitForPageLoad calls because they are not necessary when using waitForElement.
Attachment #420899 - Flags: review?(hskupin) → review+
(Reporter)

Comment 8

9 years ago
Landed for 1.9.2:
http://hg.mozilla.org/qa/mozmill-tests/rev/a42f2108669d

Tobias, can you please update the tests for 1.9.1? Please use the latest changes for that.
(Assignee)

Comment 9

9 years ago
Created attachment 421486 [details] [diff] [review]
enhancing tabbed browsing tests for 1.9.0 (firefox 3.5)

This should be the tests for Firefox 3.5
Attachment #421486 - Flags: review?(hskupin)
(Reporter)

Updated

9 years ago
Attachment #421486 - Flags: review?(hskupin) → review-
(Reporter)

Comment 10

9 years ago
Comment on attachment 421486 [details] [diff] [review]
enhancing tabbed browsing tests for 1.9.0 (firefox 3.5)

Please check the open in forground test. It fails each time. You should not close the 2nd tab but the currently selected one.
(Reporter)

Comment 11

9 years ago
Tobbi, do you have an update for me?
(Reporter)

Comment 12

9 years ago
Now that bug 537330 has been landed on the 1.9.1 branch can you fix both of the tests for 1.9.1?
Depends on: 537330
(Assignee)

Comment 13

9 years ago
Created attachment 424488 [details] [diff] [review]
Current working proposal, however, closeAllTabs(controller) doesn't seem to work

This is what seems to work with the command line interface. However, TabbedBrowsingAPI.closeAllTabs(controller) doesn't close all the tabs, but leaves the homepage tab intact whilst loading the testcase in another tab. Can anyone confirm this?
(Reporter)

Comment 14

9 years ago
The patch cannot be applied. It fails. Looks like your local repository has been messed up. Please check if you really have the latest revision from the mozilla1.9.1 branch.
(Assignee)

Comment 15

9 years ago
Created attachment 424563 [details] [diff] [review]
This is a thing that works, however, closeAllTabs doesn't seem to close *all* the tabs, one tab remains
Attachment #424488 - Attachment is obsolete: true
(Assignee)

Comment 16

9 years ago
Created attachment 425190 [details] [diff] [review]
testOpenInForeground.js, corrected for 3.5. This is a thing that should finally work.

I think I finally got the hang out of it. I hope it is okay that I hardcoded the number of the latest opened tab in l. 120. 

At least *this* patch passes for me all the time on 3.5.
Attachment #425190 - Flags: review?(hskupin)
(Assignee)

Updated

9 years ago
Attachment #424563 - Attachment is obsolete: true
(Reporter)

Comment 17

9 years ago
Comment on attachment 425190 [details] [diff] [review]
testOpenInForeground.js, corrected for 3.5. This is a thing that should finally work.

Sorry to give a r- but those tests do not use the TabbedBrowsingAPI. Please compare with the tests from the default branch for the needed updates.
Attachment #425190 - Flags: review?(hskupin) → review-
(Assignee)

Comment 18

9 years ago
Created attachment 425903 [details] [diff] [review]
testOpenInForeground.js, Double-checked and using the new tabbedBrowsingAPI now
Attachment #425190 - Attachment is obsolete: true
Attachment #425903 - Flags: review?(hskupin)
(Reporter)

Comment 19

9 years ago
Comment on attachment 425903 [details] [diff] [review]
testOpenInForeground.js, Double-checked and using the new tabbedBrowsingAPI now

(In reply to comment #18)
> Created an attachment (id=425903) [details]
> testOpenInForeground.js, Double-checked and using the new tabbedBrowsingAPI now

Sorry to bug again but what about the opening in the background test? I miss it in your patch. If you wanted to see a r+ first then you get a formal one now. Please update the patch so it includes both tests.
Attachment #425903 - Flags: review?(hskupin)
(Assignee)

Comment 20

9 years ago
Created attachment 425960 [details] [diff] [review]
All tabbed tests for 3.5

This is both open tabs tests for 3.5.
Attachment #420899 - Attachment is obsolete: true
Attachment #421486 - Attachment is obsolete: true
Attachment #425903 - Attachment is obsolete: true
Attachment #425960 - Flags: review?(hskupin)
(Reporter)

Comment 21

9 years ago
Comment on attachment 425960 [details] [diff] [review]
All tabbed tests for 3.5

Thanks Tobbi. I will give r+ even when I had to do some style corrections. But what is more important I had to add another waitForPageLoad call right before the following statement. The test was failing all the time when I run the whole test folder. Please check that the next time and run all the tests.

>+  // Verify that the order of tabs is correct
>+  for each(tab in gTabOrder) {
>+    var linkId = new elementslib.ID(controller.tabs.getTab(tab.index), "id");
>+    controller.waitForElement(linkId);
>+    controller.assertText(linkId, tab.linkid);
>+  }
Attachment #425960 - Flags: review?(hskupin) → review+
(Reporter)

Comment 22

9 years ago
Landed on 1.9.1 as:
http://hg.mozilla.org/qa/mozmill-tests/rev/c12efe587208
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
(Reporter)

Comment 23

8 years ago
Mass move of Mozmill Test related project bugs to newly created components. You can filter out those emails by using "Mozmill-Tests-to-MozillaQA" as criteria.
Component: Tabbed Browser → Mozmill Tests
Product: Firefox → Mozilla QA
QA Contact: tabbed.browser → mozmill-tests
Version: 3.6 Branch → unspecified
You need to log in before you can comment on or make changes to this bug.