Index: suite_leahi/shared/scripts/configuration/config.py =================================================================== diff -u -re74e550d3abff8c854a63ed41d5b01d78b110094 -r845657f82743b8c2699e7ce608bacf1330561553 --- suite_leahi/shared/scripts/configuration/config.py (.../config.py) (revision e74e550d3abff8c854a63ed41d5b01d78b110094) +++ suite_leahi/shared/scripts/configuration/config.py (.../config.py) (revision 845657f82743b8c2699e7ce608bacf1330561553) @@ -1,14 +1,22 @@ -from configuration.strings import * - # -S, --disable-sd-card-fail-log-stop disable-sd-card-fail-log-stop # -k, --enable-check-in-log Enables Check-In Log # -K, --enable-acknow-log Enables Acknowledgment Log AUT_NAME = "leahi -k -K -S -q" AUT_NAME_ONLY = "leahi" # Need only the AUT name for tst_ui_logs, do not add options -HOME_DIR_PATH = "/home/denali" + +# Configuration application_init.py TMP_DIR = "/tmp/" +APP_POST_LOG_LOCATION = "".join([str(TMP_DIR),'/post.log']) +#Service Export Logs ENABLED = True +DEVICE_SETTINGS_SCREEN_TITLE_TEXT = "Device Settings" +EXPORT_LOG_TEXT = "Export Logs" +EXPORT_LOGS_OPTIONS = ["Application", "Service", "Treatment"] +EXPORT_LOG_STATUS = "Application log export to USB is complete" +EXPORT_LOG_PROGRESS_STATUS = "Service log export to USB in progress ... " +SERVICE_SCREEN_TITLE_TEXT = "Service" -APP_POST_LOG_LOCATION = "".join([str(TMP_DIR),'/post.log']) +#HeaderBar WiFi +WIFI_POPUP_TEXT = "WiFi Connection Error" \ No newline at end of file Index: suite_leahi/shared/scripts/names.py =================================================================== diff -u -re2c906a7b5fde31d48d168f097fe6a5a2ab0afea -r845657f82743b8c2699e7ce608bacf1330561553 --- suite_leahi/shared/scripts/names.py (.../names.py) (revision e2c906a7b5fde31d48d168f097fe6a5a2ab0afea) +++ suite_leahi/shared/scripts/names.py (.../names.py) (revision 845657f82743b8c2699e7ce608bacf1330561553) @@ -58,5 +58,8 @@ o_ExportLogsNotificationBar = {"container": o_SettingsExportLogs, "id": "_information", "type": "NotificationBarSmall" } o_DeviceSettingsGrid = {"container": o_SettingsHome, "id": "_grid", "type": "Grid", } - - +#HeaderBar WiFi +o_HeaderBar_WiFi_IconButton = {"container": o_Gui_MainView, "id": "_wifiButton", "type": "IconButton", "unnamed": 1 } +o_HeaderBar_WiFi_Popup = {"container": o_Overlay, "id": "_backgroundRect", "type": "Rectangle", "unnamed": 1 } +o_HeaderBar_Wifi_PopuoParameters = {"container": o_Overlay, "type": "Text", "unnamed": 1 } +o_HeaderBar_WiFi_IconImage = {"container": o_Gui_MainView, "id": "_iconImage", "source": "qrc:/images/iWifi", "type": "Image", "unnamed": 1 } Index: suite_leahi/tst_headerbar_wifi_indicator/test.py =================================================================== diff -u --- suite_leahi/tst_headerbar_wifi_indicator/test.py (revision 0) +++ suite_leahi/tst_headerbar_wifi_indicator/test.py (revision 845657f82743b8c2699e7ce608bacf1330561553) @@ -0,0 +1,67 @@ +# Subject/Title: HeaderBar - SW - 02 - WiFi indicator - Q&R +# +# Functionalities: Testing items of HeaderBar WiFi Pop up +# +# Steps: +# 1 Start Leahi Application +# 2 Get WiFi Icon Image and Compare it +# 3 Verify that the Header WiFi Pop up displayed +# 4 Compare the WiFi Pop up textWiFi Connection Error +# 5 Verify that the Total Data Field text matches the expected configuration text + + +import names +from configuration import config +from leahi_dialin.ui import utils + + +def wifi_popup_text_obj(text): + names.o_HeaderBar_Wifi_PopuoParameters["text"] = text + return names.o_HeaderBar_Wifi_PopuoParameters + + +def headerbar_wifi_popup(): + """ + Method to verify "WiFi" Pop-up + """ + test.startSection("Verifying WiFi pop-up") + wifi_icon_image = waitForObject(names.o_HeaderBar_WiFi_IconImage, 2000) + if wifi_icon_image is not None: + test.log("WiFi Icon found in the Leahi UI") + test.compare( + str(waitForObjectExists(names.o_HeaderBar_WiFi_IconImage, 2000).source.path), + "/images/iWifi", + "Comparison of WiFi Icon Image", + ) + # Click the WiFi button + headerbar_wifi_button = waitForObjectExists(names.o_HeaderBar_WiFi_IconButton) + mouseClick(headerbar_wifi_button) + + # Wait for popup to appear + popup = waitForObjectExists(names.o_HeaderBar_WiFi_Popup, 1000) + + # Verify popup is visible + if popup.visible: + test.log("Header WiFi Pop up displayed successfully") + else: + test.log("Popup exists but is not visible") + + # The test environment is running the UI application in an Ubuntu OS within VMware, + # where the WiFi button is not enabled in the UI. So Comparing error message + wifi_popup_text = waitForObjectExists(wifi_popup_text_obj(config.WIFI_POPUP_TEXT)) + test.compare( + wifi_popup_text.text, + config.WIFI_POPUP_TEXT, + "WiFi Pop up text should be {}".format(config.WIFI_POPUP_TEXT), + ) + + test.endSection() + + +def main(): + utils.tstStart(__file__) + + startApplication(config.AUT_NAME + "-q") + headerbar_wifi_popup() + + utils.tstDone()