-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
beginnings of Pythium selenium test for webapollo
- Loading branch information
Showing
3 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
plugins/WebApollo/tests/selenium_tests/lib/WebApolloTest.py
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,35 @@ | ||
import os | ||
import sys | ||
import time | ||
sys.path.append( 'tests/selenium_tests' ) # relative to JBrowse root | ||
|
||
from jbrowse_selenium import JBrowseTest | ||
|
||
class WebApolloTest (JBrowseTest): | ||
|
||
wa_url = None | ||
|
||
def setUp( self ): | ||
super( WebApolloTest, self ).setUp() | ||
self.login( os.environ['WA_USER'], os.environ['WA_PASS'] ) | ||
self.browser.get( self.baseURL() ) | ||
|
||
def baseURL( self ): | ||
return self.waURL()+'/jbrowse/index.html' | ||
|
||
def waURL( self ): | ||
if not self.wa_url: | ||
self.wa_url = os.environ['WA_URL'] | ||
return self.wa_url | ||
|
||
def login( self, username, password ): | ||
self.browser.get( self.waURL() + '/Login' ); | ||
username_input = self.assert_element('//input[@id="username"]') | ||
password_input = self.assert_element('//input[@id="password"]') | ||
username_input.send_keys(username) | ||
password_input.send_keys(password) | ||
login_button = self.assert_element('//button[@id="login_button"]') | ||
login_button.click() | ||
time.sleep( 0.4 ) | ||
pass | ||
|
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,2 @@ | ||
from WebApolloTest import WebApolloTest | ||
|
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,29 @@ | ||
import unittest | ||
from lib import WebApolloTest; | ||
|
||
class PythiumTest(WebApolloTest, unittest.TestCase): | ||
|
||
data_dir = 'sample_data/json/volvox' | ||
|
||
def setUp( self ): | ||
# call( "rm -rf sample_data/json/volvox/", shell=True ) | ||
# call( "bin/prepare-refseqs.pl --fasta docs/tutorial/data_files/volvox.fa --out sample_data/json/volvox/", shell=True ) | ||
# call( "bin/biodb-to-json.pl --conf docs/tutorial/conf_files/volvox.json --out sample_data/json/volvox/", shell=True ) | ||
# call( "bin/wig-to-json.pl --out sample_data/json/volvox/ --wig docs/tutorial/data_files/volvox_microarray.wig", shell=True ) | ||
# call( "bin/add-track-json.pl sample_data/raw/volvox/volvox_microarray.bw.conf sample_data/json/volvox/trackList.json", shell=True ) | ||
# call( "bin/add-track-json.pl sample_data/raw/volvox/volvox-sorted.bam.conf sample_data/json/volvox/trackList.json", shell=True ) | ||
# call( "bin/add-track-json.pl sample_data/raw/volvox/volvox-sorted.bam.coverage.conf sample_data/json/volvox/trackList.json", shell=True ) | ||
# call( "bin/generate-names.pl --dir sample_data/json/volvox/", shell=True ) | ||
super( PythiumTest, self ).setUp() | ||
|
||
|
||
def test_pythium( self ): | ||
test_ref = 'scf1117875582023'; | ||
# select "ctgA from the dropdown | ||
self.select_refseq( test_ref ) | ||
|
||
# check a good browser title | ||
assert test_ref in self.browser.title, "browser title is actually %s" % self.browser.title | ||
|
||
self.browser.close() | ||
|