about summary refs log tree commit diff
path: root/test
diff options
context:
space:
mode:
authorMuriithi Frederick Muriuki2018-03-19 17:49:39 +0300
committerMuriithi Frederick Muriuki2018-03-19 17:49:39 +0300
commit883bcc257a38240de7de8888f78bac4406b5d027 (patch)
tree2736fbed0d66d1b841ee206e8a04e7574d046987 /test
parent178102c304e5ad1da2af5b2ab0af2484edb8a609 (diff)
downloadgenenetwork2-883bcc257a38240de7de8888f78bac4406b5d027.tar.gz
Initialise navigation tests.
* Start working on navigation tests.
Diffstat (limited to 'test')
-rw-r--r--test/requests/navigation_tests.py15
-rwxr-xr-xtest/requests/test-website.py7
2 files changed, 19 insertions, 3 deletions
diff --git a/test/requests/navigation_tests.py b/test/requests/navigation_tests.py
new file mode 100644
index 00000000..eda27324
--- /dev/null
+++ b/test/requests/navigation_tests.py
@@ -0,0 +1,15 @@
+from __future__ import print_function
+import re
+import requests
+from lxml.html import parse
+
+def check_navigation(args_obj, parser):
+    print("")
+    print("Checking navigation.")
+
+    host = args_obj.host
+    url = host + "/show_trait?trait_id=1435395_s_at&dataset=HC_M2_0606_P"
+    print("URL: ", url)
+    page = requests.get(url)
+    # Page is built by the javascript, hence using requests fails for this.
+    # Investigate use of selenium maybe?
diff --git a/test/requests/test-website.py b/test/requests/test-website.py
index 2bef6eb1..dbf3b822 100755
--- a/test/requests/test-website.py
+++ b/test/requests/test-website.py
@@ -7,6 +7,7 @@ from __future__ import print_function
 import argparse
 from link_checker import check_links
 from mapping_tests import check_mapping
+from navigation_tests import check_navigation
 from main_web_functionality import check_main_web_functionality
 
 print("Mechanical Rob firing up...")
@@ -57,9 +58,9 @@ parser.add_argument("-m", "--mapping", dest="accumulate"
                     , action="store_const", const=check_mapping, default=print_help
                     , help="Checks for mapping.")
 
-# parser.add_argument("-n", "--navigation", dest="accumulate"
-#                     , action="store_const", const=check_navigation, default=print_help
-#                     , help="Checks for navigation.")
+parser.add_argument("-n", "--navigation", dest="accumulate"
+                    , action="store_const", const=check_navigation, default=print_help
+                    , help="Checks for navigation.")
 
 # parser.add_argument("-s", "--skip-broken", dest="accumulate"
 #                     , action="store_const", const=dummy, default=print_help