Index: tst_settings_information/test.py =================================================================== diff -u -rb62e22bb0facb1b8e1c80172a095e4bb457eddda -r5d66024fa1c6079e344883fa1726b3228ec6cf16 --- tst_settings_information/test.py (.../test.py) (revision b62e22bb0facb1b8e1c80172a095e4bb457eddda) +++ tst_settings_information/test.py (.../test.py) (revision 5d66024fa1c6079e344883fa1726b3228ec6cf16) @@ -331,57 +331,8 @@ back_btn = waitForObjectExists(volume_and_brightness_text_obj(config.BACK_TEXT)) mouseClick(back_btn) -def adjust_and_verify_brightness_volume(volume): - """ - Method to set the brightness volume and verify the - same - @param volume - (int) User expected Alarm volume - """ - test.startSection("Set the Brightness Volume to {} and verify the current volume is {}".format(volume, volume)) - brightness_volume_text = waitForObjectExists(volume_and_brightness_text_obj(config.BRIGHTNESS_TEXT)) - row_obj = object.parent(brightness_volume_text) - brightness_volume_parent_object_index = 0 - brightness_volume_parent_obj = object.children(row_obj) - brightness_volume_parent_obj = brightness_volume_parent_obj[brightness_volume_parent_object_index] - brightness_volume_parent_object = object.children(brightness_volume_parent_obj) - SLIDER_INDEX = 0 - PROGRESS_OBJ_INDEX = 1 - slider_obj = brightness_volume_parent_object[SLIDER_INDEX] - progress_parent = brightness_volume_parent_object[PROGRESS_OBJ_INDEX] - progress_children = object.children(progress_parent) - current_brightness_volume = progress_children[1] - current_brightness_volume_val = builtins.int(str(current_brightness_volume.text)) - width = pyInt(slider_obj.width) - 10 - height = pyInt(slider_obj.height) - 20 - if volume == current_brightness_volume_val: - test.passes("Alarm volume value is already set to {}".format(volume)) - elif volume < current_brightness_volume_val: - while current_brightness_volume_val != volume: - mouseDrag(slider_obj, -100, height, width, 0, Qt.NoModifier, Qt.LeftButton) - current_brightness_volume_val -= VOLUME_BUFFER - elif volume > current_brightness_volume_val: - while current_brightness_volume_val != volume: - mouseDrag(slider_obj, 50, height, width, 0, Qt.NoModifier, Qt.LeftButton) - current_brightness_volume_val += VOLUME_BUFFER - expected_brightness_volume = "{}{}".format(volume, config.UNIT_OF_VOLUME_AND_BRIGHTNESS) - current_brightness_volume = progress_children[1] - current_brightness_volume_val = "{}{}".format(current_brightness_volume.text, config.UNIT_OF_VOLUME_AND_BRIGHTNESS) - test.compare(current_brightnessvolume_val, expected_brightness_volume, "Current Alarm volume should be {}".format(expected_alarm_volume)) - test.endSection() - -def verify_brightness_volume(): - """ - Method to loop through different brightness volume - values and set the brightness volume in UI - """ - for volume in BRIGHTNESS_VOLUME_RANGE : - adjust_and_verify_brightness_volume(volume) - back_btn = waitForObjectExists(volume_and_brightness_text_obj(config.BACK_TEXT)) - mouseClick(back_btn) - - def verify_wifi_setting(): """ Method to verify "Wi-Fi" screen @@ -671,8 +622,7 @@ utils.waitForGUI(0.5) test.log("Navigating to 'Volume and Brightness' screen") mouseClick(waitForObjectExists(settings_text_obj(config.VOLUME_AND_BRIGHTNESS_TEXT))) - verify_volume_and_brightness_section() - verify_brightness_volume() + verify_volume_and_brightness_section() verify_alarm_volume() verify_wifi_setting()