summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Grandin <grandinp@altern.org>2017-01-02 11:47:43 -0800
committerPierre Grandin <grandinp@altern.org>2017-01-02 11:47:43 -0800
commit895d7fb6ecf77752e15b643ef59c5b9cc8ef29bd (patch)
tree42704023046d71a8224c5abaa77eee9dd93bd035
parent42350c13ccf5c494c6a6eec15a90a73e3ea942b1 (diff)
downloadnavit-895d7fb6ecf77752e15b643ef59c5b9cc8ef29bd.tar.gz
Adding basic UI town search tests
-rw-r--r--ci/run_linux_tests.sh2
-rw-r--r--ci/xdotools.sh35
2 files changed, 37 insertions, 0 deletions
diff --git a/ci/run_linux_tests.sh b/ci/run_linux_tests.sh
index 62763f58a..5aa0d23ee 100644
--- a/ci/run_linux_tests.sh
+++ b/ci/run_linux_tests.sh
@@ -17,6 +17,8 @@ sleep 5
import -window root $CIRCLE_ARTIFACTS/default.png
+bash ~/navit/ci/xdotools.sh
+
python ~/navit/ci/dbus_tests.py $CIRCLE_TEST_REPORTS/
dbus-send --print-reply --session --dest=org.navit_project.navit /org/navit_project/navit/default_navit org.navit_project.navit.navit.quit
diff --git a/ci/xdotools.sh b/ci/xdotools.sh
new file mode 100644
index 000000000..f1f13fb1a
--- /dev/null
+++ b/ci/xdotools.sh
@@ -0,0 +1,35 @@
+sudo apt-get install xdotools
+
+event=0
+
+send_event (){
+ xdotool $@
+ sleep 1
+ file=`printf "%05d\n" $event`
+ import -window root $CIRCLE_ARTIFACTS/frames/${file}.png
+ event=$((event+1))
+}
+
+# Open main menu
+send_event mousemove 350 350 click 1
+
+# Click 'Actions'
+send_event mousemove 350 350 click 1
+
+# Click 'Town'
+send_event mousemove 300 500 click 1
+
+# Send 'Berk'
+send_event key b
+send_event key e
+send_event key r
+send_event key k
+
+# Click on the first result
+send_event mousemove 150 100 click 1
+
+# Click 'view on map'
+send_event mousemove 150 280 click 1
+
+# Assemble the gif
+convert -delay 200 -loop 0 $CIRCLE_ARTIFACTS/frames/*.png $CIRCLE_ARTIFACTS/town_search.gif