Bug 1323185 - Fix test_close_not_selected_tab for correctly closing a background tab. r=maja_zf a=test-only
authorHenrik Skupin <mail@hskupin.info>
Tue, 17 Jan 2017 19:09:05 +0100
changeset 375687 23a648cc280c90a92222a6ee5eb714b37a31af54
parent 375686 204db57ef5d369888ce6db5d7d8a25b5c37e6f15
child 375688 53f4b1138f2676c47f878240b863cb074a3176af
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmaja_zf, test-only
bugs1323185
milestone53.0a2
Bug 1323185 - Fix test_close_not_selected_tab for correctly closing a background tab. r=maja_zf a=test-only It should not be possible to close a background tab via the menu shortcut. Instead another method should be used, best here is the close button. MozReview-Commit-ID: 3cZmAyPsnj7
testing/firefox-ui/tests/puppeteer/test_tabbar.py
--- a/testing/firefox-ui/tests/puppeteer/test_tabbar.py
+++ b/testing/firefox-ui/tests/puppeteer/test_tabbar.py
@@ -68,17 +68,17 @@ class TestTabBar(PuppeteerMixin, Marione
             self.assertEqual(len(tabbar.tabs), 1)
             self.assertEqual(tabbar.tabs[0].handle, self.marionette.current_window_handle)
             self.assertNotEqual(new_tab.handle, tabbar.tabs[0].handle)
 
     def test_close_not_selected_tab(self):
         tabbar = self.browser.tabbar
 
         new_tab = tabbar.open_tab()
-        tabbar.close_tab(tabbar.tabs[0])
+        tabbar.close_tab(tabbar.tabs[0], trigger="button")
 
         self.assertEqual(len(tabbar.tabs), 1)
         self.assertEqual(new_tab, tabbar.tabs[0])
 
     def test_close_all_tabs_except_first(self):
         tabbar = self.browser.tabbar
 
         orig_tab = tabbar.tabs[0]