This repository has been archived by the owner on Nov 3, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22233 from anvk/1024501
1024501: Enable accessibility settings when the screen reader is enabled with quick toggle. r=alive
- Loading branch information
Showing
4 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
...ui-tests/gaiatest/tests/accessibility/system/test_a11y_volume_buttons_panel_visibility.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# 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/. | ||
|
||
import time | ||
|
||
from gaiatest import GaiaTestCase | ||
from gaiatest.apps.settings.app import Settings | ||
|
||
|
||
class TestVolumeButtonsAccessibility(GaiaTestCase): | ||
|
||
def setUp(self): | ||
GaiaTestCase.setUp(self) | ||
|
||
self.settings = Settings(self.marionette) | ||
self.settings.launch() | ||
|
||
def toggle_screen_reader(self): | ||
self.marionette.switch_to_frame() | ||
|
||
self.device.press_release_volume_up_then_down_n_times(3) | ||
time.sleep(3) | ||
self.device.press_release_volume_up_then_down_n_times(3) | ||
|
||
self.apps.switch_to_displayed_app() | ||
|
||
def test_a11y_volume_buttons(self): | ||
|
||
# Panel should not be visible by default | ||
self.assertFalse(self.data_layer.get_setting('accessibility.show-settings')) | ||
self.assertFalse(self.is_element_displayed( | ||
*self.settings._accessibility_menu_item_locator)) | ||
self.assertTrue(self.accessibility.is_hidden(self.marionette.find_element( | ||
*self.settings._accessibility_menu_item_locator))) | ||
|
||
self.toggle_screen_reader() | ||
|
||
# Panel should become visible after screen reader turned ON | ||
self.assertTrue(self.data_layer.get_setting('accessibility.show-settings')) | ||
self.assertTrue(self.is_element_displayed( | ||
*self.settings._accessibility_menu_item_locator)) | ||
self.assertTrue(self.accessibility.is_visible(self.marionette.find_element( | ||
*self.settings._accessibility_menu_item_locator))) | ||
|
||
self.toggle_screen_reader() | ||
|
||
# Panel should not be visible again | ||
self.assertFalse(self.data_layer.get_setting('accessibility.show-settings')) | ||
self.assertFalse(self.is_element_displayed( | ||
*self.settings._accessibility_menu_item_locator)) | ||
self.assertTrue(self.accessibility.is_hidden(self.marionette.find_element( | ||
*self.settings._accessibility_menu_item_locator))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters