Skip to content

Commit 70f45a7

Browse files
authored
Merge pull request #95 from Kitware/playwright-test
ci: use playwright in tests instead of selenium
2 parents 1756eec + 7092f68 commit 70f45a7

37 files changed

+100
-75
lines changed

.github/workflows/test_and_release.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ jobs:
6464
run: |
6565
pip install .[dev]
6666
pip install -r tests/requirements.txt
67+
playwright install
6768
6869
- name: Install OSMesa for Linux
6970
if: matrix.config.os == 'ubuntu-latest'
@@ -72,7 +73,7 @@ jobs:
7273
- name: Run Tests
7374
run: |
7475
# Run the tests with coverage so we get a coverage report too
75-
coverage run --source . -m pytest ./tests --firefox --headless --html=report-${{ matrix.config.name }}-${{ matrix.python-version }}.html
76+
coverage run --source . -m pytest ./tests
7677
# Print the coverage report
7778
coverage report -m
7879
@@ -85,9 +86,9 @@ jobs:
8586
with:
8687
name: pytest-results-${{ matrix.config.name }}
8788
path: |
88-
visual_baseline/**/*.png
89+
tests/refs/*.yml
90+
tests/refs/**/*.png
8991
assets/**
90-
report-*.html
9192
retention-days: 1
9293

9394
release:
@@ -120,4 +121,4 @@ jobs:
120121

121122
- name: Publish package distributions to PyPI
122123
if: steps.release.outputs.released == 'true'
123-
uses: pypa/gh-action-pypi-publish@release/v1
124+
uses: pypa/gh-action-pypi-publish@release/v1

tests/conftest.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@
66
HELPER = FixtureHelper(ROOT_PATH)
77

88

9-
@pytest.fixture()
10-
def baseline_image():
11-
HELPER.remove_page_urls()
12-
yield
13-
HELPER.remove_page_urls()
9+
@pytest.fixture
10+
def ref_dir() -> Path:
11+
return Path(__file__).parent / "refs"
1412

1513

1614
@pytest.fixture
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
- document:
2+
- banner:
3+
- button
4+
- text: Int64 Validation 1
5+
- main:
6+
- img
38.1 KB
Loading
39.5 KB
Loading

tests/refs/test_rendering_lut.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
- document:
2+
- banner:
3+
- button
4+
- text: PyVista Lookup Table N Colors 1
5+
- main:
6+
- img
52.4 KB
Loading
53.9 KB
Loading
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
- document:
2+
- banner:
3+
- button
4+
- text: VTK Volume Rendering 1
5+
- main:
6+
- img
75.1 KB
Loading

0 commit comments

Comments
 (0)