@@ -11,11 +11,13 @@ describe('CSS', () => {
1111 let app : SpectronApplication ;
1212 before ( ( ) => { app = new SpectronApplication ( ) ; return app . start ( ) ; } ) ;
1313 after ( ( ) => app . stop ( ) ) ;
14+ beforeEach ( function ( ) { app . createScreenshotCapturer ( this . currentTest ) ; } ) ;
1415
1516 it ( 'verifies quick outline' , async ( ) => {
1617 await app . workbench . quickopen . openFile ( 'style.css' ) ;
1718 const outline = await app . workbench . editor . openOutline ( ) ;
1819 const elements = await outline . getQuickOpenElements ( ) ;
20+ app . screenshot . capture ( 'CSS Outline result' ) ;
1921 assert . equal ( elements . length , 2 , `Did not find two outline elements` ) ;
2022 } ) ;
2123
@@ -25,10 +27,12 @@ describe('CSS', () => {
2527 await app . client . type ( '.foo{}' ) ;
2628
2729 let warning = await app . client . waitForElement ( Problems . getSelectorInEditor ( ProblemSeverity . WARNING ) ) ;
30+ app . screenshot . capture ( 'CSS Warning in editor' ) ;
2831 assert . ok ( warning , `Warning squiggle is not shown in 'style.css'.` ) ;
2932
3033 await app . workbench . problems . showProblemsView ( ) ;
3134 warning = await app . client . waitForElement ( Problems . getSelectorInProblemsView ( ProblemSeverity . WARNING ) ) ;
35+ app . screenshot . capture ( 'CSS Warning in problems view' ) ;
3236 assert . ok ( warning , 'Warning does not appear in Problems view.' ) ;
3337 await app . workbench . problems . hideProblemsView ( ) ;
3438 } ) ;
@@ -39,11 +43,13 @@ describe('CSS', () => {
3943 await app . client . type ( '.foo{}' ) ;
4044
4145 let error = await app . client . waitForElement ( Problems . getSelectorInEditor ( ProblemSeverity . ERROR ) ) ;
46+ app . screenshot . capture ( 'CSS Error in editor' ) ;
4247 assert . ok ( error , `Warning squiggle is not shown in 'style.css'.` ) ;
4348
4449 const problems = new Problems ( app ) ;
4550 await problems . showProblemsView ( ) ;
4651 error = await app . client . waitForElement ( Problems . getSelectorInProblemsView ( ProblemSeverity . ERROR ) ) ;
52+ app . screenshot . capture ( 'CSS Error in probles view' ) ;
4753 assert . ok ( error , 'Warning does not appear in Problems view.' ) ;
4854 await problems . hideProblemsView ( ) ;
4955 } ) ;
0 commit comments