mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1137141: extend Loop toolbarbutton tests to check for correct panel states upon opening. r=Standard8
This commit is contained in:
parent
c9cfc21136
commit
ebbe86df47
@ -38,6 +38,8 @@ add_task(function* test_LoopUI_getters() {
|
||||
yield loadLoopPanel();
|
||||
Assert.ok(LoopUI.browser, "Browser element should be there");
|
||||
Assert.strictEqual(LoopUI.selectedTab, "rooms", "Initially the rooms tab should be selected");
|
||||
let panelTabs = LoopUI.browser.contentDocument.querySelectorAll(".tab-view > li");
|
||||
Assert.strictEqual(panelTabs.length, 1, "Only one tab, 'rooms', should be visible");
|
||||
|
||||
// Hide the panel.
|
||||
yield LoopUI.togglePanel();
|
||||
@ -48,6 +50,12 @@ add_task(function* test_LoopUI_getters() {
|
||||
MozLoopServiceInternal.fxAOAuthProfile = fxASampleProfile;
|
||||
yield MozLoopServiceInternal.notifyStatusChanged("login");
|
||||
|
||||
yield LoopUI.togglePanel();
|
||||
Assert.strictEqual(LoopUI.selectedTab, "rooms", "Rooms tab should still be selected");
|
||||
panelTabs = LoopUI.browser.contentDocument.querySelectorAll(".tab-view > li");
|
||||
Assert.strictEqual(panelTabs.length, 2, "Two tabs should be visible");
|
||||
yield LoopUI.togglePanel();
|
||||
|
||||
// Programmatically select the contacts tab.
|
||||
yield LoopUI.togglePanel(null, "contacts");
|
||||
Assert.strictEqual(LoopUI.selectedTab, "contacts", "Contacts tab should be selected now");
|
||||
|
Loading…
Reference in New Issue
Block a user