We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5bf3807 + 90e624c commit 07fc1abCopy full SHA for 07fc1ab
tests/test.py
@@ -1,5 +1,3 @@
1
-import time
2
-
3
import pytest
4
from playwright.sync_api import Page, expect
5
@@ -14,13 +12,6 @@
14
12
]
15
13
16
17
-# Add a delay to each test to help with playwright race conditions
18
-@pytest.fixture(autouse=True)
19
-def slow_down_tests():
20
- yield
21
- time.sleep(1)
22
23
24
@pytest.mark.parametrize("url", routes)
25
def test_destination(
26
page: Page,
@@ -29,7 +20,8 @@ def test_destination(
29
"""Test that the destinations page loads with seeded data"""
30
# Create a destination
31
response = page.goto(f"{live_server_url}/{url}")
32
- page.on("response", lambda response: expect(response.status).to_equal(200))
+
+ assert response.status == 200 # Check that the page loaded successfully
33
assert response.url.endswith(f"/{url}/") # Load the index.html
34
35
27
0 commit comments