File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change 1
- import time
2
-
3
1
import pytest
4
2
from playwright .sync_api import Page , expect
5
3
14
12
]
15
13
16
14
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
15
@pytest .mark .parametrize ("url" , routes )
25
16
def test_destination (
26
17
page : Page ,
@@ -29,7 +20,8 @@ def test_destination(
29
20
"""Test that the destinations page loads with seeded data"""
30
21
# Create a destination
31
22
response = page .goto (f"{ live_server_url } /{ url } " )
32
- page .on ("response" , lambda response : expect (response .status ).to_equal (200 ))
23
+
24
+ assert response .status == 200 # Check that the page loaded successfully
33
25
assert response .url .endswith (f"/{ url } /" ) # Load the index.html
34
26
35
27
You can’t perform that action at this time.
0 commit comments