@@ -612,6 +612,46 @@ test.describe('Screenshot Capture (Live)', () => {
612612 await countBlackPixelsInDataUrl ( page , submittedScreenshot as string , latestRegion )
613613 ) . toBeLessThan ( 20 ) ;
614614 } ) ;
615+
616+ test ( 'privacy masking failure UX works on the deployed production widget' , async ( { page } ) => {
617+ test . skip (
618+ process . env . LIVE_TARGET !== 'production' ,
619+ 'The production failure fixture is hosted on the production Vercel venue.'
620+ ) ;
621+
622+ await mockInstalledRepo ( page ) ;
623+ const payloads = await trackLiveFeedbackPayloads ( page ) ;
624+ await page . goto ( '/redaction-failure.html' ) ;
625+
626+ const host = page . locator ( '#bugdrop-host' ) ;
627+ await expect ( host . locator ( 'css=.bd-trigger' ) ) . toBeVisible ( { timeout : 10_000 } ) ;
628+ await host . locator ( 'css=.bd-trigger' ) . click ( ) ;
629+
630+ await expect ( host . locator ( 'css=[data-action="continue"]' ) ) . toBeVisible ( { timeout : 5_000 } ) ;
631+ await host . locator ( 'css=[data-action="continue"]' ) . click ( ) ;
632+
633+ await expect ( host . locator ( 'css=#title' ) ) . toBeVisible ( { timeout : 5_000 } ) ;
634+ await host . locator ( 'css=#title' ) . fill ( 'Live privacy masking failure' ) ;
635+ await host . locator ( 'css=#include-screenshot' ) . check ( ) ;
636+ await host . locator ( 'css=#submit-btn' ) . click ( ) ;
637+
638+ await expect ( host . locator ( 'css=[data-action="capture"]' ) ) . toBeVisible ( { timeout : 5_000 } ) ;
639+ await host . locator ( 'css=[data-action="capture"]' ) . click ( ) ;
640+
641+ await expect ( host . locator ( 'css=.bd-title' ) ) . toHaveText ( 'Privacy masking failed' , {
642+ timeout : 10_000 ,
643+ } ) ;
644+ await expect ( host . locator ( 'css=.bd-error-message__text' ) ) . toContainText (
645+ 'Automatic redaction of private fields could not be applied'
646+ ) ;
647+ await expect ( host . locator ( 'css=button' ) . filter ( { hasText : 'Try Again' } ) ) . toHaveCount ( 0 ) ;
648+
649+ await host . locator ( 'css=button' ) . filter ( { hasText : 'Continue without screenshot' } ) . click ( ) ;
650+ await expect ( host . locator ( 'css=.bd-success-icon' ) ) . toBeVisible ( { timeout : 10_000 } ) ;
651+
652+ expect ( payloads ) . toHaveLength ( 1 ) ;
653+ expect ( payloads [ 0 ] . screenshot ) . toBeNull ( ) ;
654+ } ) ;
615655} ) ;
616656
617657test . describe ( 'Feedback Submission (Live)' , ( ) => {
0 commit comments