Skip to content

Commit a0bb0e0

Browse files
committed
Verify and enable xvfb
1 parent 5c7ddec commit a0bb0e0

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,11 @@ jobs:
117117

118118
- name: Install xvfb
119119
if: ${{ contains(matrix.BROWSER, 'chrome') }}
120-
run: sudo apt-get install xvfb
120+
run: |
121+
sudo apt-get update
122+
sudo apt-get install -y xvfb
123+
which Xvfb
124+
Xvfb -version
121125
122126
- name: Run Tests with Xvfb
123127
if: ${{ contains(matrix.BROWSER, 'chrome') }}

scripts/run_travis.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,24 @@ run_selenium() {
1515
pytest --capture=no --color=yes --verbose --durations=10 "$testdir"
1616
}
1717

18+
run_selenium_xvfb_enabled() {
19+
ENABLE_XVFB=1 pytest --capture=no --color=yes --verbose --durations=10 "$testdir"
20+
}
21+
1822
if [ "$INFO" == "lint" ]; then
1923
echo "Running lint"
2024
run_lint
2125
else
2226
case $BROWSER in
2327
*chrome*)
2428
echo "Running tests on Chrome"
25-
run_selenium
29+
echo "===== verify Xvfb ====="
30+
echo "which Xvfb -> $(which Xvfb || echo 'NOT FOUND')"
31+
echo "Running ps ->"
32+
ps -ef | grep '[X]vfb'
33+
echo "DISPLAY var -> $DISPLAY"
34+
echo "======================="
35+
run_selenium_xvfb_enabled
2636
;;
2737
*firefox*)
2838
echo "Running tests on Firefox"

tests/selenium/options_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ def test_removing_domain(self):
123123
domains = []
124124
assert len(domains) == 0, "No domains should be displayed after removal"
125125

126+
@pytest.mark.flaky(reruns=3)
126127
def test_reset_data(self):
127128
self.load_options_page()
128129
self.select_domain_list_tab()

0 commit comments

Comments
 (0)