Driver factory, click_link_by_text, search_for, fill_out_form, run_lecture and CLI, layered as domain, application, infrastructure and presentation. 30 offline unit tests, a form fixture, a Docker image for headless runs and four screenshots captured in Docker. Reviews RC-009 (code) and RC-010 (milestone wording of the screenshot criterion). Task: MIL-002#1
22 lines
583 B
Python
22 lines
583 B
Python
import dataclasses
|
|
|
|
import pytest
|
|
|
|
from fill_out_form import constants
|
|
from fill_out_form.domain.form_data import FormData, default_form_data
|
|
|
|
|
|
def test_default_form_data_uses_constants() -> None:
|
|
data = default_form_data()
|
|
|
|
assert data.first_name == constants.DEFAULT_FIRST_NAME
|
|
assert data.last_name == constants.DEFAULT_LAST_NAME
|
|
assert data.email == constants.DEFAULT_EMAIL
|
|
|
|
|
|
def test_form_data_is_immutable() -> None:
|
|
data = FormData("A", "B", "a@b.c")
|
|
|
|
with pytest.raises(dataclasses.FrozenInstanceError):
|
|
data.email = "x" # type: ignore[misc]
|