From bf699b589b1ec42c2e3e11957458e097f796f1cb Mon Sep 17 00:00:00 2001 From: Liz Gehret Date: Wed, 21 Jan 2026 12:00:52 +0100 Subject: [PATCH 1/3] LANG: skip chrome selenium tests on linux --- q2_vizard/tests/test_boxplot.py | 2 ++ q2_vizard/tests/test_heatmap.py | 2 ++ q2_vizard/tests/test_lineplot.py | 2 ++ q2_vizard/tests/test_scatterplot.py | 2 ++ q2_vizard/tests/test_util.py | 14 ++++++++++++++ 5 files changed, 22 insertions(+) diff --git a/q2_vizard/tests/test_boxplot.py b/q2_vizard/tests/test_boxplot.py index 5b047d3..4acb65d 100644 --- a/q2_vizard/tests/test_boxplot.py +++ b/q2_vizard/tests/test_boxplot.py @@ -17,6 +17,7 @@ from qiime2.plugin.testing import TestPluginBase from qiime2 import Metadata +from .test_util import skip_linux from q2_vizard import boxplot @@ -377,6 +378,7 @@ def _selenium_boxplot_test( self.assertEqual(exp, obs) # run selenium tests using a headless chrome driver + @skip_linux def test_boxplot_chrome(self): chrome_options = ChromeOptions() chrome_options.add_argument('-headless') diff --git a/q2_vizard/tests/test_heatmap.py b/q2_vizard/tests/test_heatmap.py index c0fd20c..fac0387 100644 --- a/q2_vizard/tests/test_heatmap.py +++ b/q2_vizard/tests/test_heatmap.py @@ -19,6 +19,7 @@ from qiime2.plugin.testing import TestPluginBase from q2_vizard.heatmap import heatmap +from .test_util import skip_linux class TestHeatmap(TestPluginBase): @@ -106,6 +107,7 @@ def _selenium_heatmap_test(self, driver, x_measure, y_measure, self.assertEqual(mark_gradient, exp_gradient_mark) # run selenium checks with a chrome driver + @skip_linux def test_heatmap_chrome(self): chrome_options = ChromeOptions() chrome_options.add_argument('-headless') diff --git a/q2_vizard/tests/test_lineplot.py b/q2_vizard/tests/test_lineplot.py index 9a318a8..490ea3c 100644 --- a/q2_vizard/tests/test_lineplot.py +++ b/q2_vizard/tests/test_lineplot.py @@ -19,6 +19,7 @@ from qiime2 import Metadata from q2_vizard import lineplot +from .test_util import skip_linux class TestLineplot(TestPluginBase): @@ -174,6 +175,7 @@ def _selenium_lineplot_test(self, driver, x_measure, y_measure, self.assertIn(exp_text, page_source) # run selenium checks with a chrome driver + @skip_linux def test_lineplot_chrome(self): chrome_options = ChromeOptions() chrome_options.add_argument('-headless') diff --git a/q2_vizard/tests/test_scatterplot.py b/q2_vizard/tests/test_scatterplot.py index 407d35f..5214584 100644 --- a/q2_vizard/tests/test_scatterplot.py +++ b/q2_vizard/tests/test_scatterplot.py @@ -20,6 +20,7 @@ from qiime2.plugin.testing import TestPluginBase from q2_vizard.scatterplot import scatterplot_2d +from .test_util import skip_linux class TestScatterplot(TestPluginBase): @@ -122,6 +123,7 @@ def _dropdown_util(field, exp): self.assertEqual(mark_y, exp_y_mark) # run selenium checks with a chrome driver + @skip_linux def test_scatterplot_chrome(self): chrome_options = ChromeOptions() chrome_options.add_argument('-headless') diff --git a/q2_vizard/tests/test_util.py b/q2_vizard/tests/test_util.py index a89214f..d9c7983 100644 --- a/q2_vizard/tests/test_util.py +++ b/q2_vizard/tests/test_util.py @@ -7,12 +7,26 @@ # ---------------------------------------------------------------------------- import pandas as pd +import pytest +import os from qiime2.plugin.testing import TestPluginBase from qiime2 import Metadata from .._util import _col_type_validation, _measure_validation +# This is a temporary 'fix' to failing selenium tests with chrome when they +# are run within a container on the GHA linux runner. +# The failures aren't interesting and the hope is that this will either be +# fixed such that: +# A. None of the tests are run within a container, or +# B. The firefox tests in container plus chrome tests on mac will fill in +# enough gaps that we can see if something goes wrong that is interesting. +skip_linux = pytest.mark.skipif( + os.getenv('SKIP_SELENIUM', '') == '1', + reason='skipping Selenium tests on chrome within linux container' + ) + class TestBase(TestPluginBase): package = 'q2_vizard.tests' From c3ac0e30d0014d5a94970746b4489ae741cd7bd9 Mon Sep 17 00:00:00 2001 From: Liz Gehret Date: Wed, 21 Jan 2026 14:28:13 +0100 Subject: [PATCH 2/3] guess we need to skip firefox as well --- q2_vizard/tests/test_boxplot.py | 1 + q2_vizard/tests/test_heatmap.py | 1 + q2_vizard/tests/test_lineplot.py | 1 + q2_vizard/tests/test_scatterplot.py | 1 + q2_vizard/tests/test_util.py | 10 +++++----- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/q2_vizard/tests/test_boxplot.py b/q2_vizard/tests/test_boxplot.py index 4acb65d..533ef92 100644 --- a/q2_vizard/tests/test_boxplot.py +++ b/q2_vizard/tests/test_boxplot.py @@ -407,6 +407,7 @@ def test_boxplot_chrome(self): exp_single_box_outlier_marks_len) # run selenium tests using a headless firefox driver + @skip_linux def test_boxplot_firefox(self): firefox_options = FirefoxOptions() firefox_options.add_argument('-headless') diff --git a/q2_vizard/tests/test_heatmap.py b/q2_vizard/tests/test_heatmap.py index fac0387..f91042f 100644 --- a/q2_vizard/tests/test_heatmap.py +++ b/q2_vizard/tests/test_heatmap.py @@ -135,6 +135,7 @@ def test_heatmap_chrome(self): exp_y_mark, exp_gradient_mark, exp_mark_id) # run selenium checks with a firefox driver + @skip_linux def test_heatmap_firefox(self): firefox_options = FirefoxOptions() firefox_options.add_argument('-headless') diff --git a/q2_vizard/tests/test_lineplot.py b/q2_vizard/tests/test_lineplot.py index 490ea3c..03897f9 100644 --- a/q2_vizard/tests/test_lineplot.py +++ b/q2_vizard/tests/test_lineplot.py @@ -204,6 +204,7 @@ def test_lineplot_chrome(self): exp_marks_len, exp_mark_id, exp_x_mark, exp_y_mark, exp_y_measure) + @skip_linux def test_lineplot_firefox(self): firefox_options = FirefoxOptions() firefox_options.add_argument('-headless') diff --git a/q2_vizard/tests/test_scatterplot.py b/q2_vizard/tests/test_scatterplot.py index 5214584..afb883f 100644 --- a/q2_vizard/tests/test_scatterplot.py +++ b/q2_vizard/tests/test_scatterplot.py @@ -151,6 +151,7 @@ def test_scatterplot_chrome(self): exp_x_measure, exp_y_measure, exp_color_measure) # run selenium checks with a firefox driver + @skip_linux def test_scatterplot_firefox(self): firefox_options = FirefoxOptions() firefox_options.add_argument('-headless') diff --git a/q2_vizard/tests/test_util.py b/q2_vizard/tests/test_util.py index d9c7983..4e8e3d1 100644 --- a/q2_vizard/tests/test_util.py +++ b/q2_vizard/tests/test_util.py @@ -15,16 +15,16 @@ from .._util import _col_type_validation, _measure_validation -# This is a temporary 'fix' to failing selenium tests with chrome when they -# are run within a container on the GHA linux runner. +# This is a temporary 'fix' to failing selenium tests when they are run +# within a container on the GHA linux runner. # The failures aren't interesting and the hope is that this will either be # fixed such that: # A. None of the tests are run within a container, or -# B. The firefox tests in container plus chrome tests on mac will fill in -# enough gaps that we can see if something goes wrong that is interesting. +# B. The chrome & firefox tests on mac will fill in enough gaps +# that we can see if something goes wrong that is interesting. skip_linux = pytest.mark.skipif( os.getenv('SKIP_SELENIUM', '') == '1', - reason='skipping Selenium tests on chrome within linux container' + reason='skipping Selenium tests within linux container' ) From bdbd7426dee96dcfa40a5bf7a0a4e4346af2dcd3 Mon Sep 17 00:00:00 2001 From: Liz Gehret Date: Wed, 21 Jan 2026 18:15:33 +0100 Subject: [PATCH 3/3] name change to skip_selenium --- q2_vizard/tests/test_boxplot.py | 6 +++--- q2_vizard/tests/test_heatmap.py | 6 +++--- q2_vizard/tests/test_lineplot.py | 6 +++--- q2_vizard/tests/test_scatterplot.py | 6 +++--- q2_vizard/tests/test_util.py | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/q2_vizard/tests/test_boxplot.py b/q2_vizard/tests/test_boxplot.py index 533ef92..6f25bf8 100644 --- a/q2_vizard/tests/test_boxplot.py +++ b/q2_vizard/tests/test_boxplot.py @@ -17,7 +17,7 @@ from qiime2.plugin.testing import TestPluginBase from qiime2 import Metadata -from .test_util import skip_linux +from .test_util import skip_selenium from q2_vizard import boxplot @@ -378,7 +378,7 @@ def _selenium_boxplot_test( self.assertEqual(exp, obs) # run selenium tests using a headless chrome driver - @skip_linux + @skip_selenium def test_boxplot_chrome(self): chrome_options = ChromeOptions() chrome_options.add_argument('-headless') @@ -407,7 +407,7 @@ def test_boxplot_chrome(self): exp_single_box_outlier_marks_len) # run selenium tests using a headless firefox driver - @skip_linux + @skip_selenium def test_boxplot_firefox(self): firefox_options = FirefoxOptions() firefox_options.add_argument('-headless') diff --git a/q2_vizard/tests/test_heatmap.py b/q2_vizard/tests/test_heatmap.py index f91042f..83e129f 100644 --- a/q2_vizard/tests/test_heatmap.py +++ b/q2_vizard/tests/test_heatmap.py @@ -19,7 +19,7 @@ from qiime2.plugin.testing import TestPluginBase from q2_vizard.heatmap import heatmap -from .test_util import skip_linux +from .test_util import skip_selenium class TestHeatmap(TestPluginBase): @@ -107,7 +107,7 @@ def _selenium_heatmap_test(self, driver, x_measure, y_measure, self.assertEqual(mark_gradient, exp_gradient_mark) # run selenium checks with a chrome driver - @skip_linux + @skip_selenium def test_heatmap_chrome(self): chrome_options = ChromeOptions() chrome_options.add_argument('-headless') @@ -135,7 +135,7 @@ def test_heatmap_chrome(self): exp_y_mark, exp_gradient_mark, exp_mark_id) # run selenium checks with a firefox driver - @skip_linux + @skip_selenium def test_heatmap_firefox(self): firefox_options = FirefoxOptions() firefox_options.add_argument('-headless') diff --git a/q2_vizard/tests/test_lineplot.py b/q2_vizard/tests/test_lineplot.py index 03897f9..1bb68fb 100644 --- a/q2_vizard/tests/test_lineplot.py +++ b/q2_vizard/tests/test_lineplot.py @@ -19,7 +19,7 @@ from qiime2 import Metadata from q2_vizard import lineplot -from .test_util import skip_linux +from .test_util import skip_selenium class TestLineplot(TestPluginBase): @@ -175,7 +175,7 @@ def _selenium_lineplot_test(self, driver, x_measure, y_measure, self.assertIn(exp_text, page_source) # run selenium checks with a chrome driver - @skip_linux + @skip_selenium def test_lineplot_chrome(self): chrome_options = ChromeOptions() chrome_options.add_argument('-headless') @@ -204,7 +204,7 @@ def test_lineplot_chrome(self): exp_marks_len, exp_mark_id, exp_x_mark, exp_y_mark, exp_y_measure) - @skip_linux + @skip_selenium def test_lineplot_firefox(self): firefox_options = FirefoxOptions() firefox_options.add_argument('-headless') diff --git a/q2_vizard/tests/test_scatterplot.py b/q2_vizard/tests/test_scatterplot.py index afb883f..68bbd1c 100644 --- a/q2_vizard/tests/test_scatterplot.py +++ b/q2_vizard/tests/test_scatterplot.py @@ -20,7 +20,7 @@ from qiime2.plugin.testing import TestPluginBase from q2_vizard.scatterplot import scatterplot_2d -from .test_util import skip_linux +from .test_util import skip_selenium class TestScatterplot(TestPluginBase): @@ -123,7 +123,7 @@ def _dropdown_util(field, exp): self.assertEqual(mark_y, exp_y_mark) # run selenium checks with a chrome driver - @skip_linux + @skip_selenium def test_scatterplot_chrome(self): chrome_options = ChromeOptions() chrome_options.add_argument('-headless') @@ -151,7 +151,7 @@ def test_scatterplot_chrome(self): exp_x_measure, exp_y_measure, exp_color_measure) # run selenium checks with a firefox driver - @skip_linux + @skip_selenium def test_scatterplot_firefox(self): firefox_options = FirefoxOptions() firefox_options.add_argument('-headless') diff --git a/q2_vizard/tests/test_util.py b/q2_vizard/tests/test_util.py index 4e8e3d1..cb39e9b 100644 --- a/q2_vizard/tests/test_util.py +++ b/q2_vizard/tests/test_util.py @@ -22,7 +22,7 @@ # A. None of the tests are run within a container, or # B. The chrome & firefox tests on mac will fill in enough gaps # that we can see if something goes wrong that is interesting. -skip_linux = pytest.mark.skipif( +skip_selenium = pytest.mark.skipif( os.getenv('SKIP_SELENIUM', '') == '1', reason='skipping Selenium tests within linux container' )