mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2026-01-02 03:27:02 -05:00
feat: Implement initial schema and add various API, service, and management command enhancements across the application.
This commit is contained in:
@@ -32,9 +32,7 @@ class TestParkListPage:
|
||||
first_park = parks_data[0]
|
||||
expect(page.get_by_text(first_park.name)).to_be_visible()
|
||||
|
||||
def test__park_list__click_park__navigates_to_detail(
|
||||
self, page: Page, live_server, parks_data
|
||||
):
|
||||
def test__park_list__click_park__navigates_to_detail(self, page: Page, live_server, parks_data):
|
||||
"""Test clicking a park navigates to detail page."""
|
||||
page.goto(f"{live_server.url}/parks/")
|
||||
|
||||
@@ -51,9 +49,7 @@ class TestParkListPage:
|
||||
page.goto(f"{live_server.url}/parks/")
|
||||
|
||||
# Find search input
|
||||
search_input = page.locator(
|
||||
"input[type='search'], input[name='q'], input[placeholder*='search' i]"
|
||||
)
|
||||
search_input = page.locator("input[type='search'], input[name='q'], input[placeholder*='search' i]")
|
||||
|
||||
if search_input.count() > 0:
|
||||
search_input.first.fill("E2E Test Park 0")
|
||||
@@ -83,9 +79,7 @@ class TestParkDetailPage:
|
||||
page.goto(f"{live_server.url}/parks/{park.slug}/")
|
||||
|
||||
# Look for rides section/tab
|
||||
page.locator(
|
||||
"[data-testid='rides-section'], #rides, [role='tabpanel']"
|
||||
)
|
||||
page.locator("[data-testid='rides-section'], #rides, [role='tabpanel']")
|
||||
|
||||
# Or a rides tab
|
||||
rides_tab = page.get_by_role("tab", name="Rides")
|
||||
@@ -103,9 +97,7 @@ class TestParkDetailPage:
|
||||
page.goto(f"{live_server.url}/parks/{park.slug}/")
|
||||
|
||||
# Status badge or indicator should be visible
|
||||
status_indicator = page.locator(
|
||||
".status-badge, [data-testid='status'], .park-status"
|
||||
)
|
||||
status_indicator = page.locator(".status-badge, [data-testid='status'], .park-status")
|
||||
expect(status_indicator.first).to_be_visible()
|
||||
|
||||
|
||||
@@ -118,9 +110,7 @@ class TestParkFiltering:
|
||||
page.goto(f"{live_server.url}/parks/")
|
||||
|
||||
# Find status filter
|
||||
status_filter = page.locator(
|
||||
"select[name='status'], [data-testid='status-filter']"
|
||||
)
|
||||
status_filter = page.locator("select[name='status'], [data-testid='status-filter']")
|
||||
|
||||
if status_filter.count() > 0:
|
||||
status_filter.first.select_option("OPERATING")
|
||||
@@ -135,9 +125,7 @@ class TestParkFiltering:
|
||||
page.goto(f"{live_server.url}/parks/")
|
||||
|
||||
# Find clear filters button
|
||||
clear_btn = page.locator(
|
||||
"[data-testid='clear-filters'], button:has-text('Clear')"
|
||||
)
|
||||
clear_btn = page.locator("[data-testid='clear-filters'], button:has-text('Clear')")
|
||||
|
||||
if clear_btn.count() > 0:
|
||||
clear_btn.first.click()
|
||||
@@ -164,9 +152,7 @@ class TestParkNavigation:
|
||||
|
||||
expect(page).to_have_url("**/parks/**")
|
||||
|
||||
def test__back_button__returns_to_previous_page(
|
||||
self, page: Page, live_server, parks_data
|
||||
):
|
||||
def test__back_button__returns_to_previous_page(self, page: Page, live_server, parks_data):
|
||||
"""Test browser back button returns to previous page."""
|
||||
page.goto(f"{live_server.url}/parks/")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user