Skip to content

Commit

Permalink
test(cypress): delete mst, sbmtd test
Browse files Browse the repository at this point in the history
  • Loading branch information
machikoyasuda committed Jul 15, 2024
1 parent 1d6560b commit 3683cbb
Showing 1 changed file with 1 addition and 37 deletions.
38 changes: 1 addition & 37 deletions tests/pytest/eligibility/test_forms.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from benefits.eligibility.forms import CSTAgencyCard, MSTCourtesyCard, SBMTDMobilityPass
from benefits.eligibility.forms import CSTAgencyCard


def test_CSTAgencyCard():
Expand All @@ -17,39 +17,3 @@ def test_CSTAgencyCard():
assert name_attrs["data-custom-validity"] == "Please enter your last name."

assert form.use_custom_validity


def test_MSTCourtesyCard():
form = MSTCourtesyCard(data={"sub": "12345", "name": "Gonzalez"})

assert form.is_valid()

sub_attrs = form.fields["sub"].widget.attrs
assert sub_attrs["pattern"] == r"\d{5}"
assert sub_attrs["inputmode"] == "numeric"
assert sub_attrs["maxlength"] == 5
assert sub_attrs["data-custom-validity"] == "Please enter a 5-digit number."

name_attrs = form.fields["name"].widget.attrs
assert name_attrs["maxlength"] == 255
assert name_attrs["data-custom-validity"] == "Please enter your last name."

assert form.use_custom_validity


def test_SBMTDMobilityPass():
form = SBMTDMobilityPass(data={"sub": "1234", "name": "Barbara"})

assert form.is_valid()

sub_attrs = form.fields["sub"].widget.attrs
assert sub_attrs["pattern"] == r"\d{4}"
assert sub_attrs["maxlength"] == 4
assert sub_attrs["inputmode"] == "numeric"
assert sub_attrs["data-custom-validity"] == "Please enter a 4-digit number."

name_attrs = form.fields["name"].widget.attrs
assert name_attrs["maxlength"] == 255
assert name_attrs["data-custom-validity"] == "Please enter your last name."

assert form.use_custom_validity

0 comments on commit 3683cbb

Please sign in to comment.