-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Add screenshot validation and navigation bar test
* Introduced screenshot validation using `Remote Weston Capture Screenshot` and `Remote Weston Check Screenshot` keywords. * Implemented a new test: `Test Check Navigation Bar` to verify navigation bar transitions using screenshots. * Updated dependencies in `keywords_common.robot` to include `DocTest.VisualTest`.
- Loading branch information
Showing
8 changed files
with
124 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, | ||
initial-scale=1.0"> | ||
<title>Home Page</title> | ||
</head> | ||
<body> | ||
<h1>Welcome to the Home Page</h1> | ||
<p>Click the link below to go to the search page.</p> | ||
<a href="search-page.html">Go to Search Page</a> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, | ||
initial-scale=1.0"> | ||
<title>Search Page</title> | ||
</head> | ||
<body> | ||
<h1>Welcome to the Search Page</h1> | ||
<form action="/search" method="get"> | ||
<label for="query">Search:</label> | ||
<input type="text" id="query" | ||
name="query"> | ||
<button type="submit">Search</button> | ||
</form> | ||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
*** Variables *** | ||
${INIT_SCREEN_IMAGE} init-screen.png | ||
${HOME_SCREEN_IMAGE} home-screen.png | ||
${SEARCH_SCREEN_IMAGE} search-screen.png | ||
|
||
*** Settings *** | ||
Test Timeout 60 seconds | ||
|
||
Suite Setup Configure Mockup Pages | ||
|
||
Library ../libs/TestUtils.py | ||
|
||
Resource variables.robot | ||
Resource keywords_common.robot | ||
|
||
*** Keywords *** | ||
Browser Reload | ||
${TEST_BOARD_IP} Get Environment Variable TEST_BOARD_IP | ||
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_SCREEN_IMAGE} | ||
|
||
Click On Search Link In Home | ||
${TEST_BOARD_IP} Get Environment Variable TEST_BOARD_IP | ||
SSH Command ${TEST_BOARD_IP} /root/scripts/touch-one-finger-gesture.py --duration 0.2 --steps 2 --delay-on-touch-up 0 90 160 90 160 | ||
Wait Until Keyword Succeeds 20x 1000ms Remote Weston Check Screenshot ${SEARCH_SCREEN_IMAGE} | ||
|
||
Configure Mockup Pages | ||
${TEST_BOARD_IP} Get Environment Variable TEST_BOARD_IP | ||
${TEST_WEBSERVER_IP} Get Environment Variable TEST_WEBSERVER_IP | ||
${TEST_WEBSERVER_PORT} Get Environment Variable TEST_WEBSERVER_PORT | ||
${HOME_PAGE} Set Variable http://${TEST_WEBSERVER_IP}:${TEST_WEBSERVER_PORT}/robot_framework/html/home-page.html | ||
${SEARCH_PAGE} Set Variable http://${TEST_WEBSERVER_IP}:${TEST_WEBSERVER_PORT}/robot_framework/html/search-page.html | ||
|
||
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} sed -i 's|https://www.wpewebkit.org|${HOME_PAGE}|g' /usr/bin/demo-wpe-website | ||
SSH Command ${TEST_BOARD_IP} sed -i 's|https://duckduckgo.com/|${SEARCH_PAGE}|g' /usr/bin/demo-wpe-duckduckgo | ||
SSH Command ${TEST_BOARD_IP} systemctl daemon-reload && systemctl restart weston | ||
Wait Until Keyword Succeeds 20x 1000ms Remote Weston Check Screenshot ${HOME_SCREEN_IMAGE} | ||
|
||
Open Home | ||
${TEST_BOARD_IP} Get Environment Variable TEST_BOARD_IP | ||
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 | ||
${TEST_BOARD_IP} Get Environment Variable TEST_BOARD_IP | ||
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 | ||
Wait Until Keyword Succeeds 20x 1000ms Remote Weston Check Screenshot ${SEARCH_SCREEN_IMAGE} | ||
|
||
Navigation Back | ||
${TEST_BOARD_IP} Get Environment Variable TEST_BOARD_IP | ||
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 ${HOME_SCREEN_IMAGE} | ||
|
||
Navigation Forward | ||
${TEST_BOARD_IP} Get Environment Variable TEST_BOARD_IP | ||
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_SCREEN_IMAGE} | ||
|
||
Terminate Browser | ||
${TEST_BOARD_IP} Get Environment Variable TEST_BOARD_IP | ||
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} | ||
|
||
*** Test Cases *** | ||
Test Check Navigation Bar | ||
Terminate Browser | ||
Open Home | ||
Click On Search Link In Home | ||
Navigation Back | ||
Navigation Forward | ||
Browser Reload | ||
Navigation Back | ||
Open Search | ||
Terminate Browser |
File renamed without changes.