refactor(pages,a11y,seo): enhance subpage metadata, semantic HTML, accessibility, and E2E regression tests

- Standardize Next.js Metadata and dynamic generateMetadata across all subpages
- Fix duplicate main landmark in publications page by replacing nested main with div
- Unify Members page spacing (space-y-10 sm:space-y-14, pt-6 md:pt-8) and responsive H2s
- Add aria-label and focus ring to CategoryNav View All links for a11y
- Derive dynamic course history semester ranges in Lectures page
- Add 3 comprehensive E2E test cases (test_08, test_09, test_10) for highlights, active border, CITE brand links, and English H1 headers
This commit is contained in:
2026-08-24 16:10:11 +09:00
parent b1640cdac4
commit f34e9bad57
7 changed files with 102 additions and 16 deletions
@@ -121,5 +121,56 @@ class TestANLHomepageE2E(unittest.TestCase):
# 4. Assert zero placeholder Funder labels (AC-31)
self.assertNotIn("Funder:", html)
def test_08_publications_highlights_and_category_nav(self):
"""TC-T1-F8: Verify 5 representative highlights and CategoryNav active border in Publications."""
html = self.read_html("publications.html")
# 1. Verify 5 designated representative publications
expected_highlights = [
"Globally Integrated Trust Authority (GITA) for Resource-Constrained Edge Devices in IoT and 6G",
"Application Level Trust Authority (APPLETA) for Resource-Constrained Edge Devices in IoT and 6G",
"mQUIC: Use of QUIC for Handover Support with Connection Migration in Wireless/Mobile Networks",
"Use of QUIC for CoAP Transport in IoT Networks",
"Use of QUIC for Mobile-Oriented Future Internet (Q-MOFI)",
]
for title in expected_highlights:
self.assertIn(title, html, f"Missing representative highlight publication: '{title}'")
# 2. Verify Highlights heading & section
self.assertIn("Highlights", html)
self.assertIn("Categories", html)
self.assertIn("(IoT Architecture & Protocols, etc ...)", html)
# 3. Verify category detail active card border & label
patent_html = self.read_html(os.path.join("publications", "patent.html"))
self.assertIn("border-2 border-cobalt-dark", patent_html)
self.assertIn("Active View ●", patent_html)
self.assertIn("Patent", patent_html)
def test_09_footer_cite_and_brand_links(self):
"""TC-T1-F9: Verify Footer CITE abbreviation and brand/contact elements."""
html = self.read_html("index.html")
# 1. Institution link label CITE
self.assertIn("<span>CITE</span>", html)
self.assertIn("<span>KNU</span>", html)
self.assertIn("<span>CSE</span>", html)
# 2. Advisor contact info
self.assertIn("Prof. Seok-Joo Koh", html)
self.assertIn("sjkoh@knu.ac.kr", html)
def test_10_subpage_layout_and_english_headers(self):
"""TC-T1-F10: Verify English page headers across all subpages."""
subpages = [
("members.html", "LAB MEMBERS"),
("publications.html", "PUBLICATIONS"),
("lectures.html", "LECTURES"),
("standardization.html", "International Standardization"),
]
for rel_path, expected_h1 in subpages:
html = self.read_html(rel_path)
self.assertIn(expected_h1, html, f"Subpage {rel_path} missing H1 '{expected_h1}'")
if __name__ == "__main__":
unittest.main()