summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <michael.drake@codethink.co.uk>2019-02-16 14:29:45 +0000
committerMichael Drake <michael.drake@codethink.co.uk>2019-02-16 14:29:45 +0000
commiteda64c6733a3cf8c5eec419d6903a3f08cfeb828 (patch)
tree4443ef85cf1faa00e7949c3e9042e310edc0835f
parent74ab5697625ffedd66ee8de756aaf8620c480d43 (diff)
downloadnetsurf-test-eda64c6733a3cf8c5eec419d6903a3f08cfeb828.tar.gz
netsurf-test-eda64c6733a3cf8c5eec419d6903a3f08cfeb828.tar.bz2
monkey tests: Initial set of tests.
-rw-r--r--html/trivial-document.html10
-rw-r--r--monkey-test/index.yaml8
-rw-r--r--monkey-test/load-trivial-document.yaml29
-rw-r--r--monkey-test/resource-scheme.yaml2
-rw-r--r--monkey-test/start-stop-no-js.yaml8
-rw-r--r--monkey-test/start-stop.yaml6
6 files changed, 62 insertions, 1 deletions
diff --git a/html/trivial-document.html b/html/trivial-document.html
new file mode 100644
index 0000000..1d1ccb6
--- /dev/null
+++ b/html/trivial-document.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Trivial document</title>
+ </head>
+ <body>
+ <h1>Trivial document</h1>
+ <p>Hello!</p>
+ </body>
+</html>
diff --git a/monkey-test/index.yaml b/monkey-test/index.yaml
new file mode 100644
index 0000000..eaf3996
--- /dev/null
+++ b/monkey-test/index.yaml
@@ -0,0 +1,8 @@
+- group: initial
+ description: Basic checks that the browser can start and stop
+
+- group: no-networking
+ description: Tests that require no networking
+
+- group: basic
+ description: Basic tests that fetch from the test server
diff --git a/monkey-test/load-trivial-document.yaml b/monkey-test/load-trivial-document.yaml
new file mode 100644
index 0000000..42ef322
--- /dev/null
+++ b/monkey-test/load-trivial-document.yaml
@@ -0,0 +1,29 @@
+title: load trivial document
+group: basic
+steps:
+- action: launch
+ language: en
+- action: window-new
+ tag: win1
+- action: navigate
+ window: win1
+ url: http://test.netsurf-browser.org/html/trivial-document.html
+- action: block
+ conditions:
+ - window: win1
+ status: complete
+- action: plot-check
+ window: win1
+ checks:
+ - text-contains: Trivial document
+ - text-contains: Hello!
+- action: navigate
+ window: win1
+ url: resource:netsurf.png
+- action: block
+ conditions:
+ - window: win1
+ status: complete
+- action: window-close
+ window: win1
+- action: quit \ No newline at end of file
diff --git a/monkey-test/resource-scheme.yaml b/monkey-test/resource-scheme.yaml
index 791a79c..ca5ed2a 100644
--- a/monkey-test/resource-scheme.yaml
+++ b/monkey-test/resource-scheme.yaml
@@ -1,5 +1,5 @@
title: resource scheme
-group: basic
+group: no-networking
steps:
- action: launch
language: en
diff --git a/monkey-test/start-stop-no-js.yaml b/monkey-test/start-stop-no-js.yaml
new file mode 100644
index 0000000..ef26a82
--- /dev/null
+++ b/monkey-test/start-stop-no-js.yaml
@@ -0,0 +1,8 @@
+title: start and stop browser without JS
+group: initial
+steps:
+- action: launch
+ args:
+ - enable_javascript=0
+- action: quit
+
diff --git a/monkey-test/start-stop.yaml b/monkey-test/start-stop.yaml
new file mode 100644
index 0000000..6b8f4f3
--- /dev/null
+++ b/monkey-test/start-stop.yaml
@@ -0,0 +1,6 @@
+title: start and stop browser
+group: initial
+steps:
+- action: launch
+- action: quit
+