From a5869fefb33d008712c9e4bb1a6f9a8f3d03ee41 Mon Sep 17 00:00:00 2001 From: Samuli Leivo Date: Thu, 2 Jan 2025 14:39:49 +0200 Subject: [PATCH] Add GUI launch test for PDF Viewer Signed-off-by: Samuli Leivo --- Robot-Framework/resources/gui_keywords.resource | 3 +++ Robot-Framework/test-suites/gui-tests/gui_apps.robot | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/Robot-Framework/resources/gui_keywords.resource b/Robot-Framework/resources/gui_keywords.resource index 6e28ede..adfd021 100644 --- a/Robot-Framework/resources/gui_keywords.resource +++ b/Robot-Framework/resources/gui_keywords.resource @@ -110,16 +110,19 @@ Verify logout [Documentation] Check that dekstop is not available by running 'grim' which should have return code 1 in this case [Arguments] ${iterations}=5 ${status}= Set Variable ${EMPTY} + Connect to VM ${GUI_VM} ${USER_LOGIN} ${USER_PASSWORD} FOR ${i} IN RANGE ${iterations} ${rc}= Execute Command grim check.png return_stdout=False return_rc=${true} IF "${rc}" == "1" Set Global Variable ${LOGGED_IN_STATUS} ${False} + Connect to VM ${GUI_VM} BREAK ELSE Set Global Variable ${LOGGED_IN_STATUS} ${True} END Sleep 1 END + Connect to VM ${GUI_VM} Get icon [Documentation] Copy icon svg file to test agent machine. Crop and convert the svg file to png. diff --git a/Robot-Framework/test-suites/gui-tests/gui_apps.robot b/Robot-Framework/test-suites/gui-tests/gui_apps.robot index 7d28b0c..0f989b2 100644 --- a/Robot-Framework/test-suites/gui-tests/gui_apps.robot +++ b/Robot-Framework/test-suites/gui-tests/gui_apps.robot @@ -28,6 +28,14 @@ Start and close chrome via GUI on LenovoX1 Start app via GUI on LenovoX1 ${CHROME_VM} chrome Close app via GUI on LenovoX1 ${CHROME_VM} google-chrome ./window-close-neg.png +Start and close PDF Viewer via GUI on LenovoX1 + [Documentation] Start PDF Viewer via GUI test automation and verify related process started + ... Close PDF Viewer via GUI test automation and verify related process stopped + [Tags] SP-T70 lenovo-x1 + Get icon app zathura.svg crop=30 + Start app via GUI on LenovoX1 ${ZATHURA_VM} zathura + Close app via GUI on LenovoX1 ${ZATHURA_VM} zathura ./window-close-neg.png + Start and close Firefox via GUI on Orin AGX [Documentation] Passing this test requires that display is connected to the target device ... Start Firefox via GUI test automation and verify related process started