@@ -729,6 +729,29 @@ test("first-community choices expose npub and invite input", async ({
729729 ) . toBe ( true ) ;
730730 await expect ( page . getByTestId ( "invite-redeem-submit" ) ) . toHaveText ( "Next" ) ;
731731 await expect ( page . getByTestId ( "invite-redeem-submit" ) ) . toBeDisabled ( ) ;
732+ const inviteFrame = page . getByTestId ( "invite-redeem-input-frame" ) ;
733+ const initialInviteFrameBox = await inviteFrame . boundingBox ( ) ;
734+ expect ( initialInviteFrameBox ) . not . toBeNull ( ) ;
735+ const invalidInviteTip = page . getByTestId ( "invalid-invite-tip" ) ;
736+ await expect ( invalidInviteTip ) . toHaveAttribute ( "aria-hidden" , "true" ) ;
737+ await expect ( invalidInviteTip ) . toHaveCSS ( "opacity" , "0" ) ;
738+
739+ await inviteInput . fill ( "awefi" ) ;
740+ await expect ( page . getByLabel ( "Relay URL" ) ) . toHaveCount ( 0 ) ;
741+ await expect ( page . getByTestId ( "invite-redeem-submit" ) ) . toBeDisabled ( ) ;
742+ await expect ( invalidInviteTip ) . toBeVisible ( ) ;
743+ await expect ( invalidInviteTip ) . toHaveAttribute ( "aria-hidden" , "false" ) ;
744+ await expect ( invalidInviteTip ) . toHaveCSS ( "opacity" , "1" ) ;
745+ await expect ( invalidInviteTip ) . toHaveCSS ( "color" , "rgb(113, 113, 6)" ) ;
746+ await expect ( invalidInviteTip ) . toHaveCSS ( "text-align" , "center" ) ;
747+ const invalidInviteFrameBox = await inviteFrame . boundingBox ( ) ;
748+ expect ( invalidInviteFrameBox ?. y ) . toBe ( initialInviteFrameBox ?. y ) ;
749+
750+ await inviteInput . fill ( "https://default.example.com/invite/abc123" ) ;
751+ await expect ( page . getByLabel ( "Relay URL" ) ) . toHaveCount ( 0 ) ;
752+ await expect ( page . getByTestId ( "invite-redeem-submit" ) ) . toBeEnabled ( ) ;
753+ await expect ( invalidInviteTip ) . toHaveAttribute ( "aria-hidden" , "true" ) ;
754+ await expect ( invalidInviteTip ) . toHaveCSS ( "opacity" , "0" ) ;
732755} ) ;
733756
734757test ( "first-community shows the scenario cards for localhost" , async ( {
0 commit comments