Skip to content

Commit d7399cc

Browse files
committed
Merge branch 'use_playwright_for_acceptance_tests' into develop
2 parents 7bbd685 + b453d70 commit d7399cc

File tree

9 files changed

+459
-421
lines changed

9 files changed

+459
-421
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,17 @@ jobs:
6868
export MECAB_PATH=/lib/x86_64-linux-gnu/libmecab.so.2
6969
pytest
7070
71-
# Skipping acceptance tests for 3.8, just to save some time.
71+
- name: Playwright install
72+
run: playwright install
73+
74+
- name: Playwright smoke test
75+
run: |
76+
set -x
77+
set -e
78+
inv playwright
79+
7280
- name: Acceptance testing
73-
if: matrix.python_version != '3.8'
81+
if: matrix.python_version == '3.11' || matrix.python_version == '3.12' || matrix.python_version == '3.13'
7482
uses: nick-fields/retry@v3
7583
with:
7684
max_attempts: 3
@@ -88,7 +96,7 @@ jobs:
8896
8997
# Skipping acceptance tests for 3.8, just to save some time.
9098
- name: Mobile acceptance testing
91-
if: matrix.python_version != '3.8'
99+
if: matrix.python_version == '3.11' || matrix.python_version == '3.12' || matrix.python_version == '3.13'
92100
uses: nick-fields/retry@v3
93101
with:
94102
max_attempts: 3
@@ -104,15 +112,6 @@ jobs:
104112
fi
105113
exit $exit_code
106114
107-
- name: Playwright install
108-
run: playwright install
109-
110-
- name: Playwright smoke test
111-
run: |
112-
set -x
113-
set -e
114-
inv playwright
115-
116115
- name: Check flit package
117116
run: |
118117
mkdir ${{ github.workspace }}/../lute_flit
@@ -166,6 +165,9 @@ jobs:
166165
ls ${{ github.workspace }}
167166
cat ${{ github.workspace }}/lute/config/config.yml
168167
168+
- name: Playwright install
169+
run: playwright install
170+
169171
# Run one particular sanity check.
170172
#
171173
# Note this isn't _completely_ valid because the test loads

plugins/lute-mandarin/requirements.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ pytest==7.4.2
6060
pytest-base-url==2.0.0
6161
pytest-bdd==7.0.0
6262
pytest-playwright==0.4.3
63-
pytest-splinter==3.3.2
6463
python-slugify==8.0.1
6564
PyYAML==6.0.1
6665
requests==2.31.0
@@ -69,7 +68,6 @@ six==1.16.0
6968
sniffio==1.3.0
7069
sortedcontainers==2.4.0
7170
soupsieve==2.5
72-
splinter==0.19.0
7371
SQLAlchemy==2.0.21
7472
subtitle-parser==1.3.0
7573
text-unidecode==1.3

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ dev = [
5252
"pipdeptree>=2.13.0,<3",
5353
"pylint>=2.17.5,<4",
5454
"pytest-bdd>=7.0.0,<8",
55-
"pytest-splinter>=3.3.2,<4",
5655
"playwright>=1.39.0,<2",
5756
"pre-commit>=3.5.0,<4",
5857
"black>=23.10.1,<24",

tasks.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,6 @@ def _run_acceptance( # pylint: disable=too-many-arguments,too-many-positional-a
185185
run_test = [
186186
"pytest",
187187
"tests/acceptance",
188-
"--splinter-screenshot-dir=tests/acceptance/failure_screenshots",
189-
"--splinter-webdriver=chrome",
190188
f"--port={port}",
191189
]
192190

tests/acceptance/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Web tests with pytest-splinter
1+
# Web tests with playwright
22

3-
Ref https://pytest-splinter.readthedocs.io/en/3.3.2/#example
3+
Ref https://playwright.dev/python/docs/intro
44

55
## How to run the tests
66

0 commit comments

Comments
 (0)