Skip to content

Commit

Permalink
Add headless firefox test
Browse files Browse the repository at this point in the history
  • Loading branch information
Oddant1 committed Jun 6, 2024
1 parent 93e3cdc commit 142e3ab
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions q2_feature_table/tests/test_summarize.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
import pandas as pd
import numpy as np
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.chrome.options import Options as ChromeOptions
from selenium.webdriver.firefox.options import Options as FirefoxOptions
from selenium.webdriver.common.by import By

import qiime2
Expand Down Expand Up @@ -512,11 +513,21 @@ def test_vega_spec_nandling(self):

self.assertEqual(spec['data'][0]['values'], exp)

def test_summarize_viz(self):
chrome_options = Options()
chrome_options.add_argument("--headless=new")
driver = webdriver.Chrome(options=chrome_options)
def test_summarize_viz_chrome(self):
chrome_options = ChromeOptions()
chrome_options.add_argument("-headless")

with webdriver.Chrome(options=chrome_options) as driver:
self._selenium_test(driver)

def test_summarize_viz_firefox(self):
firefox_options = FirefoxOptions()
firefox_options.add_argument("-headless")

with webdriver.Firefox(options=firefox_options) as driver:
self._selenium_test(driver)

def _selenium_test(self, driver):
table = biom.Table(np.array([[0, 1, 3],
[1, 1, 2],
[400, 450, 500],
Expand Down

0 comments on commit 142e3ab

Please sign in to comment.