Date verification fix.
This resolves openbmc/openbmc-test-automation#1465
Change-Id: Ie5b9ac6c3548fb527bab0b0c60dfbb0fbe8d4466
Signed-off-by: Prashanth Katti <prkatti1@in.ibm.com>
diff --git a/gui/obmc_gui/test/gui_header/test_obmc_gui_ip_refresh_check.robot b/gui/obmc_gui/test/gui_header/test_obmc_gui_ip_refresh_check.robot
index 5d7b608..e3ee534 100644
--- a/gui/obmc_gui/test/gui_header/test_obmc_gui_ip_refresh_check.robot
+++ b/gui/obmc_gui/test/gui_header/test_obmc_gui_ip_refresh_check.robot
@@ -40,7 +40,6 @@
Click Element ${xpath_select_refresh_button}
Wait Until Page Contains Running
-
Verify Date Last Refreshed
[Documentation] Verify Date Last Refreshed text in GUI header.
[Tags] Verify_Date_Last_Refreshed
@@ -48,7 +47,10 @@
${date_info_1st_read}= Get Text ${xpath_select_date_text}
${current_date}= Get Time
${date_conversion}= Convert Date ${current_date} result_format=%b %d %Y
- Should Contain ${date_info_1st_read} ${date_conversion}
+
+ ${mmmdd} ${yyyy}= Split String From Right ${date_conversion} ${SPACE} 1
+ Should Contain ${date_info_1st_read} ${mmmdd} msg=Month and day mismatch.
+ Should Contain ${date_info_1st_read} ${yyyy} msg=Year mismatch.
# Refresh button pressed.
Click Element ${xpath_select_refresh_button}
@@ -57,13 +59,15 @@
${date_info_2nd_read}= Get Text ${xpath_select_date_text}
${current_date}= Get Time
${date_conversion}= Convert Date ${current_date} result_format=%b %d %Y
- Should Contain ${date_info_2nd_read} ${date_conversion}
+
+ ${mmmdd} ${yyyy}= Split String From Right ${date_conversion} ${SPACE} 1
+ Should Contain ${date_info_1st_read} ${mmmdd} msg=Month and day mismatch.
+ Should Contain ${date_info_1st_read} ${yyyy} msg=Year mismatch.
# Comparison between 1st and 2nd read.
Should Not Be Equal As Strings ${date_info_1st_read}
... ${date_info_2nd_read}
-
Verify GUI Header Scrolls
[Documentation] Verify GUI header scrolls on click "Server Info" element.
[Tags] Verify_GUI_Header_Scrolls