Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaceves committed Mar 3, 2021
2 parents 50ca9fc + 7136938 commit f483121
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/productionintegration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests nose2
- name: Test with Selenium
run: |
Expand Down Expand Up @@ -56,4 +57,3 @@ jobs:
# - name: Test with Selenium
# run: |
# cd test-production-integration && export SERVER_URL="http://dorresteintesthub.ucsd.edu:5005" && nose2 -v test_selenium && cd ..

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ To simulate selenium and production integration tests:
1. Check that graphs in Chemical Explorer are functional, available after clicking an example chemical's 'view assocations' button. (e.g. ```/compoundenrichmentdashboard?compound=Spectral%20Match%20to%20Sulfachloropyridazine%20from%20NIST14```)
1. Test all buttons to ensure links are correct.


## Updating ReDU Data Procedure

One of the key steps in ReDU is the updating of the database to include the latest identifications for files within ReDU. These are the following steps:
Expand Down
7 changes: 7 additions & 0 deletions test-production-integration/test_selenium.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
from selenium.webdriver.common.by import By
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.support import expected_conditions as EC

from selenium.webdriver.support.ui import WebDriverWait


from selenium.webdriver.common.keys import Keys
import unittest, time, re
import os
Expand All @@ -14,20 +17,23 @@
SERVER_URL = os.environ.get("SERVER_URL", "https://redu.ucsd.edu")

class TestInterfaceready(unittest.TestCase):

def setUp(self):
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--window-size=1420,1080')
chrome_options.add_argument('--headless')
self.driver = webdriver.Chrome(options=chrome_options)
self.driver.implicitly_wait(30)


def tearDown(self):
self.driver.quit()

def test_compound_enrichment(self):
#going to the page
url = "{}/compoundenrichmentdashboard?compound=ESCITALOPRAM%20OXALATE".format(SERVER_URL)


self.driver.get(url)
time.sleep(1)
Expand All @@ -37,6 +43,7 @@ def test_compound_enrichment(self):
wait.until(EC.visibility_of_element_located((By.ID,'querycompound')))
#clicking the button
python_button = self.driver.find_element_by_id('querycompound')

python_button.click()

try:
Expand Down

0 comments on commit f483121

Please sign in to comment.