diff --git a/.ci/robot_framework/images/home-screen.png b/.ci/robot_framework/images/home-screen.png new file mode 100644 index 0000000..4e83834 Binary files /dev/null and b/.ci/robot_framework/images/home-screen.png differ diff --git a/.ci/robot_framework/images/init-screen.png b/.ci/robot_framework/images/init-screen.png new file mode 100644 index 0000000..251460b Binary files /dev/null and b/.ci/robot_framework/images/init-screen.png differ diff --git a/.ci/robot_framework/images/search-navigation-screen.png b/.ci/robot_framework/images/search-navigation-screen.png new file mode 100644 index 0000000..3fd1aa3 Binary files /dev/null and b/.ci/robot_framework/images/search-navigation-screen.png differ diff --git a/.ci/robot_framework/images/search-screen.png b/.ci/robot_framework/images/search-screen.png new file mode 100644 index 0000000..ca6b9fb Binary files /dev/null and b/.ci/robot_framework/images/search-screen.png differ diff --git a/.ci/robot_framework/tests/keywords_common.robot b/.ci/robot_framework/tests/keywords_common.robot index 1665abf..0982861 100644 --- a/.ci/robot_framework/tests/keywords_common.robot +++ b/.ci/robot_framework/tests/keywords_common.robot @@ -1,5 +1,9 @@ +*** Variables *** +${BASELINE_IMAGES_PATH} /app/robot_framework/images/ + *** Settings *** Library Collections +Library DocTest.VisualTest Library OperatingSystem Library ../libs/TestUtils.py @@ -31,6 +35,18 @@ Get Remote Memory Used ${value}= Evaluate float(${stdout}[0]) RETURN ${value} +Remote Weston Capture Screenshot + [Arguments] ${capture_name} + + ${TEST_BOARD_IP} Get Environment Variable TEST_BOARD_IP + SSH Command ${TEST_BOARD_IP} rm -rf wayland-screenshot-*.png && export XDG_RUNTIME_DIR=/run/user/1000 WAYLAND_DISPLAY=wayland-1 && weston-screenshooter + Run scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@%{TEST_BOARD_IP}:~/wayland-screenshot-*.png ${capture_name} + +Remote Weston Check Screenshot + [Arguments] ${image} + Remote Weston Capture Screenshot ${image} + Compare Images ${BASELINE_IMAGES_PATH}/${image} ${image} threshold=0.0100 + Webdriver Remote Start [Arguments] @{other_params} [Timeout] 2 minutes @@ -57,4 +73,3 @@ Webdriver Remote Stop Close All Browsers SSH Webdriver Remote Stop ${TEST_BOARD_IP} SSH Force Kill ${TEST_BOARD_IP} cog - diff --git a/.ci/robot_framework/tests/tests_011_navigation_bar.robot b/.ci/robot_framework/tests/tests_011_navigation_bar.robot new file mode 100644 index 0000000..2f840db --- /dev/null +++ b/.ci/robot_framework/tests/tests_011_navigation_bar.robot @@ -0,0 +1,54 @@ +*** Variables *** +${INIT_SCREEN_IMAGE} init-screen.png +${HOME_SCREEN_IMAGE} home-screen.png +${SEARCH_SCREEN_IMAGE} search-screen.png +${SEARCH_NAVIGATION_SCREEN_IMAGE} search-navigation-screen.png + +*** Settings *** +Test Timeout 60 seconds + +Library ../libs/TestUtils.py + +Resource variables.robot +Resource keywords_common.robot + +*** Test Cases *** +Test Check Navigation Bar + [Tags] ignoreonfail + + ${TEST_BOARD_IP} Get Environment Variable TEST_BOARD_IP + + SSH Command ${TEST_BOARD_IP} sed -i 's|ExecStart=/usr/bin/weston --continue-without-input --modules=systemd-notify.so|ExecStart=/usr/bin/weston --continue-without-input --modules=systemd-notify.so --debug|' /lib/systemd/system/weston.service + SSH Command ${TEST_BOARD_IP} systemctl daemon-reload && systemctl restart weston + Wait Until Keyword Succeeds 20x 1000ms Remote Weston Check Screenshot ${INIT_SCREEN_IMAGE} + + # Open Home + SSH Command ${TEST_BOARD_IP} /root/scripts/touch-one-finger-gesture.py --duration 1 --steps 1 --delay-on-touch-up 0 215 15 215 15 + Wait Until Keyword Succeeds 20x 1000ms Remote Weston Check Screenshot ${HOME_SCREEN_IMAGE} + + # Open Search + SSH Command ${TEST_BOARD_IP} /root/scripts/touch-one-finger-gesture.py --duration 1 --steps 1 --delay-on-touch-up 0 275 15 275 15 + Sleep 10s + SSH Command ${TEST_BOARD_IP} /root/scripts/touch-one-finger-gesture.py --duration 0.2 --steps 2 --delay-on-touch-up 0 90 300 90 300 + Wait Until Keyword Succeeds 20x 1000ms Remote Weston Check Screenshot ${SEARCH_SCREEN_IMAGE} + + # Click + SSH Command ${TEST_BOARD_IP} /root/scripts/touch-one-finger-gesture.py --duration 0.2 --steps 2 --delay-on-touch-up 0 90 90 90 90 + Wait Until Keyword Succeeds 20x 1000ms Remote Weston Check Screenshot ${SEARCH_NAVIGATION_SCREEN_IMAGE} + + # Navigation Back + SSH Command ${TEST_BOARD_IP} /root/scripts/touch-one-finger-gesture.py --duration 1 --steps 1 --delay-on-touch-up 0 345 15 345 15 + Wait Until Keyword Succeeds 20x 1000ms Remote Weston Check Screenshot ${SEARCH_SCREEN_IMAGE} + + # Navigation Forward + SSH Command ${TEST_BOARD_IP} /root/scripts/touch-one-finger-gesture.py --duration 1 --steps 1 --delay-on-touch-up 0 400 15 400 15 + Wait Until Keyword Succeeds 20x 1000ms Remote Weston Check Screenshot ${SEARCH_NAVIGATION_SCREEN_IMAGE} + + # Reload + SSH Command ${TEST_BOARD_IP} /root/scripts/touch-one-finger-gesture.py --duration 1 --steps 1 --delay-on-touch-up 0 470 15 470 15 + Wait Until Keyword Succeeds 20x 1000ms Remote Weston Check Screenshot ${SEARCH_NAVIGATION_SCREEN_IMAGE} + + # Terminate browser + SSH Command ${TEST_BOARD_IP} /root/scripts/touch-one-finger-gesture.py --duration 1 --steps 1 --delay-on-touch-up 0 595 15 595 15 + Wait Until Keyword Succeeds 20x 1000ms Remote Weston Check Screenshot ${INIT_SCREEN_IMAGE} + diff --git a/.ci/robot_framework/tests/tests_011_glyphs.robot b/.ci/robot_framework/tests/tests_013_glyphs.robot similarity index 100% rename from .ci/robot_framework/tests/tests_011_glyphs.robot rename to .ci/robot_framework/tests/tests_013_glyphs.robot