B-248: 收口登录错误态、焦点与桌面总宽
This commit is contained in:
@@ -40,6 +40,8 @@ class LoginFrontendContractTests(unittest.TestCase):
|
||||
|
||||
def test_login_css_lives_in_one_section(self) -> None:
|
||||
self.assertIn("minmax(460px, 520px)", self.css)
|
||||
self.assertIn("max-width: 1180px", self.css)
|
||||
self.assertIn("margin: 0 auto", self.css)
|
||||
self.assertIn("width: min(440px, 100%)", self.css)
|
||||
self.assertIn("@media (max-width: 1023px)", self.css)
|
||||
self.assertIn("@media (max-width: 720px)", self.css)
|
||||
@@ -55,6 +57,13 @@ class LoginFrontendContractTests(unittest.TestCase):
|
||||
self.assertNotIn(".entry-form {", later)
|
||||
self.assertNotIn(".role-switch {", later)
|
||||
|
||||
def test_login_error_and_keyboard_focus_follow_tokens(self) -> None:
|
||||
self.assertIn(".entry-form #loginError { color: var(--color-danger); }", self.css)
|
||||
self.assertIn(
|
||||
".entry-form .field input:focus-visible { outline: 2px solid var(--color-primary-strong); outline-offset: 3px; }",
|
||||
self.css,
|
||||
)
|
||||
|
||||
def test_role_switch_reuses_segmented_rhythm(self) -> None:
|
||||
self.assertIn(".role-switch { display: flex; gap: 4px; padding: 4px;", self.css)
|
||||
self.assertIn("min-height: 36px", self.css)
|
||||
|
||||
Reference in New Issue
Block a user