Index: tst_settings_information/test.py =================================================================== diff -u -r6f1e1819d6605964e7ba8366d0408cc26890be99 -r316fd2f51b0fa89c0f69949d79ef246e1e4bc4ed --- tst_settings_information/test.py (.../test.py) (revision 6f1e1819d6605964e7ba8366d0408cc26890be99) +++ tst_settings_information/test.py (.../test.py) (revision 316fd2f51b0fa89c0f69949d79ef246e1e4bc4ed) @@ -1,15 +1,18 @@ -# -*- coding: utf-8 -*-" -## -# Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. -# copyright -# THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, -# IN PART OR IN WHOLE, -# WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. +########################################################################### # -# file tst_settings_information -# date 04/29/2022 -# author Papiya Mandal -# author Akshay Dhawan +# Copyright (c) 2022-2025 Diality Inc. - All Rights Reserved. +# +# THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN +# WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. +# +# @file test.py +# +# @author (last) Behrouz NematiPour +# @date (last) 27-Sep-2024 +# @author (original) AkshayRajaramDhawan +# @date (original) 29-Apr-2022 +# +############################################################################ import builtins import datetime @@ -215,6 +218,7 @@ and 'DG next service date' and verify the same is displayed on UI screen """ + dateFormat = "%m/%02d/%Y" # MM/dd/yyyy test.startSection("Verify 'HD last service date', 'HD next service date', 'DG next service date' and 'DG next service date' is displayed on UI screen") hd_epoch = builtins.int(datetime.datetime(hd_year, hd_month, hd_day).timestamp()) hd_interval = hd_interval_days * 86400 @@ -223,12 +227,12 @@ hd_simulator.cmd_send_hd_general_response(message_id=138, accepted=0, reason=1, is_pure_data=False, has_parameters=True, parameters_payload=payload) utils.waitForGUI(1) hd_last_service_date = datetime.datetime(hd_year, hd_month, hd_day) - hd_last_service_date = str(hd_last_service_date.strftime("%Y/%m/%02d")) + hd_last_service_date = str(hd_last_service_date.strftime(dateFormat)) hd_last_service_date_text = waitForObjectExists(service_date_obj(hd_last_service_date)) test.compare(hd_last_service_date_text.text, hd_last_service_date, "'HD last service date' should be {}".format(hd_last_service_date)) hd_next_service_date = datetime.datetime(hd_year, hd_month, hd_day) + datetime.timedelta(days=hd_interval_days) - hd_next_service_date = str(hd_next_service_date.strftime("%Y/%m/%02d")) + hd_next_service_date = str(hd_next_service_date.strftime(dateFormat)) hd_next_service_date_text = waitForObjectExists(service_date_obj(hd_next_service_date)) test.compare(hd_next_service_date_text.text, hd_next_service_date, "'HD next service date' should be {}".format(hd_next_service_date)) @@ -239,12 +243,12 @@ dg_simulator.cmd_send_dg_general_response(message_id=140, accepted=0, reason=1, is_pure_data=False, has_parameters=True, parameters_payload=payload) utils.waitForGUI(1) dg_last_service_date = datetime.datetime(dg_year, dg_month, dg_day) - dg_last_service_date = str(dg_last_service_date.strftime("%Y/%m/%02d")) + dg_last_service_date = str(dg_last_service_date.strftime(dateFormat)) dg_last_service_date_text = waitForObjectExists(service_date_obj(dg_last_service_date)) test.compare(dg_last_service_date_text.text, dg_last_service_date, "'DG last service date' should be {}".format(dg_last_service_date)) dg_next_service_date = datetime.datetime(dg_year, dg_month, dg_day) + datetime.timedelta(days=dg_interval_days) - dg_next_service_date = str(dg_next_service_date.strftime("%Y/%m/%02d")) + dg_next_service_date = str(dg_next_service_date.strftime(dateFormat)) dg_next_service_date_text = waitForObjectExists(service_date_obj(dg_next_service_date)) test.compare(dg_next_service_date_text.text, dg_next_service_date, "'DG last service date' should be {}".format(dg_next_service_date)) test.endSection() @@ -610,7 +614,7 @@ 1)application """ try: - utility.rename_file(config.APPLICATION_FOLDER_LOCATION,"application") + utility.rename_file(config.APPLICATION_FOLDER_LOCATION,"unittests") utils.waitForGUI(0.2) test.log("Navigating to 'Volume and Brightness' screen") mouseClick(waitForObjectExists(settings_text_obj(config.VOLUME_AND_BRIGHTNESS_TEXT))) @@ -634,7 +638,7 @@ except: test.log(str("Failed to verify missing path scenario")) finally: - utility.rename_old_name(config.APPLICATION_FOLDER_LOCATION,"application") + utility.rename_old_name(config.APPLICATION_FOLDER_LOCATION,"unittests") def verify_volume_and_brightness_settings(): test.log("Navigating to 'Volume and Brightness' screen")