Bug 1323185 - Fix test_close_not_selected_tab for correctly closing a background tab. draft
authorHenrik Skupin <mail@hskupin.info>
Tue, 17 Jan 2017 19:09:05 +0100
changeset 466804 788ea869629e10e979a259848df0a97442763064
parent 466730 a338e596b1d9f37186aaeddcfaa572ae043e578d
child 466805 a9068920adda7125bacc2c7ed7210ff5fdb7d5c0
push id42995
push userbmo:hskupin@gmail.com
push dateThu, 26 Jan 2017 15:43:30 +0000
bugs1323185
milestone54.0a1
Bug 1323185 - Fix test_close_not_selected_tab for correctly closing a background tab. 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]