@@ -24,22 +24,29 @@ var styles = {
2424 card : {
2525 margin : '5px' ,
2626 } ,
27+ buttons : {
28+ textAlign : 'center' ,
29+ } ,
2730} ;
2831var Solution = ( function ( _super ) {
2932 __extends ( Solution , _super ) ;
3033 function Solution ( ) {
3134 _super . apply ( this , arguments ) ;
3235 }
3336 Solution . prototype . runTest = function ( ) {
34- console . log ( this . refs . solution . get ( ) ) ;
37+ var text = "\n" + this . refs . solution . get ( ) + "\n" + atom . workspace . getActiveTextEditor ( ) . getText ( ) + "\n" ;
38+ this . props . runTestOnSolution ( text ) ;
3539 } ;
3640 Solution . prototype . render = function ( ) {
3741 return ( React . createElement ( Card_1 . Card , { style : styles . card , initiallyExpanded : true } ,
3842 React . createElement ( Card_1 . CardTitle , { title : 'Solution' } ) ,
3943 React . createElement ( Card_1 . CardText , { expandable : true } ,
40- React . createElement ( index_1 . TextEditor , { name : 'solution' , ref : 'solution' , placeholder : 'test your solution against tests' , lang : this . props . language } ) ,
44+ React . createElement ( "p" , null , "Test a solution against your tests" ) ,
45+ React . createElement ( index_1 . TextEditor , { name : 'solution' , ref : 'solution' , placeholder : 'var a = "example code";' , lang : this . props . language } ) ,
4146 React . createElement ( "br" , null ) ,
42- React . createElement ( RaisedButton_1 . default , { label : 'Run Test' , primary : true , onTouchTap : this . runTest . bind ( this ) } ) ) ) ) ;
47+ React . createElement ( "div" , { style : styles . buttons } ,
48+ React . createElement ( RaisedButton_1 . default , { label : 'Run Test' , primary : true , onTouchTap : this . runTest . bind ( this ) } )
49+ ) ) ) ) ;
4350 } ;
4451 Solution = __decorate ( [
4552 react_redux_1 . connect ( function ( state ) { return ( {
0 commit comments