@@ -4,6 +4,7 @@ const HOST_EMAIL = "demo-host@peels.local";
44const DONOR_EMAIL = "demo-donor@peels.local" ;
55const SEEDED_PASSWORD = "peels-demo-password" ;
66const SEEDED_THREAD_ID = "33333333-3333-4333-8333-333333333333" ;
7+ const PROFILE_RENDER_TIMEOUT_MS = 15_000 ;
78
89async function signIn (
910 page : Page ,
@@ -28,15 +29,6 @@ async function signIn(
2829 ] ) ;
2930}
3031
31- test ( "auth-sign-in redirects a seeded donor into the signed-in experience" , async ( {
32- page,
33- } ) => {
34- await signIn ( page , { email : DONOR_EMAIL , redirectTo : "/profile" } ) ;
35-
36- await expect ( page ) . toHaveURL ( / \/ p r o f i l e $ / ) ;
37- await expect ( page . getByTestId ( "profile-first-name" ) ) . toHaveText ( "Riley" ) ;
38- } ) ;
39-
4032test ( "public-listing shows the seeded public listing and guest contact gate" , async ( {
4133 page,
4234} ) => {
@@ -55,7 +47,9 @@ test("public-listing shows the seeded public listing and guest contact gate", as
5547test ( "profile loads the seeded host account and listings" , async ( { page } ) => {
5648 await signIn ( page , { email : HOST_EMAIL , redirectTo : "/profile" } ) ;
5749
58- await expect ( page . getByTestId ( "profile-first-name" ) ) . toHaveText ( "Avery" ) ;
50+ await expect ( page . getByTestId ( "profile-first-name" ) ) . toHaveText ( "Avery" , {
51+ timeout : PROFILE_RENDER_TIMEOUT_MS ,
52+ } ) ;
5953 await expect ( page . getByTestId ( "profile-listings" ) ) . toContainText (
6054 "Marrickville Neighbourhood Compost"
6155 ) ;
0 commit comments