Closed Bug 586997 Opened 15 years ago Closed 15 years ago

Update Mozmill tests and shared modules for TabCandy landing

Categories

(Mozilla QA Graveyard :: Mozmill Tests, defect)

defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: kbrosnan, Assigned: whimboo)

References

Details

(Whiteboard: [Aug-13-testday])

Attachments

(1 file, 2 obsolete files)

42 test failed when running MozMill against today's trunk because the path for mainPopupSet changed. Some of the failures are covered by bug 586991. Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b4pre) Gecko/20100813 Minefield/4.0b4pre ERROR | Test Failure: {"exception": {"message": "Expression \"id(\"mainPopupSet\")\" returned null. Anonymous == false", "lineNumber": 463, "stack": "Error(\"Expression \\\"id(\\\"mainPopupSet\\\")\\\" returned null. Anonymous == false\")@:0\n([object XULElement],\"id(\\\"mainPopupSet\\\")\",2,[object Array])@resource://mozmill/modules/elementslib.js:463\n()@resource://mozmill/modules/elementslib.js:478\n()@resource://mozmill/modules/frame.js -> file:///c:/src/qa/mozmill-tests/shared-modules/testToolbarAPI.js:125\n()@resource://mozmill/modules/controller.js:458\n()@resource://mozmill/modules/controller.js:458\nwaitFor((function () {return eval(expression);}),5000,100,\"controller.waitForEval: Timeout exceeded for 'subject.selectedIndex == 0'\")@resource://mozmill/modules/utils.js:402\n(\"subject.selectedIndex == 0\",5000,100,[object Object])@resource://mozmill/modules/controller.js:459\n()@resource://mozmill/modules/frame.js -> file:///c:/src/qa/mozmill-tests/firefox/testAwesomeBar/testAccessLocationBar.js:86\n((function () {for each (website in websites) {locationBar.loadURL(website);controller.waitForPageLoad();}controller.sleep(4000);locationBar.clear();controller.keypress(locationBar.urlbar, \"VK_DOWN\", {});controller.sleep(gDelay);controller.keypress(locationBar.urlbar, \"VK_DOWN\", {});controller.sleep(gDelay);controller.waitForEval(\"subject.selectedIndex == 0\", gTimeout, 100, locationBar.autoCompleteResults);locationBar.contains(\"getpersonas\");controller.keypress(null, \"VK_RETURN\", {});controller.waitForPageLoad();var personasImage = new elementslib.XPath(controller.tabs.activeTab, \"/html/body/div[@id='outer-wrapper']/div[@id='inner-wrapper']/div[@id='nav']/h1/a/img\");controller.waitForElement(personasImage, gTimeout, 100);locationBar.contains(\"getpersonas\");}))@resource://mozmill/modules/frame.js:514\n([object Object])@resource://mozmill/modules/frame.js:582\n([object Object])@resource://mozmill/modules/frame.js:625\n(\"c:\\\\src\\\\qa\\\\mozmill-tests\\\\firefox\")@resource://mozmill/modules/frame.js:455\n(\"c:\\\\src\\\\qa\\\\mozmill-tests\\\\firefox\")@resource://mozmill/modules/frame.js:631\n((function (dir, invokedFromIDE) {var runner = new Runner(new Collector, invokedFromIDE);runner.runTestDirectory(dir);runner.end();return true;}),[object Array])@resource://jsbridge/modules/server.js:164\n(\"ff1aaecf-a6e3-11df-88c5-002622dfe102\",(function (dir, invokedFromIDE) {var runner = new Runner(new Collector, invokedFromIDE);runner.runTestDirectory(dir);runner.end();return true;}),[object Array])@resource://jsbridge/modules/server.js:168\n@resource://jsbridge/modules/server.js:249\n", "fileName": "resource://mozmill/modules/elementslib.js"}}
Whiteboard: [Aug-13-testday]
We should try to remove those long lookup strings and instead only use id or getAnonyousElementByAttribute like: document.getAnonymousElementByAttribute(element_with_id, "anonid", "popup"); That would eliminate those regressions. Lemme see what I can do here.
Assignee: nobody → hskupin
Status: NEW → ASSIGNED
OS: Windows 7 → All
Hardware: x86 → All
Summary: test failures with mainPopupSet because of TabView changes → Update Mozmill tests and shared modules for TabCandy landing
Attached patch Patch v1 (obsolete) — Splinter Review
This patch fixes all tests and shared modules for the changed lookup strings.
Attachment #465746 - Flags: review?(anthony.s.hughes)
Blocks: 574217
Blocks: 586991
Comment on attachment 465746 [details] [diff] [review] Patch v1 >diff --git a/firefox/testFindInPage/testFindInPage.js b/firefox/testFindInPage/testFindInPage.js > var RELATIVE_ROOT = '../../shared-module > var MODULE_REQUIRES = ['UtilsAPI']; > Please make this const > const gDelay = 0; Remove gDelay and replace any instance with an actual number > const gTimeout = 5000; Replace any instance of gTimeout with TIMEOUT >+ containerString = '/id("main-window")/id("tab-view-deck")/{"flex":"1"}/id("browser-bottombox")/id("FindToolbar")' + > '/anon({"anonid":"findbar-container"})'; We should obey the 80-char limit as much as possible. >diff --git a/firefox/testFormManager/testBasicFormCompletion.js b/firefox/testFormManager/testBasicFormCompletion.js > // Select the first element of the drop down >- var popDownAutoCompList = new elementslib.Lookup(controller.window.document, '/id("main-window")/id("mainPopupSet")/id("PopupAutoComplete")/anon({"anonid":"tree"})/{"class":"autocomplete-treebody"}'); >+ var popDownAutoCompList = new elementslib.Lookup(controller.window.document, '/id("main-window")/id("tab-view-deck")/{"flex":"1"}/id("mainPopupSet")/id("PopupAutoComplete")/anon({"anonid":"tree"})/{"class":"autocomplete-treebody"}'); > We should obey the 80-char limit as much as possible. >diff --git a/firefox/testFormManager/testDisableFormManager.js b/firefox/testFormManager/testDisableFormManager.js > controller.click(new elementslib.Name(controller.tabs.activeTab, "SubmitButton")); Move the Submit Button declaration to its own var. >+ var popDownAutoCompList = new elementslib.Lookup(controller.window.content.document, '/id("main-window")/id("tab-view-deck")/{"flex":"1"}/id("mainPopupSet")/id("PopupAutoComplete")/anon({"anonid":"tree"})/{"class":"autocomplete-treebody"}'); > We should obey the 80-char limit as much as possible. > controller.type(firstName, fname.substring(0,2)); > controller.sleep(gTimeout); gTimeout was 0, so lets remove this sleep. > controller.type(lastName, lname.substring(0,2)); > controller.sleep(gTimeout); Same here. >diff --git a/shared-modules/testSearchAPI.js b/shared-modules/testSearchAPI.js > var MODULE_REQUIRES = ['ModalDialogAPI', 'UtilsAPI']; const please. > const gTimeout = 5000; TIMEOUT please. > // Helper lookup constants for the engine manager elements > const MANAGER_BUTTONS = '/id("engineManager")/anon({"anonid":"buttons"})'; > > // Helper lookup constants for the search bar elements >-const SEARCH_BAR = '/id("main-window")/id("navigator-toolbox")/id("nav-bar")/id("search-container")/id("searchbar")'; >+const NAV_BAR = '/id("main-window")/id("tab-view-deck")/{"flex":"1"}/id("navigator-toolbox")/id("nav-bar")'; >+const SEARCH_BAR = NAV_BAR + '/id("search-container")/id("searchbar")'; > const SEARCH_TEXTBOX = SEARCH_BAR + '/anon({"anonid":"searchbar-textbox"})'; > const SEARCH_DROPDOWN = SEARCH_TEXTBOX + '/[0]/anon({"anonid":"searchbar-engine-button"})'; > const SEARCH_POPUP = SEARCH_DROPDOWN + '/anon({"anonid":"searchbar-popup"})'; > const SEARCH_INPUT = SEARCH_TEXTBOX + '/anon({"class":"autocomplete-textbox-container"})' + > '/anon({"anonid":"textbox-input-box"})/anon({"anonid":"input"})'; > const SEARCH_CONTEXT = SEARCH_TEXTBOX + '/anon({"anonid":"textbox-input-box"})/anon({"anonid":"input-box-contextmenu"})'; > const SEARCH_GO_BUTTON = SEARCH_TEXTBOX + '/anon({"class":"search-go-container"})/anon({"class":"search-go-button"})'; > const SEARCH_AUTOCOMPLETE = '/id("main-window")/id("mainPopupSet")/id("PopupAutoComplete")'; We should obey the 80-char limit as much as possible. >diff --git a/shared-modules/testTabbedBrowsingAPI.js b/shared-modules/testTabbedBrowsingAPI.js > const MODULE_NAME = 'TabbedBrowsingAPI'; > // Include necessary modules > const RELATIVE_ROOT = '.'; > const MODULE_REQUIRES = ['PrefsAPI', 'UtilsAPI']; > > const TIMEOUT = 5000; > > const PREF_TABS_ANIMATE = "browser.tabs.animate"; > >-const tabsBrowser = '/id("main-window")/id("browser")/id("appcontent")/id("content")'; >-const tabsToolbar = '/id("main-window")/id("navigator-toolbox")/id("TabsToolbar")'; >+const tabsBrowser = '/id("main-window")/id("tab-view-deck")/{"flex":"1"}/id("browser")/id("appcontent")/id("content")'; >+const tabsToolbar = '/id("main-window")/id("tab-view-deck")/{"flex":"1"}/id("navigator-toolbox")/id("TabsToolbar")'; > const tabsTabs = tabsToolbar + '/id("tabbrowser-tabs")'; > const tabsArrowScrollbox = tabsTabs + '/anon({"anonid":"arrowscrollbox"})'; > const tabsStrip = tabsArrowScrollbox + '/anon({"anonid":"scrollbox"})/anon({"flex":"1"})'; We should obey the 80-char limit as much as possible. Also, all constants should be ALL_CAPS. >diff --git a/shared-modules/testToolbarAPI.js b/shared-modules/testToolbarAPI.js > const MODULE_NAME = 'ToolbarAPI'; > > const RELATIVE_ROOT = '.'; > const MODULE_REQUIRES = ['UtilsAPI']; > > const gTimeout = 5000; TIMEOUT please. >-const autocompletePopup = '/id("main-window")/id("mainPopupSet")/id("PopupAutoCompleteRichResult")'; >-const urlbarContainer = '/id("main-window")/id("navigator-toolbox")/id("nav-bar")/id("urlbar-container")'; >+const autocompletePopup = '/id("main-window")/id("tab-view-deck")/{"flex":"1"}/id("mainPopupSet")/id("PopupAutoCompleteRichResult")'; >+const urlbarContainer = '/id("main-window")/id("tab-view-deck")/{"flex":"1"}/id("navigator-toolbox")/id("nav-bar")/id("urlbar-container")'; > const urlbarInputBox = urlbarContainer + '/id("urlbar")/anon({"class":"autocomplete-textbox-container"})' + > '/anon({"anonid":"textbox-input-box"})'; > const contextMenu = urlbarInputBox + '/anon({"anonid":"input-box-contextmenu"})'; We should obey the 80-char limit as much as possible. Also, all constants should be ALL_CAPS.
Attachment #465746 - Flags: review?(anthony.s.hughes) → review-
Attached patch Patch v2 (obsolete) — Splinter Review
(In reply to comment #3) > >diff --git a/firefox/testFindInPage/testFindInPage.js b/firefox/testFindInPage/testFindInPage.js > >diff --git a/firefox/testFormManager/testBasicFormCompletion.js b/firefox/testFormManager/testBasicFormCompletion.js > >diff --git a/firefox/testFormManager/testDisableFormManager.js b/firefox/testFormManager/testDisableFormManager.js > > controller.click(new elementslib.Name(controller.tabs.activeTab, "SubmitButton")); All of these tests have their own bug to move remote web pages to local test data. There exist even patches. I shouldn't touch those tests in such a detail. The API comments are all fixed.
Attachment #465746 - Attachment is obsolete: true
Attachment #465785 - Flags: review?(anthony.s.hughes)
Attached patch Patch v2.2Splinter Review
Forgot to qrefresh for the last updates.
Attachment #465785 - Attachment is obsolete: true
Attachment #465790 - Flags: review?(anthony.s.hughes)
Attachment #465785 - Flags: review?(anthony.s.hughes)
Attachment #465790 - Flags: review?(anthony.s.hughes) → review+
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Had to land a follow-up breakage fix because of a misspelled id: http://hg.mozilla.org/qa/mozmill-tests/rev/96cee65efb08
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.
Product: Testing → Mozilla QA
Version: Trunk → unspecified
Product: Mozilla QA → Mozilla QA Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: