|
18 | 18 | import pandas as pd
|
19 | 19 | import numpy as np
|
20 | 20 | from selenium import webdriver
|
21 |
| -from selenium.webdriver.chrome.options import Options |
| 21 | +from selenium.webdriver.chrome.options import Options as ChromeOptions |
| 22 | +from selenium.webdriver.firefox.options import Options as FirefoxOptions |
22 | 23 | from selenium.webdriver.common.by import By
|
23 | 24 |
|
24 | 25 | import qiime2
|
@@ -512,11 +513,21 @@ def test_vega_spec_nandling(self):
|
512 | 513 |
|
513 | 514 | self.assertEqual(spec['data'][0]['values'], exp)
|
514 | 515 |
|
515 |
| - def test_summarize_viz(self): |
516 |
| - chrome_options = Options() |
517 |
| - chrome_options.add_argument("--headless=new") |
518 |
| - driver = webdriver.Chrome(options=chrome_options) |
| 516 | + def test_summarize_viz_chrome(self): |
| 517 | + chrome_options = ChromeOptions() |
| 518 | + chrome_options.add_argument("-headless") |
519 | 519 |
|
| 520 | + with webdriver.Chrome(options=chrome_options) as driver: |
| 521 | + self._selenium_test(driver) |
| 522 | + |
| 523 | + def test_summarize_viz_firefox(self): |
| 524 | + firefox_options = FirefoxOptions() |
| 525 | + firefox_options.add_argument("-headless") |
| 526 | + |
| 527 | + with webdriver.Firefox(options=firefox_options) as driver: |
| 528 | + self._selenium_test(driver) |
| 529 | + |
| 530 | + def _selenium_test(self, driver): |
520 | 531 | table = biom.Table(np.array([[0, 1, 3],
|
521 | 532 | [1, 1, 2],
|
522 | 533 | [400, 450, 500],
|
|
0 commit comments