@@ -354,6 +354,7 @@ test('editing a file updates gist', function(assert) {
354354 return ;
355355 }
356356
357+ click ( "#live-reload" ) ;
357358 click ( firstColumnTextarea ) ;
358359 fillIn ( firstColumnTextarea , '<div class="index">some text</div>' ) ;
359360 triggerEvent ( firstColumnTextarea , "blur" ) ;
@@ -362,7 +363,6 @@ test('editing a file updates gist', function(assert) {
362363 assert . equal ( find ( firstColumnTextarea ) . val ( ) , '<div class="index">some text</div>' ) ;
363364 } ) ;
364365
365- click ( "#live-reload" ) ;
366366 click ( ".run-now" ) ;
367367 waitForLoadedIFrame ( ) ;
368368
@@ -391,15 +391,14 @@ test('own gist can be copied into a new one', function(assert) {
391391 } ) ;
392392
393393 fillIn ( '.title input' , "my twiddle" ) ;
394+ keyEvent ( '.title input' , 'keyup' , 13 ) ;
394395 andThen ( function ( ) {
395396 assert . equal ( find ( '.title input' ) . val ( ) , "my twiddle" ) ;
396397 } ) ;
397398
399+ click ( "#live-reload" ) ;
398400 click ( '.test-copy-action' ) ;
399-
400- andThen ( function ( ) {
401- waitForLoadedIFrame ( ) ;
402- } ) ;
401+ waitForLoadedIFrame ( ) ;
403402
404403 andThen ( function ( ) {
405404 assert . equal ( find ( '.title input' ) . val ( ) , "New Twiddle" , "Description is reset" ) ;
@@ -427,11 +426,10 @@ test('accessing /:gist/copy creates a new Twiddle with a copy of the gist', func
427426 assert . equal ( find ( '.test-unsaved-indicator' ) . length , 1 , "Changing title triggers unsaved indicator" ) ;
428427 } ) ;
429428
429+ click ( "#live-reload" ) ;
430430 visit ( '/35de43cb81fc35ddffb2/copy' ) ;
431-
432- andThen ( function ( ) {
433- waitForLoadedIFrame ( ) ;
434- } ) ;
431+ click ( '.run-now' ) ;
432+ waitForLoadedIFrame ( ) ;
435433
436434 andThen ( function ( ) {
437435 assert . equal ( currentURL ( ) , '/' ) ;
0 commit comments