-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Add tests for the demo site to check components are rendered co…
…rrectly
- Loading branch information
1 parent
fd540bf
commit 0b8c210
Showing
210 changed files
with
620 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
""" | ||
Modified from: https://github.com/symon-storozhenko/pytest-playwright-visual | ||
which nicely crafted and is very easy to use to: | ||
1. change the path where snapshots are written to include the GOV.UK GDS | ||
Frontend version. That way images are compared against the version that | ||
was used to generate them so slight changes in styling between GDS versions | ||
do not trigger test failures. This also allows the snapshots for each | ||
GDS version to be stored in the same directory, making comparisons easy. | ||
2. flatten the directory tree used for saving snapshots so it is easier to | ||
navigate when reviewing snapshots, particularly when using an image viewer | ||
to step through the screenshots for each gds version for a given test. | ||
""" | ||
|
||
import os | ||
import shutil | ||
import sys | ||
from io import BytesIO | ||
from pathlib import Path | ||
from typing import Any, Callable | ||
|
||
import pytest | ||
from PIL import Image | ||
from pixelmatch.contrib.PIL import pixelmatch | ||
|
||
os.environ.setdefault("DJANGO_ALLOW_ASYNC_UNSAFE", "true") | ||
|
||
|
||
def pytest_addoption(parser: Any) -> None: | ||
group = parser.getgroup("assert-snapshot", "Image Snapshot") | ||
group.addoption( | ||
"--update-snapshots", | ||
action="store_true", | ||
default=False, | ||
help="Update snapshots.", | ||
) | ||
|
||
|
||
@pytest.fixture | ||
def assert_snapshot( | ||
pytestconfig: Any, request: Any, browser_name: str, settings | ||
) -> Callable: | ||
gds_version = "gds-%s" % settings.CRISPY_GDS_FRONTEND_VERSION | ||
test_name = f"{str(Path(request.node.name))}[{str(sys.platform)}]-{gds_version}" | ||
|
||
def compare( | ||
img: bytes, *, threshold: float = 0.1, name=f"{test_name}.png", fail_fast=False | ||
) -> None: | ||
update_snapshot = pytestconfig.getoption("--update-snapshots") | ||
test_file_name = str(os.path.basename(Path(request.node.fspath))).strip(".py") | ||
|
||
filepath = ( | ||
Path(request.node.fspath).parent.resolve() / "snapshots" / test_file_name | ||
) | ||
filepath.mkdir(parents=True, exist_ok=True) | ||
file = filepath / name | ||
|
||
# Create a dir where all snapshot test failures will go | ||
results_dir_name = ( | ||
Path(request.node.fspath).parent.resolve() / "snapshot_tests_failures" | ||
) | ||
test_results_dir = results_dir_name / test_file_name | ||
|
||
# Remove a single test's past run dir with actual, diff and expected images | ||
if test_results_dir.exists(): | ||
shutil.rmtree(test_results_dir) | ||
if update_snapshot: | ||
file.write_bytes(img) | ||
pytest.fail("--> Snapshots updated. Please review images") | ||
if not file.exists(): | ||
file.write_bytes(img) | ||
# pytest.fail( | ||
pytest.fail("--> New snapshot(s) created. Please review images") | ||
|
||
img_a = Image.open(BytesIO(img)) | ||
img_b = Image.open(file) | ||
img_diff = Image.new("RGBA", img_a.size) | ||
mismatch = pixelmatch( | ||
img_a, img_b, img_diff, threshold=threshold, fail_fast=fail_fast | ||
) | ||
|
||
if mismatch == 0: | ||
return | ||
else: | ||
# Create new test_results folder | ||
test_results_dir.mkdir(parents=True, exist_ok=True) | ||
img_diff.save(f"{test_results_dir}/Diff_{name}") | ||
img_a.save(f"{test_results_dir}/Actual_{name}") | ||
img_b.save(f"{test_results_dir}/Expected_{name}") | ||
pytest.fail("--> Snapshots DO NOT match!") | ||
|
||
return compare |
Binary file added
BIN
+83.5 KB
...napshots/test_accordion/test_accordion__hide_all[chromium][linux]-gds-5.0.0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+83.5 KB
...napshots/test_accordion/test_accordion__hide_all[chromium][linux]-gds-5.2.0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+83.5 KB
...napshots/test_accordion/test_accordion__hide_all[chromium][linux]-gds-5.4.0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+83.5 KB
...napshots/test_accordion/test_accordion__hide_all[chromium][linux]-gds-5.6.0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+83.5 KB
...napshots/test_accordion/test_accordion__hide_all[chromium][linux]-gds-5.8.0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+84 KB
...hots/test_accordion/test_accordion__hide_section[chromium][linux]-gds-5.0.0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+84 KB
...hots/test_accordion/test_accordion__hide_section[chromium][linux]-gds-5.2.0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+84 KB
...hots/test_accordion/test_accordion__hide_section[chromium][linux]-gds-5.4.0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+84 KB
...hots/test_accordion/test_accordion__hide_section[chromium][linux]-gds-5.6.0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+84 KB
...hots/test_accordion/test_accordion__hide_section[chromium][linux]-gds-5.8.0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+83.4 KB
.../snapshots/test_accordion/test_accordion__layout[chromium][linux]-gds-5.0.0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+83.4 KB
.../snapshots/test_accordion/test_accordion__layout[chromium][linux]-gds-5.2.0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+83.4 KB
.../snapshots/test_accordion/test_accordion__layout[chromium][linux]-gds-5.4.0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+83.4 KB
.../snapshots/test_accordion/test_accordion__layout[chromium][linux]-gds-5.6.0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+83.4 KB
.../snapshots/test_accordion/test_accordion__layout[chromium][linux]-gds-5.8.0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+98.3 KB
...napshots/test_accordion/test_accordion__show_all[chromium][linux]-gds-5.0.0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+98.3 KB
...napshots/test_accordion/test_accordion__show_all[chromium][linux]-gds-5.2.0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+98.3 KB
...napshots/test_accordion/test_accordion__show_all[chromium][linux]-gds-5.4.0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+98.3 KB
...napshots/test_accordion/test_accordion__show_all[chromium][linux]-gds-5.6.0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+98.3 KB
...napshots/test_accordion/test_accordion__show_all[chromium][linux]-gds-5.8.0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+87.8 KB
...hots/test_accordion/test_accordion__show_section[chromium][linux]-gds-5.0.0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+87.8 KB
...hots/test_accordion/test_accordion__show_section[chromium][linux]-gds-5.2.0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+87.8 KB
...hots/test_accordion/test_accordion__show_section[chromium][linux]-gds-5.4.0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+87.8 KB
...hots/test_accordion/test_accordion__show_section[chromium][linux]-gds-5.6.0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+87.8 KB
...hots/test_accordion/test_accordion__show_section[chromium][linux]-gds-5.8.0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+58.4 KB
...hots/test_buttons/test_buttons__click_add_button[chromium][linux]-gds-5.0.0.png
Oops, something went wrong.
Binary file added
BIN
+58.4 KB
...hots/test_buttons/test_buttons__click_add_button[chromium][linux]-gds-5.2.0.png
Oops, something went wrong.
Binary file added
BIN
+58.4 KB
...hots/test_buttons/test_buttons__click_add_button[chromium][linux]-gds-5.4.0.png
Oops, something went wrong.
Binary file added
BIN
+58.4 KB
...hots/test_buttons/test_buttons__click_add_button[chromium][linux]-gds-5.6.0.png
Oops, something went wrong.
Binary file added
BIN
+58.4 KB
...hots/test_buttons/test_buttons__click_add_button[chromium][linux]-gds-5.8.0.png
Oops, something went wrong.
Binary file added
BIN
+62.4 KB
...demo/snapshots/test_buttons/test_buttons__layout[chromium][linux]-gds-5.0.0.png
Oops, something went wrong.
Binary file added
BIN
+62.4 KB
...demo/snapshots/test_buttons/test_buttons__layout[chromium][linux]-gds-5.2.0.png
Oops, something went wrong.
Binary file added
BIN
+62.4 KB
...demo/snapshots/test_buttons/test_buttons__layout[chromium][linux]-gds-5.4.0.png
Oops, something went wrong.
Binary file added
BIN
+62.4 KB
...demo/snapshots/test_buttons/test_buttons__layout[chromium][linux]-gds-5.6.0.png
Oops, something went wrong.
Binary file added
BIN
+62.4 KB
...demo/snapshots/test_buttons/test_buttons__layout[chromium][linux]-gds-5.8.0.png
Oops, something went wrong.
Binary file added
BIN
+73.9 KB
...napshots/test_checkboxes/test_checkboxes__layout[chromium][linux]-gds-5.0.0.png
Oops, something went wrong.
Binary file added
BIN
+74 KB
...napshots/test_checkboxes/test_checkboxes__layout[chromium][linux]-gds-5.2.0.png
Oops, something went wrong.
Binary file added
BIN
+74 KB
...napshots/test_checkboxes/test_checkboxes__layout[chromium][linux]-gds-5.4.0.png
Oops, something went wrong.
Binary file added
BIN
+74 KB
...napshots/test_checkboxes/test_checkboxes__layout[chromium][linux]-gds-5.6.0.png
Oops, something went wrong.
Binary file added
BIN
+74 KB
...napshots/test_checkboxes/test_checkboxes__layout[chromium][linux]-gds-5.8.0.png
Oops, something went wrong.
Binary file added
BIN
+85.2 KB
...eckboxes/test_checkboxes__leave_blank_and_submit[chromium][linux]-gds-5.0.0.png
Oops, something went wrong.
Binary file added
BIN
+85.1 KB
...eckboxes/test_checkboxes__leave_blank_and_submit[chromium][linux]-gds-5.2.0.png
Oops, something went wrong.
Binary file added
BIN
+85.1 KB
...eckboxes/test_checkboxes__leave_blank_and_submit[chromium][linux]-gds-5.4.0.png
Oops, something went wrong.
Binary file added
BIN
+85.1 KB
...eckboxes/test_checkboxes__leave_blank_and_submit[chromium][linux]-gds-5.6.0.png
Oops, something went wrong.
Binary file added
BIN
+85.1 KB
...eckboxes/test_checkboxes__leave_blank_and_submit[chromium][linux]-gds-5.8.0.png
Oops, something went wrong.
Binary file added
BIN
+65.5 KB
...kboxes/test_checkboxes__select_option_and_submit[chromium][linux]-gds-5.0.0.png
Oops, something went wrong.
Binary file added
BIN
+65.5 KB
...kboxes/test_checkboxes__select_option_and_submit[chromium][linux]-gds-5.2.0.png
Oops, something went wrong.
Binary file added
BIN
+65.5 KB
...kboxes/test_checkboxes__select_option_and_submit[chromium][linux]-gds-5.4.0.png
Oops, something went wrong.
Binary file added
BIN
+65.5 KB
...kboxes/test_checkboxes__select_option_and_submit[chromium][linux]-gds-5.6.0.png
Oops, something went wrong.
Binary file added
BIN
+65.5 KB
...kboxes/test_checkboxes__select_option_and_submit[chromium][linux]-gds-5.8.0.png
Oops, something went wrong.
Binary file added
BIN
+63.9 KB
...ate_input/test_date_input__enter_date_and_submit[chromium][linux]-gds-5.0.0.png
Oops, something went wrong.
Binary file added
BIN
+63.9 KB
...ate_input/test_date_input__enter_date_and_submit[chromium][linux]-gds-5.2.0.png
Oops, something went wrong.
Binary file added
BIN
+63.9 KB
...ate_input/test_date_input__enter_date_and_submit[chromium][linux]-gds-5.4.0.png
Oops, something went wrong.
Binary file added
BIN
+63.9 KB
...ate_input/test_date_input__enter_date_and_submit[chromium][linux]-gds-5.6.0.png
Oops, something went wrong.
Binary file added
BIN
+63.9 KB
...ate_input/test_date_input__enter_date_and_submit[chromium][linux]-gds-5.8.0.png
Oops, something went wrong.
Binary file added
BIN
+64.7 KB
...napshots/test_date_input/test_date_input__layout[chromium][linux]-gds-5.0.0.png
Oops, something went wrong.
Binary file added
BIN
+64.7 KB
...napshots/test_date_input/test_date_input__layout[chromium][linux]-gds-5.2.0.png
Oops, something went wrong.
Binary file added
BIN
+64.7 KB
...napshots/test_date_input/test_date_input__layout[chromium][linux]-gds-5.4.0.png
Oops, something went wrong.
Binary file added
BIN
+64.7 KB
...napshots/test_date_input/test_date_input__layout[chromium][linux]-gds-5.6.0.png
Oops, something went wrong.
Binary file added
BIN
+64.7 KB
...napshots/test_date_input/test_date_input__layout[chromium][linux]-gds-5.8.0.png
Oops, something went wrong.
Binary file added
BIN
+74.5 KB
...te_input/test_date_input__leave_blank_and_submit[chromium][linux]-gds-5.0.0.png
Oops, something went wrong.
Binary file added
BIN
+74.5 KB
...te_input/test_date_input__leave_blank_and_submit[chromium][linux]-gds-5.2.0.png
Oops, something went wrong.
Binary file added
BIN
+74.3 KB
...te_input/test_date_input__leave_blank_and_submit[chromium][linux]-gds-5.4.0.png
Oops, something went wrong.
Binary file added
BIN
+74.5 KB
...te_input/test_date_input__leave_blank_and_submit[chromium][linux]-gds-5.6.0.png
Oops, something went wrong.
Binary file added
BIN
+74.5 KB
...te_input/test_date_input__leave_blank_and_submit[chromium][linux]-gds-5.8.0.png
Oops, something went wrong.
Binary file added
BIN
+56.6 KB
...napshots/test_details/test_details__hide_summary[chromium][linux]-gds-5.0.0.png
Oops, something went wrong.
Binary file added
BIN
+56.6 KB
...napshots/test_details/test_details__hide_summary[chromium][linux]-gds-5.2.0.png
Oops, something went wrong.
Binary file added
BIN
+56.6 KB
...napshots/test_details/test_details__hide_summary[chromium][linux]-gds-5.4.0.png
Oops, something went wrong.
Binary file added
BIN
+56.6 KB
...napshots/test_details/test_details__hide_summary[chromium][linux]-gds-5.6.0.png
Oops, something went wrong.
Binary file added
BIN
+56.6 KB
...napshots/test_details/test_details__hide_summary[chromium][linux]-gds-5.8.0.png
Oops, something went wrong.
Binary file added
BIN
+55.9 KB
...demo/snapshots/test_details/test_details__layout[chromium][linux]-gds-5.0.0.png
Oops, something went wrong.
Binary file added
BIN
+55.9 KB
...demo/snapshots/test_details/test_details__layout[chromium][linux]-gds-5.2.0.png
Oops, something went wrong.
Binary file added
BIN
+55.9 KB
...demo/snapshots/test_details/test_details__layout[chromium][linux]-gds-5.4.0.png
Oops, something went wrong.
Binary file added
BIN
+55.9 KB
...demo/snapshots/test_details/test_details__layout[chromium][linux]-gds-5.6.0.png
Oops, something went wrong.
Binary file added
BIN
+55.9 KB
...demo/snapshots/test_details/test_details__layout[chromium][linux]-gds-5.8.0.png
Oops, something went wrong.
Binary file added
BIN
+68.5 KB
...napshots/test_details/test_details__show_summary[chromium][linux]-gds-5.0.0.png
Oops, something went wrong.
Binary file added
BIN
+68.5 KB
...napshots/test_details/test_details__show_summary[chromium][linux]-gds-5.2.0.png
Oops, something went wrong.
Binary file added
BIN
+68.5 KB
...napshots/test_details/test_details__show_summary[chromium][linux]-gds-5.4.0.png
Oops, something went wrong.
Binary file added
BIN
+68.5 KB
...napshots/test_details/test_details__show_summary[chromium][linux]-gds-5.6.0.png
Oops, something went wrong.
Binary file added
BIN
+68.5 KB
...napshots/test_details/test_details__show_summary[chromium][linux]-gds-5.8.0.png
Oops, something went wrong.
Binary file added
BIN
+68.3 KB
...ts/test_fieldset/test_fieldset_component__layout[chromium][linux]-gds-5.0.0.png
Oops, something went wrong.
Binary file added
BIN
+68.3 KB
...ts/test_fieldset/test_fieldset_component__layout[chromium][linux]-gds-5.2.0.png
Oops, something went wrong.
Binary file added
BIN
+68.3 KB
...ts/test_fieldset/test_fieldset_component__layout[chromium][linux]-gds-5.4.0.png
Oops, something went wrong.
Binary file added
BIN
+68.3 KB
...ts/test_fieldset/test_fieldset_component__layout[chromium][linux]-gds-5.6.0.png
Oops, something went wrong.
Binary file added
BIN
+68.3 KB
...ts/test_fieldset/test_fieldset_component__layout[chromium][linux]-gds-5.8.0.png
Oops, something went wrong.
Binary file added
BIN
+65.1 KB
...t_file_upload/test_file_upload_component__layout[chromium][linux]-gds-5.0.0.png
Oops, something went wrong.
Binary file added
BIN
+65.1 KB
...t_file_upload/test_file_upload_component__layout[chromium][linux]-gds-5.2.0.png
Oops, something went wrong.
Binary file added
BIN
+65.1 KB
...t_file_upload/test_file_upload_component__layout[chromium][linux]-gds-5.4.0.png
Oops, something went wrong.
Binary file added
BIN
+65.1 KB
...t_file_upload/test_file_upload_component__layout[chromium][linux]-gds-5.6.0.png
Oops, something went wrong.
Binary file added
BIN
+65.1 KB
...t_file_upload/test_file_upload_component__layout[chromium][linux]-gds-5.8.0.png
Oops, something went wrong.
Binary file added
BIN
+61.1 KB
...napshots/test_inset/test_inset_component__layout[chromium][linux]-gds-5.0.0.png
Oops, something went wrong.
Binary file added
BIN
+61.1 KB
...napshots/test_inset/test_inset_component__layout[chromium][linux]-gds-5.2.0.png
Oops, something went wrong.
Binary file added
BIN
+61.1 KB
...napshots/test_inset/test_inset_component__layout[chromium][linux]-gds-5.4.0.png
Oops, something went wrong.
Binary file added
BIN
+61.1 KB
...napshots/test_inset/test_inset_component__layout[chromium][linux]-gds-5.6.0.png
Oops, something went wrong.
Binary file added
BIN
+61.1 KB
...napshots/test_inset/test_inset_component__layout[chromium][linux]-gds-5.8.0.png
Oops, something went wrong.
Binary file added
BIN
+65.9 KB
...apshots/test_panels/test_panel_component__layout[chromium][linux]-gds-5.0.0.png
Oops, something went wrong.
Binary file added
BIN
+65.9 KB
...apshots/test_panels/test_panel_component__layout[chromium][linux]-gds-5.2.0.png
Oops, something went wrong.
Binary file added
BIN
+65.9 KB
...apshots/test_panels/test_panel_component__layout[chromium][linux]-gds-5.4.0.png
Oops, something went wrong.
Binary file added
BIN
+65.9 KB
...apshots/test_panels/test_panel_component__layout[chromium][linux]-gds-5.6.0.png
Oops, something went wrong.
Binary file added
BIN
+65.9 KB
...apshots/test_panels/test_panel_component__layout[chromium][linux]-gds-5.8.0.png
Oops, something went wrong.
Binary file added
BIN
+65.8 KB
...pshots/test_radios/test_radios__click_and_submit[chromium][linux]-gds-5.0.0.png
Oops, something went wrong.
Binary file added
BIN
+65.8 KB
...pshots/test_radios/test_radios__click_and_submit[chromium][linux]-gds-5.2.0.png
Oops, something went wrong.
Binary file added
BIN
+65.8 KB
...pshots/test_radios/test_radios__click_and_submit[chromium][linux]-gds-5.4.0.png
Oops, something went wrong.
Binary file added
BIN
+65.8 KB
...pshots/test_radios/test_radios__click_and_submit[chromium][linux]-gds-5.6.0.png
Oops, something went wrong.
Binary file added
BIN
+65.8 KB
...pshots/test_radios/test_radios__click_and_submit[chromium][linux]-gds-5.8.0.png
Oops, something went wrong.
Binary file added
BIN
+86.2 KB
...s/demo/snapshots/test_radios/test_radios__layout[chromium][linux]-gds-5.0.0.png
Oops, something went wrong.
Binary file added
BIN
+86 KB
...s/demo/snapshots/test_radios/test_radios__layout[chromium][linux]-gds-5.2.0.png
Oops, something went wrong.
Binary file added
BIN
+86 KB
...s/demo/snapshots/test_radios/test_radios__layout[chromium][linux]-gds-5.4.0.png
Oops, something went wrong.
Binary file added
BIN
+86 KB
...s/demo/snapshots/test_radios/test_radios__layout[chromium][linux]-gds-5.6.0.png
Oops, something went wrong.
Binary file added
BIN
+86 KB
...s/demo/snapshots/test_radios/test_radios__layout[chromium][linux]-gds-5.8.0.png
Oops, something went wrong.
Binary file added
BIN
+109 KB
.../test_radios/test_radios__leave_blank_and_submit[chromium][linux]-gds-5.0.0.png
Oops, something went wrong.
Binary file added
BIN
+109 KB
.../test_radios/test_radios__leave_blank_and_submit[chromium][linux]-gds-5.2.0.png
Oops, something went wrong.
Binary file added
BIN
+110 KB
.../test_radios/test_radios__leave_blank_and_submit[chromium][linux]-gds-5.4.0.png
Oops, something went wrong.
Binary file added
BIN
+109 KB
.../test_radios/test_radios__leave_blank_and_submit[chromium][linux]-gds-5.6.0.png
Oops, something went wrong.
Binary file added
BIN
+109 KB
.../test_radios/test_radios__leave_blank_and_submit[chromium][linux]-gds-5.8.0.png
Oops, something went wrong.
Binary file added
BIN
+68.9 KB
.../test_radios_conditional__fill_hidden_and_submit[chromium][linux]-gds-5.0.0.png
Oops, something went wrong.
Binary file added
BIN
+68.9 KB
.../test_radios_conditional__fill_hidden_and_submit[chromium][linux]-gds-5.2.0.png
Oops, something went wrong.
Binary file added
BIN
+68.9 KB
.../test_radios_conditional__fill_hidden_and_submit[chromium][linux]-gds-5.4.0.png
Oops, something went wrong.
Binary file added
BIN
+68.9 KB
.../test_radios_conditional__fill_hidden_and_submit[chromium][linux]-gds-5.6.0.png
Oops, something went wrong.
Binary file added
BIN
+68.9 KB
.../test_radios_conditional__fill_hidden_and_submit[chromium][linux]-gds-5.8.0.png
Oops, something went wrong.
Binary file added
BIN
+68.2 KB
...dios_conditional/test_radios_conditional__layout[chromium][linux]-gds-5.0.0.png
Oops, something went wrong.
Binary file added
BIN
+68.3 KB
...dios_conditional/test_radios_conditional__layout[chromium][linux]-gds-5.2.0.png
Oops, something went wrong.
Binary file added
BIN
+68.3 KB
...dios_conditional/test_radios_conditional__layout[chromium][linux]-gds-5.4.0.png
Oops, something went wrong.
Binary file added
BIN
+68.3 KB
...dios_conditional/test_radios_conditional__layout[chromium][linux]-gds-5.6.0.png
Oops, something went wrong.
Binary file added
BIN
+68.3 KB
...dios_conditional/test_radios_conditional__layout[chromium][linux]-gds-5.8.0.png
Oops, something went wrong.
Binary file added
BIN
+80.6 KB
.../test_radios_conditional__show_hidden_and_submit[chromium][linux]-gds-5.0.0.png
Oops, something went wrong.
Binary file added
BIN
+80.7 KB
.../test_radios_conditional__show_hidden_and_submit[chromium][linux]-gds-5.2.0.png
Oops, something went wrong.
Binary file added
BIN
+80.6 KB
.../test_radios_conditional__show_hidden_and_submit[chromium][linux]-gds-5.4.0.png
Oops, something went wrong.
Binary file added
BIN
+80.7 KB
.../test_radios_conditional__show_hidden_and_submit[chromium][linux]-gds-5.6.0.png
Oops, something went wrong.
Binary file added
BIN
+80.7 KB
.../test_radios_conditional__show_hidden_and_submit[chromium][linux]-gds-5.8.0.png
Oops, something went wrong.
Binary file added
BIN
+59.3 KB
...s/demo/snapshots/test_select/test_select__layout[chromium][linux]-gds-5.0.0.png
Oops, something went wrong.
Binary file added
BIN
+59.3 KB
...s/demo/snapshots/test_select/test_select__layout[chromium][linux]-gds-5.2.0.png
Oops, something went wrong.
Binary file added
BIN
+59.3 KB
...s/demo/snapshots/test_select/test_select__layout[chromium][linux]-gds-5.4.0.png
Oops, something went wrong.
Binary file added
BIN
+59.3 KB
...s/demo/snapshots/test_select/test_select__layout[chromium][linux]-gds-5.6.0.png
Oops, something went wrong.
Binary file added
BIN
+59.3 KB
...s/demo/snapshots/test_select/test_select__layout[chromium][linux]-gds-5.8.0.png
Oops, something went wrong.
Binary file added
BIN
+63.2 KB
.../test_select/test_select__select_item_and_submit[chromium][linux]-gds-5.0.0.png
Oops, something went wrong.
Binary file added
BIN
+63.2 KB
.../test_select/test_select__select_item_and_submit[chromium][linux]-gds-5.2.0.png
Oops, something went wrong.
Binary file added
BIN
+63.2 KB
.../test_select/test_select__select_item_and_submit[chromium][linux]-gds-5.4.0.png
Oops, something went wrong.
Binary file added
BIN
+63.2 KB
.../test_select/test_select__select_item_and_submit[chromium][linux]-gds-5.6.0.png
Oops, something went wrong.
Binary file added
BIN
+63.2 KB
.../test_select/test_select__select_item_and_submit[chromium][linux]-gds-5.8.0.png
Oops, something went wrong.
Binary file added
BIN
+74.1 KB
tests/demo/snapshots/test_tabs/test_tabs__click_tab[chromium][linux]-gds-5.0.0.png
Oops, something went wrong.
Binary file added
BIN
+74.1 KB
tests/demo/snapshots/test_tabs/test_tabs__click_tab[chromium][linux]-gds-5.2.0.png
Oops, something went wrong.
Binary file added
BIN
+74.1 KB
tests/demo/snapshots/test_tabs/test_tabs__click_tab[chromium][linux]-gds-5.4.0.png
Oops, something went wrong.
Binary file added
BIN
+74.1 KB
tests/demo/snapshots/test_tabs/test_tabs__click_tab[chromium][linux]-gds-5.6.0.png
Oops, something went wrong.
Binary file added
BIN
+74.1 KB
tests/demo/snapshots/test_tabs/test_tabs__click_tab[chromium][linux]-gds-5.8.0.png
Oops, something went wrong.
Binary file added
BIN
+72.2 KB
tests/demo/snapshots/test_tabs/test_tabs__layout[chromium][linux]-gds-5.0.0.png
Oops, something went wrong.
Binary file added
BIN
+72.2 KB
tests/demo/snapshots/test_tabs/test_tabs__layout[chromium][linux]-gds-5.2.0.png
Oops, something went wrong.
Binary file added
BIN
+72.2 KB
tests/demo/snapshots/test_tabs/test_tabs__layout[chromium][linux]-gds-5.4.0.png
Oops, something went wrong.
Binary file added
BIN
+72.2 KB
tests/demo/snapshots/test_tabs/test_tabs__layout[chromium][linux]-gds-5.6.0.png
Oops, something went wrong.
Binary file added
BIN
+72.2 KB
tests/demo/snapshots/test_tabs/test_tabs__layout[chromium][linux]-gds-5.8.0.png
Oops, something went wrong.
Binary file added
BIN
+83.5 KB
...mo/snapshots/test_tag/test_tag_component__layout[chromium][linux]-gds-5.0.0.png
Oops, something went wrong.
Binary file added
BIN
+83.5 KB
...mo/snapshots/test_tag/test_tag_component__layout[chromium][linux]-gds-5.2.0.png
Oops, something went wrong.
Binary file added
BIN
+83.5 KB
...mo/snapshots/test_tag/test_tag_component__layout[chromium][linux]-gds-5.4.0.png
Oops, something went wrong.
Binary file added
BIN
+83.5 KB
...mo/snapshots/test_tag/test_tag_component__layout[chromium][linux]-gds-5.6.0.png
Oops, something went wrong.
Binary file added
BIN
+83.5 KB
...mo/snapshots/test_tag/test_tag_component__layout[chromium][linux]-gds-5.8.0.png
Oops, something went wrong.
Binary file added
BIN
+71.4 KB
...xt_input/test_text_input__fill_fields_and_submit[chromium][linux]-gds-5.0.0.png
Oops, something went wrong.
Binary file added
BIN
+71.4 KB
...xt_input/test_text_input__fill_fields_and_submit[chromium][linux]-gds-5.2.0.png
Oops, something went wrong.
Binary file added
BIN
+71.4 KB
...xt_input/test_text_input__fill_fields_and_submit[chromium][linux]-gds-5.4.0.png
Oops, something went wrong.
Binary file added
BIN
+71.4 KB
...xt_input/test_text_input__fill_fields_and_submit[chromium][linux]-gds-5.6.0.png
Oops, something went wrong.
Binary file added
BIN
+71.4 KB
...xt_input/test_text_input__fill_fields_and_submit[chromium][linux]-gds-5.8.0.png
Oops, something went wrong.
Binary file added
BIN
+74.6 KB
...napshots/test_text_input/test_text_input__layout[chromium][linux]-gds-5.0.0.png
Oops, something went wrong.
Binary file added
BIN
+74.6 KB
...napshots/test_text_input/test_text_input__layout[chromium][linux]-gds-5.2.0.png
Oops, something went wrong.
Binary file added
BIN
+74.6 KB
...napshots/test_text_input/test_text_input__layout[chromium][linux]-gds-5.4.0.png
Oops, something went wrong.
Binary file added
BIN
+74.6 KB
...napshots/test_text_input/test_text_input__layout[chromium][linux]-gds-5.6.0.png
Oops, something went wrong.
Binary file added
BIN
+74.6 KB
...napshots/test_text_input/test_text_input__layout[chromium][linux]-gds-5.8.0.png
Oops, something went wrong.
Binary file added
BIN
+97.1 KB
...xt_input/test_text_input__leave_blank_and_submit[chromium][linux]-gds-5.0.0.png
Oops, something went wrong.
Binary file added
BIN
+97.1 KB
...xt_input/test_text_input__leave_blank_and_submit[chromium][linux]-gds-5.2.0.png
Oops, something went wrong.
Binary file added
BIN
+96.9 KB
...xt_input/test_text_input__leave_blank_and_submit[chromium][linux]-gds-5.4.0.png
Oops, something went wrong.
Binary file added
BIN
+97.1 KB
...xt_input/test_text_input__leave_blank_and_submit[chromium][linux]-gds-5.6.0.png
Oops, something went wrong.
Binary file added
BIN
+97.1 KB
...xt_input/test_text_input__leave_blank_and_submit[chromium][linux]-gds-5.8.0.png
Oops, something went wrong.
Binary file added
BIN
+61.5 KB
...ots/test_textarea/test_textarea__fill_and_submit[chromium][linux]-gds-5.0.0.png
Oops, something went wrong.
Binary file added
BIN
+61.5 KB
...ots/test_textarea/test_textarea__fill_and_submit[chromium][linux]-gds-5.2.0.png
Oops, something went wrong.
Binary file added
BIN
+61.5 KB
...ots/test_textarea/test_textarea__fill_and_submit[chromium][linux]-gds-5.4.0.png
Oops, something went wrong.
Binary file added
BIN
+61.5 KB
...ots/test_textarea/test_textarea__fill_and_submit[chromium][linux]-gds-5.6.0.png
Oops, something went wrong.
Binary file added
BIN
+61.5 KB
...ots/test_textarea/test_textarea__fill_and_submit[chromium][linux]-gds-5.8.0.png
Oops, something went wrong.
Binary file added
BIN
+68.7 KB
...mo/snapshots/test_textarea/test_textarea__layout[chromium][linux]-gds-5.0.0.png
Oops, something went wrong.
Binary file added
BIN
+68.7 KB
...mo/snapshots/test_textarea/test_textarea__layout[chromium][linux]-gds-5.2.0.png
Oops, something went wrong.
Binary file added
BIN
+68.7 KB
...mo/snapshots/test_textarea/test_textarea__layout[chromium][linux]-gds-5.4.0.png
Oops, something went wrong.
Binary file added
BIN
+68.7 KB
...mo/snapshots/test_textarea/test_textarea__layout[chromium][linux]-gds-5.6.0.png
Oops, something went wrong.
Binary file added
BIN
+68.7 KB
...mo/snapshots/test_textarea/test_textarea__layout[chromium][linux]-gds-5.8.0.png
Oops, something went wrong.
Binary file added
BIN
+81.2 KB
...t_textarea/test_textarea__leave_blank_and_submit[chromium][linux]-gds-5.0.0.png
Oops, something went wrong.
Binary file added
BIN
+81.2 KB
...t_textarea/test_textarea__leave_blank_and_submit[chromium][linux]-gds-5.2.0.png
Oops, something went wrong.
Binary file added
BIN
+81.3 KB
...t_textarea/test_textarea__leave_blank_and_submit[chromium][linux]-gds-5.4.0.png
Oops, something went wrong.
Binary file added
BIN
+81.2 KB
...t_textarea/test_textarea__leave_blank_and_submit[chromium][linux]-gds-5.6.0.png
Oops, something went wrong.
Binary file added
BIN
+81.2 KB
...t_textarea/test_textarea__leave_blank_and_submit[chromium][linux]-gds-5.8.0.png
Oops, something went wrong.
Binary file added
BIN
+63 KB
...hots/test_warning/test_warning_component__layout[chromium][linux]-gds-5.0.0.png
Oops, something went wrong.
Binary file added
BIN
+63 KB
...hots/test_warning/test_warning_component__layout[chromium][linux]-gds-5.2.0.png
Oops, something went wrong.
Binary file added
BIN
+63 KB
...hots/test_warning/test_warning_component__layout[chromium][linux]-gds-5.4.0.png
Oops, something went wrong.
Binary file added
BIN
+63 KB
...hots/test_warning/test_warning_component__layout[chromium][linux]-gds-5.6.0.png
Oops, something went wrong.
Binary file added
BIN
+63 KB
...hots/test_warning/test_warning_component__layout[chromium][linux]-gds-5.8.0.png
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
from playwright.sync_api import Page | ||
|
||
|
||
def test_accordion__layout(live_server, assert_snapshot, page: Page): | ||
page.goto(f"{live_server.url}/components/accordion/") | ||
assert_snapshot(page.screenshot(full_page=True)) | ||
|
||
|
||
def test_accordion__show_all(live_server, assert_snapshot, page: Page): | ||
page.goto(f"{live_server.url}/components/accordion/") | ||
page.locator("button[class=govuk-accordion__show-all]").click() | ||
assert_snapshot(page.screenshot(full_page=True)) | ||
|
||
|
||
def test_accordion__hide_all(live_server, assert_snapshot, page: Page): | ||
page.goto(f"{live_server.url}/components/accordion/") | ||
page.locator("button[class=govuk-accordion__show-all]").click() | ||
page.locator("button[class=govuk-accordion__show-all]").click() | ||
assert_snapshot(page.screenshot(full_page=True)) | ||
|
||
|
||
def test_accordion__show_section(live_server, assert_snapshot, page: Page): | ||
page.goto(f"{live_server.url}/components/accordion/") | ||
page.locator("button[class=govuk-accordion__section-button]").locator( | ||
"nth=0" | ||
).click() | ||
assert_snapshot(page.screenshot(full_page=True)) | ||
|
||
|
||
def test_accordion__hide_section(live_server, assert_snapshot, page: Page): | ||
page.goto(f"{live_server.url}/components/accordion/") | ||
page.locator("button[class=govuk-accordion__section-button]").locator( | ||
"nth=0" | ||
).click() | ||
page.locator("button[class=govuk-accordion__section-button]").locator( | ||
"nth=0" | ||
).click() | ||
assert_snapshot(page.screenshot(full_page=True)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from playwright.sync_api import Page | ||
|
||
|
||
def test_buttons__layout(live_server, assert_snapshot, page: Page): | ||
page.goto(f"{live_server.url}/components/buttons/") | ||
assert_snapshot(page.screenshot(full_page=True)) | ||
|
||
|
||
def test_buttons__click_add_button(live_server, assert_snapshot, page: Page): | ||
page.goto(f"{live_server.url}/components/buttons/") | ||
page.locator("button[id=id_add]").click() | ||
assert_snapshot(page.screenshot(full_page=True)) | ||
|
||
|
||
def test_buttons__disabled_button(live_server, page: Page): | ||
page.goto(f"{live_server.url}/components/buttons/") | ||
assert page.locator("button[id=id_win]").is_disabled() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from playwright.sync_api import Page | ||
|
||
|
||
def test_checkboxes__layout(live_server, assert_snapshot, page: Page): | ||
page.goto(f"{live_server.url}/components/checkboxes/") | ||
assert_snapshot(page.screenshot(full_page=True)) | ||
|
||
|
||
def test_checkboxes__select_option_and_submit(live_server, assert_snapshot, page: Page): | ||
page.goto(f"{live_server.url}/components/checkboxes/") | ||
page.locator("input[id=id_method_1]").click() | ||
page.locator("button[id=id_submit]").click() | ||
assert_snapshot(page.screenshot(full_page=True)) | ||
|
||
|
||
def test_checkboxes__leave_blank_and_submit(live_server, assert_snapshot, page: Page): | ||
page.goto(f"{live_server.url}/components/checkboxes/") | ||
page.locator("button[id=id_submit]").click() | ||
assert_snapshot(page.screenshot(full_page=True)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from playwright.sync_api import Page | ||
|
||
|
||
def test_date_input__layout(live_server, assert_snapshot, page: Page): | ||
page.goto(f"{live_server.url}/components/date-input/") | ||
assert_snapshot(page.screenshot(full_page=True)) | ||
|
||
|
||
def test_date_input__enter_date_and_submit(live_server, assert_snapshot, page: Page): | ||
page.goto(f"{live_server.url}/components/date-input/") | ||
page.locator("input[id=id_date_0]").fill("25") | ||
page.locator("input[id=id_date_1]").fill("12") | ||
page.locator("input[id=id_date_2]").fill("2024") | ||
page.locator("button[id=id_submit]").click() | ||
assert_snapshot(page.screenshot(full_page=True)) | ||
|
||
|
||
def test_date_input__leave_blank_and_submit(live_server, assert_snapshot, page: Page): | ||
page.goto(f"{live_server.url}/components/date-input/") | ||
page.locator("button[id=id_submit]").click() | ||
assert_snapshot(page.screenshot(full_page=True)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from playwright.sync_api import Page | ||
|
||
|
||
def test_details__layout(live_server, assert_snapshot, page: Page): | ||
page.goto(f"{live_server.url}/components/details/") | ||
assert_snapshot(page.screenshot(full_page=True)) | ||
|
||
|
||
def test_details__show_summary(live_server, assert_snapshot, page: Page): | ||
page.goto(f"{live_server.url}/components/details/") | ||
page.locator("summary[class=govuk-details__summary]").click() | ||
assert_snapshot(page.screenshot(full_page=True)) | ||
|
||
|
||
def test_details__hide_summary(live_server, assert_snapshot, page: Page): | ||
page.goto(f"{live_server.url}/components/details/") | ||
page.locator("summary[class=govuk-details__summary]").click() | ||
page.locator("summary[class=govuk-details__summary]").click() | ||
assert_snapshot(page.screenshot(full_page=True)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from playwright.sync_api import Page | ||
|
||
|
||
def test_fieldset_component__layout(live_server, assert_snapshot, page: Page): | ||
page.goto(f"{live_server.url}/components/fieldset/") | ||
assert_snapshot(page.screenshot(full_page=True)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from playwright.sync_api import Page | ||
|
||
|
||
def test_file_upload_component__layout(live_server, assert_snapshot, page: Page): | ||
page.goto(f"{live_server.url}/components/file-upload/") | ||
assert_snapshot(page.screenshot(full_page=True)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from playwright.sync_api import Page | ||
|
||
|
||
def test_inset_component__layout(live_server, assert_snapshot, page: Page): | ||
page.goto(f"{live_server.url}/components/inset/") | ||
assert_snapshot(page.screenshot(full_page=True)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from playwright.sync_api import Page | ||
|
||
|
||
def test_panel_component__layout(live_server, assert_snapshot, page: Page): | ||
page.goto(f"{live_server.url}/components/panel/") | ||
assert_snapshot(page.screenshot(full_page=True)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from playwright.sync_api import Page | ||
|
||
|
||
def test_radios__layout(live_server, assert_snapshot, page: Page): | ||
page.goto(f"{live_server.url}/components/radios/") | ||
assert_snapshot(page.screenshot(full_page=True)) | ||
|
||
|
||
def test_radios__click_and_submit(live_server, assert_snapshot, page: Page): | ||
page.goto(f"{live_server.url}/components/radios/") | ||
page.locator("input[id=id_name_1]").click() | ||
page.locator("input[id=id_method_2]").click() | ||
page.locator("button[id=id_submit]").click() | ||
assert_snapshot(page.screenshot(full_page=True)) | ||
|
||
|
||
def test_radios__leave_blank_and_submit(live_server, assert_snapshot, page: Page): | ||
page.goto(f"{live_server.url}/components/radios/") | ||
page.locator("button[id=id_submit]").click() | ||
assert_snapshot(page.screenshot(full_page=True)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from playwright.sync_api import Page | ||
|
||
|
||
def test_radios_conditional__layout(live_server, assert_snapshot, page: Page): | ||
page.goto(f"{live_server.url}/components/conditional_radios/") | ||
assert_snapshot(page.screenshot(full_page=True)) | ||
|
||
|
||
def test_radios_conditional__fill_hidden_and_submit( | ||
live_server, assert_snapshot, page: Page | ||
): | ||
page.goto(f"{live_server.url}/components/conditional_radios/") | ||
page.locator("input[id=id_method_1]").click() | ||
page.locator("input[id=id_email_address]").fill("[email protected]") | ||
page.locator("button[id=id_submit]").click() | ||
assert_snapshot(page.screenshot(full_page=True)) | ||
|
||
|
||
def test_radios_conditional__show_hidden_and_submit( | ||
live_server, assert_snapshot, page: Page | ||
): | ||
page.goto(f"{live_server.url}/components/conditional_radios/") | ||
page.locator("input[id=id_method_1]").click() | ||
page.locator("button[id=id_submit]").click() | ||
assert_snapshot(page.screenshot(full_page=True)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from playwright.sync_api import Page | ||
|
||
|
||
def test_select__layout(live_server, assert_snapshot, page: Page): | ||
page.goto(f"{live_server.url}/components/select/") | ||
assert_snapshot(page.screenshot(full_page=True)) | ||
|
||
|
||
def test_select__select_item_and_submit(live_server, assert_snapshot, page: Page): | ||
page.goto(f"{live_server.url}/components/select/") | ||
page.locator("select[id=id_sort_by]").select_option("updated") | ||
page.locator("button[id=id_submit]").click() | ||
assert_snapshot(page.screenshot(full_page=True)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from playwright.sync_api import Page | ||
|
||
|
||
def test_tabs__layout(live_server, assert_snapshot, page: Page): | ||
page.goto(f"{live_server.url}/components/tabs/") | ||
assert_snapshot(page.screenshot(full_page=True)) | ||
|
||
|
||
def test_tabs__click_tab(live_server, assert_snapshot, page: Page): | ||
page.goto(f"{live_server.url}/components/tabs/") | ||
page.locator("a[id=tab_past-week]").click() | ||
assert_snapshot(page.screenshot(full_page=True)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from playwright.sync_api import Page | ||
|
||
|
||
def test_tag_component__layout(live_server, assert_snapshot, page: Page): | ||
page.goto(f"{live_server.url}/components/tag/") | ||
assert_snapshot(page.screenshot(full_page=True)) |
Oops, something went wrong.