Bug 1573383 - [fxui] Remove no longer needed keyboard shortcut test. r=marionette-reviewers,maja_zf

Differential Revision: https://phabricator.services.mozilla.com/D61684

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Henrik Skupin 2020-02-13 19:47:38 +00:00
Родитель 8b65decf57
Коммит f11baee075
3 изменённых файлов: 0 добавлений и 59 удалений

Просмотреть файл

@ -1,4 +0,0 @@
[DEFAULT]
tags = local
[test_browser_window.py]

Просмотреть файл

@ -1,54 +0,0 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from __future__ import absolute_import
from firefox_puppeteer import PuppeteerMixin
from marionette_driver import Wait
from marionette_harness import MarionetteTestCase
class TestBrowserWindowShortcuts(PuppeteerMixin, MarionetteTestCase):
def test_addons_manager(self):
# If an about:xyz page is visible, no new tab will be opened
with self.marionette.using_context('content'):
self.marionette.navigate('about:about')
# TODO: To be moved to the upcoming add-ons library
def opener(tab):
tab.window.send_shortcut('a', accel=True, shift=True)
self.browser.tabbar.open_tab(opener)
# TODO: Marionette currently fails to detect the correct tab
# with self.marionette.using_content('content'):
# Wait(self.marionette).until(
# lambda mn: mn.get_url() == "about:addons",
# message="Url does not match with 'about:addons'"
# )
# TODO: remove extra switch once it is done automatically
self.browser.tabbar.tabs[1].switch_to()
self.browser.tabbar.close_tab()
def test_search_field(self):
current_name = self.marionette.execute_script("""
return window.document.activeElement.localName;
""")
# This doesn't test anything if we're already at input.
self.assertNotEqual(current_name, "input")
is_linux = self.marionette.session_capabilities['platformName'] == 'linux'
self.browser.send_shortcut('j' if is_linux else 'k',
accel=True)
# TODO: Check that the right input box is focused
# Located below searchbar as class="textbox-input"
def has_input_selected(mn):
selection_name = mn.execute_script("""
return window.document.activeElement.localName;
""")
return selection_name == "input"
Wait(self.marionette).until(has_input_selected)

Просмотреть файл

@ -1,4 +1,3 @@
[include:keyboard_shortcuts/manifest.ini]
[include:safebrowsing/manifest.ini]
[include:security/manifest.ini]
[include:sessionstore/manifest.ini]