@@ -312,6 +312,64 @@ testRender(docs("email/email-recipients-formats.qmd"), "email", false, [
312312 "SPARK_CONNECT_USER_AGENT" : "posit-connect/2026.03.0"
313313 }
314314} ) ;
315+
316+ // Test both recipient patterns with Python (metadata attribute + inline)
317+ testRender ( docs ( "email/email-recipients-all-patterns-python.qmd" ) , "email" , false , [
318+ fileExists ( previewFileV2_1 ) ,
319+ fileExists ( previewFileV2_2 ) ,
320+ validJsonWithMultipleEmails ( jsonFile , 2 , {
321+ "0" : {
322+ "email_id" : 1 ,
323+ "subject" : "Email 1: Metadata Attribute Pattern" ,
324+ "recipients" : [ "metadata1@example.com" , "metadata2@example.com" ] ,
325+ "attachments" : [ ] ,
326+ "suppress_scheduled" : false ,
327+ "send_report_as_attachment" : false
328+ } ,
329+ "1" : {
330+ "email_id" : 2 ,
331+ "subject" : "Email 2: Inline Recipients Pattern" ,
332+ "recipients" : [ "inline1@example.com" , "inline2@example.com" ] ,
333+ "attachments" : [ ] ,
334+ "suppress_scheduled" : false ,
335+ "send_report_as_attachment" : false
336+ }
337+ } )
338+ ] , {
339+ ...cleanupCtx ,
340+ env : {
341+ "SPARK_CONNECT_USER_AGENT" : "posit-connect/2026.03.0"
342+ }
343+ } ) ;
344+
345+ // Test both recipient patterns with R (metadata attribute + inline)
346+ testRender ( docs ( "email/email-recipients-all-patterns-r.qmd" ) , "email" , false , [
347+ fileExists ( previewFileV2_1 ) ,
348+ fileExists ( previewFileV2_2 ) ,
349+ validJsonWithMultipleEmails ( jsonFile , 2 , {
350+ "0" : {
351+ "email_id" : 1 ,
352+ "subject" : "Email 1: Metadata Attribute Pattern" ,
353+ "recipients" : [ "metadata1@example.com" , "metadata2@example.com" ] ,
354+ "attachments" : [ ] ,
355+ "suppress_scheduled" : false ,
356+ "send_report_as_attachment" : false
357+ } ,
358+ "1" : {
359+ "email_id" : 2 ,
360+ "subject" : "Email 2: Inline Recipients Pattern" ,
361+ "recipients" : [ "inline1@example.com" , "inline2@example.com" ] ,
362+ "attachments" : [ ] ,
363+ "suppress_scheduled" : false ,
364+ "send_report_as_attachment" : false
365+ }
366+ } )
367+ ] , {
368+ ...cleanupCtx ,
369+ env : {
370+ "SPARK_CONNECT_USER_AGENT" : "posit-connect/2026.03.0"
371+ }
372+ } ) ;
315373// Render in a project with an output directory set in _quarto.yml and confirm that everything ends up in the output directory
316374testProjectRender ( docs ( "email/project/email-attach.qmd" ) , "email" , ( outputDir : string ) => {
317375 const verify : Verify [ ] = [ ] ;
0 commit comments