aboutsummaryrefslogtreecommitdiff
path: root/webtests/show_trait_js_test.py
diff options
context:
space:
mode:
authorLei Yan2013-09-13 14:07:27 -0500
committerLei Yan2013-09-13 14:07:27 -0500
commitaf24c0d610d9a2189f86677e4f23deb372ee2bf7 (patch)
tree53480351b97727670637a37dbd4c78e52446ae88 /webtests/show_trait_js_test.py
parent155e2997613c0750de30b734686f8977524956f9 (diff)
parentc5fc931621707865357ace4b637db7481e0be552 (diff)
downloadgenenetwork2-af24c0d610d9a2189f86677e4f23deb372ee2bf7.tar.gz
Merge https://github.com/zsloan/genenetwork
Resolved conflicts: wqflask/base/trait.py wqflask/wqflask/correlation/correlationFunction.py wqflask/wqflask/correlation/correlation_function.py wqflask/wqflask/correlation/correlation_functions.py wqflask/wqflask/correlation/show_corr_results.py
Diffstat (limited to 'webtests/show_trait_js_test.py')
-rw-r--r--webtests/show_trait_js_test.py42
1 files changed, 42 insertions, 0 deletions
diff --git a/webtests/show_trait_js_test.py b/webtests/show_trait_js_test.py
new file mode 100644
index 00000000..0fd2c16c
--- /dev/null
+++ b/webtests/show_trait_js_test.py
@@ -0,0 +1,42 @@
+"""
+Test if JS is working on the show trait page
+
+>>> test.get("alexandria.uthsc.edu:89")
+title: GeneNetwork
+
+Choose the species
+>>> test.click_option('''//*[@id="species"]''', 'Human')
+
+Choose the group
+>>> test.click_option('''//*[@id="cross"]''', 'Human Brain Transcriptome (Yale/Kavli)')
+
+Choose the type
+>>> test.click_option('''//*[@id="tissue"]''', 'Orbital Prefrontal Cortex mRNA')
+
+Enter the Get Any
+>>> test.enter_text('''//*[@id="tfor"]''', 'shh')
+text: shh
+
+Search
+>>> test.click('//*[@id="btsearch"]')
+clicked: Search
+
+Choose the first result
+>>> test.click('''//*[@id="KIN_YSM_OFC_0711::3081205"]/td[2]/a''')
+clicked: 3081205
+
+A new window is created, so we switch to it
+>>> test.switch_window()
+title: KIN/YSM Human OFC Affy Hu-Exon 1.0 ST (Jul11) Quantile : 3081205: Display Trait
+
+Check that the Calculate Correlations tab is closed (if javascript isn't working, it will be open)
+>>> test.get_element_style('''//*[@id="sectionbody3"]''')
+style: display: none;
+
+"""
+
+from __future__ import absolute_import, division, print_function
+
+from browser_run import *
+
+testmod()