Publish Vulpes Preview 15 sources for desktop, Android and Tundra

Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
This commit is contained in:
OverSu 2026-09-30 23:13:03 +02:00
commit b38dea0597
25901 changed files with 9982925 additions and 369 deletions

View file

@ -0,0 +1,75 @@
# 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 marionette_driver import expected, By, Wait
from gaiatest.apps.base import Base
from gaiatest.form_controls.header import GaiaHeader
UI_TESTS = "UI Tests"
class UiTests(Base):
manifest_url = '{}uitest{}/manifest.webapp'.format(Base.DEFAULT_PROTOCOL,Base.DEFAULT_APP_HOSTNAME)
_test_panel_header_locator = (By.CSS_SELECTOR, '#test-panel-header')
_ui_page_locator = (By.CSS_SELECTOR, 'a[href="#UI"]')
_api_page_locator = (By.CSS_SELECTOR, 'a[href="#API"]')
_hw_page_locator = (By.CSS_SELECTOR, 'a[href="#HW"]')
_moz_id_persona_tests_button_locator = (By.ID, 'mozId-persona')
_keyboard_locator = (By.LINK_TEXT, 'Keyboard')
def __init__(self, marionette):
Base.__init__(self, marionette)
self.name = UI_TESTS
def launch(self):
Base.launch(self, launch_timeout=120000)
def tap_ui_button(self):
element = Wait(self.marionette).until(
expected.element_present(*self._ui_page_locator))
Wait(self.marionette).until(expected.element_displayed(element))
element.tap()
def tap_api_button(self):
element = Wait(self.marionette).until(
expected.element_present(*self._api_page_locator))
Wait(self.marionette).until(expected.element_displayed(element))
element.tap()
def tap_hw_button(self):
element = Wait(self.marionette).until(
expected.element_present(*self._hw_page_locator))
Wait(self.marionette).until(expected.element_displayed(element))
element.tap()
def tap_moz_id_button(self):
element = Wait(self.marionette, timeout=120).until(
expected.element_present(*self._moz_id_persona_tests_button_locator))
Wait(self.marionette).until(expected.element_displayed(element))
# Hack to make the identity button visible from underneath the toolbar
self.marionette.execute_script('arguments[0].scrollIntoView(false);', [element])
element.tap()
from gaiatest.apps.ui_tests.regions.persona import Persona
return Persona(self.marionette)
def tap_keyboard_option(self):
element = Wait(self.marionette, timeout=120).until(
expected.element_present(*self._keyboard_locator))
Wait(self.marionette).until(expected.element_displayed(element))
# Hack to make the keyboard button visible from underneath the toolbar
self.marionette.execute_script('arguments[0].scrollIntoView(false);', [element])
element.tap()
from gaiatest.apps.ui_tests.regions.keyboard import KeyboardPage
return KeyboardPage(self.marionette)
def tap_back_button(self):
GaiaHeader(self.marionette, self._test_panel_header_locator).go_back()

View file

@ -0,0 +1,66 @@
# 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 marionette_driver import expected, By, Wait
from gaiatest.apps.base import Base
class KeyboardPage(Base):
_number_input_locator = (By.CSS_SELECTOR, 'input[type="number"]')
_text_input_locator = (By.CSS_SELECTOR, 'input[type="text"]')
_email_input_locator = (By.CSS_SELECTOR, 'input[type="email"]')
_url_input_locator = (By.CSS_SELECTOR, 'input[type="url"]')
_frame_locator = (By.CSS_SELECTOR, "#test-iframe[src*='keyboard']")
def __init__(self, marionette):
Base.__init__(self, marionette)
def switch_to_frame(self):
frame = Wait(self.marionette).until(
expected.element_present(*self._frame_locator))
Wait(self.marionette).until(expected.element_displayed(frame))
self.marionette.switch_to_frame(frame)
def tap_number_input(self):
number_input = self.marionette.find_element(*self._number_input_locator)
self.marionette.execute_script("arguments[0].scrollIntoView(false);", [number_input])
number_input.tap()
from gaiatest.apps.keyboard.app import Keyboard
return Keyboard(self.marionette)
@property
def number_input(self):
return self.marionette.find_element(*self._number_input_locator).get_attribute('value')
def tap_text_input(self):
self.marionette.find_element(*self._text_input_locator).tap()
from gaiatest.apps.keyboard.app import Keyboard
return Keyboard(self.marionette)
@property
def text_input(self):
return self.marionette.find_element(*self._text_input_locator).get_attribute('value')
def tap_email_input(self):
self.marionette.find_element(*self._email_input_locator).tap()
from gaiatest.apps.keyboard.app import Keyboard
return Keyboard(self.marionette)
@property
def email_input(self):
return self.marionette.find_element(*self._email_input_locator).get_attribute('value')
def tap_url_input(self):
self.marionette.find_element(*self._url_input_locator).tap()
from gaiatest.apps.keyboard.app import Keyboard
return Keyboard(self.marionette)
@property
def url_input(self):
return self.marionette.find_element(*self._url_input_locator).get_attribute('value')

View file

@ -0,0 +1,61 @@
# 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 marionette_driver import expected, By, Wait
from gaiatest.apps.base import Base
class Persona(Base):
_app_ready_event = (By.CSS_SELECTOR, 'li.ready')
_app_login_event = (By.CSS_SELECTOR, 'li.login')
_app_logout_event = (By.CSS_SELECTOR, 'li.logout')
_app_login_assertion_text = (By.CSS_SELECTOR, 'li.login div.assertion')
_app_std_request_button_locator = (By.ID, 't-request')
_app_logout_button_locator = (By.ID, 't-logout')
_frame_locator = (By.CSS_SELECTOR, 'iframe[src*="identity"]')
def tap_standard_sign_in(self):
self.tap_standard_button()
from gaiatest.apps.persona.app import Persona
persona = Persona(self.marionette)
persona.switch_to_persona_frame()
return persona
def switch_to_frame(self):
frame = Wait(self.marionette).until(
expected.element_present(*self._frame_locator))
Wait(self.marionette).until(expected.element_displayed(frame))
self.marionette.switch_to_frame(frame)
self.wait_for_ready_event()
def get_assertion(self):
# Gets the last assertion in the event stream list, use logout event to make sure
# we're done getting assertions
return self.marionette.find_elements(*self._app_login_assertion_text)[-1].text
def tap_standard_button(self):
element = Wait(self.marionette).until(
expected.element_present(*self._app_std_request_button_locator))
Wait(self.marionette).until(expected.element_displayed(element))
element.tap()
def tap_logout_button(self):
element = Wait(self.marionette).until(
expected.element_present(*self._app_logout_button_locator))
Wait(self.marionette).until(expected.element_displayed(element))
element.tap()
def wait_for_logout_event(self):
Wait(self.marionette).until(
expected.element_displayed(*self._app_logout_event))
def wait_for_ready_event(self):
Wait(self.marionette).until(
expected.element_displayed(*self._app_ready_event))
def wait_for_login_event(self):
Wait(self.marionette).until(
expected.element_displayed(*self._app_login_event))