Skip to content

Commit 66c1fa2

Browse files
authored
Merge pull request #380 from NHSDigital/remove-screenshots-path
Remove `screenshots_path` fixture
2 parents 5c9d279 + 17a4ed4 commit 66c1fa2

File tree

5 files changed

+2
-28
lines changed

5 files changed

+2
-28
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,6 @@ allure-report/
330330
allure-results/
331331

332332
# Playwright
333-
screenshots/
334333
test-results/
335334

336335
# Project

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ $ pytest --headed
9595
#### Screenshots
9696
9797
To take screenshots while the tests are running there is a `--screenshot`
98-
command line option. The screenshots will be saved in a `screenshots`
98+
command line option. The screenshots will be saved in a `test-results`
9999
directory.
100100
101101
```shell
@@ -202,4 +202,3 @@ The following changes will be added soon:
202202
203203
- complete automation of data prep. The first step of the workflow will be to generate a new valid cohort file to be used by the rest of the workflow. This will remove the need for URN and input file to be added as inputs.
204204
- Better reporting. Current thinking is to have the test results uploaded to Splunk for better analysis, however it is currently unknown whether this will be permitted. Another option would be to publish the reports to github pages, again this may be blocked by permissions. Lastly, a tabular version of the results could be generated directly on the workflow output, this is most definitely a 'backup' option.
205-

mavis/test/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
review_school_move_page,
3737
school_moves_page,
3838
schools,
39-
screenshots_path,
4039
sessions_page,
4140
start_page,
4241
superuser,
@@ -84,7 +83,6 @@
8483
"review_school_move_page",
8584
"school_moves_page",
8685
"schools",
87-
"screenshots_path",
8886
"sessions_page",
8987
"start_page",
9088
"superuser",

mavis/test/fixtures/__init__.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,7 @@
4040
team,
4141
users,
4242
)
43-
from .playwright import (
44-
base_url,
45-
basic_auth,
46-
browser_context_args,
47-
browser_type,
48-
screenshots_path,
49-
)
43+
from .playwright import base_url, basic_auth, browser_context_args, browser_type
5044

5145
__all__ = [
5246
"add_vaccine_batch",
@@ -81,7 +75,6 @@
8175
"review_school_move_page",
8276
"school_moves_page",
8377
"schools",
84-
"screenshots_path",
8578
"sessions_page",
8679
"start_page",
8780
"superuser",

mavis/test/fixtures/playwright.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from datetime import datetime
2-
from pathlib import Path
31
import os
42
from typing import Optional
53

@@ -20,19 +18,6 @@ def basic_auth() -> dict[str, str]:
2018
}
2119

2220

23-
@pytest.fixture(scope="session")
24-
def screenshots_path(pytestconfig) -> Optional[Path]:
25-
screenshot = pytestconfig.getoption("screenshot")
26-
27-
if screenshot == "off":
28-
return None
29-
30-
session_name = datetime.now().isoformat()
31-
path = Path("screenshots") / session_name
32-
path.mkdir(parents=True, exist_ok=True)
33-
return path
34-
35-
3621
@pytest.fixture(scope="session")
3722
def browser_type(playwright: Playwright, device: Optional[str]) -> BrowserType:
3823
device = device or "Desktop Chrome"

0 commit comments

Comments
 (0)