@@ -28,8 +28,8 @@ test.describe('Plots', { tag: [tags.PLOTS, tags.EDITOR] }, () => {
2828 test . afterEach ( async function ( { app, hotKeys } ) {
2929 await hotKeys . fullSizeSecondarySidebar ( ) ;
3030 await expect ( async ( ) => {
31- await app . workbench . plots . clearPlots ( ) ;
32- await app . workbench . plots . waitForNoPlots ( { timeout : 5000 } ) ;
31+ await hotKeys . clearPlots ( ) ;
32+ await app . workbench . plots . waitForNoPlots ( { timeout : 3000 } ) ;
3333 } ) . toPass ( { timeout : 15000 } ) ;
3434 } ) ;
3535
@@ -39,7 +39,7 @@ test.describe('Plots', { tag: [tags.PLOTS, tags.EDITOR] }, () => {
3939
4040 test ( 'Python - Verify basic plot functionality - Dynamic Plot' , {
4141 tag : [ tags . WEB , tags . WIN , tags . CRITICAL ]
42- } , async function ( { app, logger, headless } , testInfo ) {
42+ } , async function ( { app, logger, headless, hotKeys } , testInfo ) {
4343 // modified snippet from https://www.geeksforgeeks.org/python-pandas-dataframe/
4444 logger . log ( 'Sending code to console' ) ;
4545 await app . workbench . console . executeCode ( 'Python' , pythonDynamicPlot ) ;
@@ -73,10 +73,10 @@ test.describe('Plots', { tag: [tags.PLOTS, tags.EDITOR] }, () => {
7373 await app . workbench . quickaccess . runCommand ( 'workbench.action.closeAllEditors' ) ;
7474 } ) ;
7575
76- await app . workbench . layouts . enterLayout ( 'fullSizedAuxBar' ) ;
77- await app . workbench . plots . clearPlots ( ) ;
78- await app . workbench . layouts . enterLayout ( 'stacked' ) ;
79- await app . workbench . plots . waitForNoPlots ( ) ;
76+ await expect ( async ( ) => {
77+ await hotKeys . clearPlots ( ) ;
78+ await app . workbench . plots . waitForNoPlots ( { timeout : 3000 } ) ;
79+ } ) . toPass ( { timeout : 15000 } ) ;
8080 } ) ;
8181
8282 test ( 'Python - Verify basic plot functionality - Static Plot' , {
@@ -341,9 +341,10 @@ test.describe('Plots', { tag: [tags.PLOTS, tags.EDITOR] }, () => {
341341 } ) ;
342342
343343 test . afterEach ( async function ( { app, hotKeys } ) {
344- await hotKeys . fullSizeSecondarySidebar ( ) ;
345- await app . workbench . plots . clearPlots ( ) ;
346- await app . workbench . plots . waitForNoPlots ( ) ;
344+ await expect ( async ( ) => {
345+ await hotKeys . clearPlots ( ) ;
346+ await app . workbench . plots . waitForNoPlots ( { timeout : 3000 } ) ;
347+ } ) . toPass ( { timeout : 15000 } ) ;
347348 } ) ;
348349
349350 test . afterAll ( async function ( { cleanup } ) {
@@ -352,7 +353,7 @@ test.describe('Plots', { tag: [tags.PLOTS, tags.EDITOR] }, () => {
352353
353354 test ( 'R - Verify basic plot functionality' , {
354355 tag : [ tags . WEB , tags . WIN , tags . CRITICAL ]
355- } , async function ( { app, logger, headless } , testInfo ) {
356+ } , async function ( { app, logger, headless, hotKeys } , testInfo ) {
356357 logger . log ( 'Sending code to console' ) ;
357358 await app . workbench . console . executeCode ( 'R' , rBasicPlot ) ;
358359 await app . workbench . plots . waitForCurrentPlot ( ) ;
@@ -385,10 +386,10 @@ test.describe('Plots', { tag: [tags.PLOTS, tags.EDITOR] }, () => {
385386 await app . workbench . quickaccess . runCommand ( 'workbench.action.closeAllEditors' ) ;
386387 } ) ;
387388
388- await app . workbench . layouts . enterLayout ( 'fullSizedAuxBar' ) ;
389- await app . workbench . plots . clearPlots ( ) ;
390- await app . workbench . layouts . enterLayout ( 'stacked' ) ;
391- await app . workbench . plots . waitForNoPlots ( ) ;
389+ await expect ( async ( ) => {
390+ await hotKeys . clearPlots ( ) ;
391+ await app . workbench . plots . waitForNoPlots ( { timeout : 3000 } ) ;
392+ } ) . toPass ( { timeout : 15000 } ) ;
392393 } ) ;
393394
394395 test ( 'R - Verify opening plot in new window' , { tag : [ tags . WEB , tags . WIN , tags . PLOTS , tags . CRITICAL ] } , async function ( { app } ) {
0 commit comments