Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #14378 from jammink/temp
Browse files Browse the repository at this point in the history
bug 938061 - final  - r=zac
  • Loading branch information
bobsilverberg committed Dec 5, 2013
2 parents f6a5c99 + f1b426b commit d2471af
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
Expand Up @@ -11,6 +11,7 @@ class UtilityTray(Base):
_notification_container_locator = (By.ID, 'notifications-container')
_desktop_notifications_locator = (By.CSS_SELECTOR, '#desktop-notifications-container .notification')
_notification_clear_locator = (By.ID, 'notification-clear')
_quicksettings_app_locator = (By.ID, 'quick-settings-full-app')

def wait_for_notification_container_displayed(self):
# Marionette cannot read the displayed state of the notification container so we wait for its location
Expand All @@ -24,6 +25,8 @@ def notifications(self):
def clear_all_notifications(self):
self.marionette.find_element(*self._notification_clear_locator).tap()

def tap_settings_button(self):
self.marionette.find_element(*self._quicksettings_app_locator).tap()

class Notification(PageRegion):
_body_locator = (By.CSS_SELECTOR, 'div.detail')
Expand Down
Expand Up @@ -11,4 +11,6 @@ b2g = true
# Bug 891882 Several components rely on touch events are malfunctioning on B2G desktop
fail-if = device == "desktop"

[test_quick_settings.py]

[test_system_message.py]
@@ -0,0 +1,23 @@
# -*- coding: iso-8859-15 -*-
# 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 gaiatest import GaiaTestCase
from gaiatest.apps.system.app import System


class TestQuickSettingsButton(GaiaTestCase):

def test_quick_settings_button(self):
system = System(self.marionette)

# Expand the utility tray
utility_tray = system.open_utility_tray()
utility_tray.wait_for_notification_container_displayed()

#tap the settings button
utility_tray.tap_settings_button()

#wait for and assert that settings app is launched
self.wait_for_condition(lambda m: self.apps.displayed_app.name == "Settings")

0 comments on commit d2471af

Please sign in to comment.