@@ -30,7 +30,7 @@ test.describe('Plots', () => {
30
30
31
31
test ( 'Python - Verifies basic plot functionality - Dynamic Plot [C608114]' , {
32
32
tag : [ '@pr' , '@web' ]
33
- } , async function ( { app, logger } ) {
33
+ } , async function ( { app, logger, headless } ) {
34
34
// modified snippet from https://www.geeksforgeeks.org/python-pandas-dataframe/
35
35
logger . log ( 'Sending code to console' ) ;
36
36
await app . workbench . positronConsole . executeCode ( 'Python' , pythonDynamicPlot , '>>>' ) ;
@@ -53,6 +53,13 @@ test.describe('Plots', () => {
53
53
fail ( `Image comparison failed with mismatch percentage: ${ data . rawMisMatchPercentage } ` ) ;
54
54
}
55
55
56
+ if ( ! headless ) {
57
+ await app . workbench . positronPlots . copyCurrentPlotToClipboard ( ) ;
58
+
59
+ const clipboardImageBuffer = await app . workbench . positronClipboard . getClipboardImage ( ) ;
60
+ expect ( clipboardImageBuffer ) . not . toBeNull ( ) ;
61
+ }
62
+
56
63
await app . workbench . positronLayouts . enterLayout ( 'fullSizedAuxBar' ) ;
57
64
await app . workbench . positronPlots . clearPlots ( ) ;
58
65
await app . workbench . positronLayouts . enterLayout ( 'stacked' ) ;
@@ -276,7 +283,7 @@ test.describe('Plots', () => {
276
283
await interpreter . set ( 'R' ) ;
277
284
} ) ;
278
285
279
- test ( 'R - Verifies basic plot functionality [C628633]' , { tag : [ '@pr' , '@web' ] } , async function ( { app, logger } ) {
286
+ test ( 'R - Verifies basic plot functionality [C628633]' , { tag : [ '@pr' , '@web' ] } , async function ( { app, logger, headless } ) {
280
287
logger . log ( 'Sending code to console' ) ;
281
288
await app . workbench . positronConsole . executeCode ( 'R' , rBasicPlot , '>' ) ;
282
289
await app . workbench . positronPlots . waitForCurrentPlot ( ) ;
@@ -296,6 +303,13 @@ test.describe('Plots', () => {
296
303
fail ( `Image comparison failed with mismatch percentage: ${ data . rawMisMatchPercentage } ` ) ;
297
304
}
298
305
306
+ if ( ! headless ) {
307
+ await app . workbench . positronPlots . copyCurrentPlotToClipboard ( ) ;
308
+
309
+ const clipboardImageBuffer = await app . workbench . positronClipboard . getClipboardImage ( ) ;
310
+ expect ( clipboardImageBuffer ) . not . toBeNull ( ) ;
311
+ }
312
+
299
313
await app . workbench . positronLayouts . enterLayout ( 'fullSizedAuxBar' ) ;
300
314
await app . workbench . positronPlots . clearPlots ( ) ;
301
315
await app . workbench . positronLayouts . enterLayout ( 'stacked' ) ;
0 commit comments