Skip to content

Commit ac3d48e

Browse files
committed
Try to fix flakey tests
1 parent acde6e7 commit ac3d48e

4 files changed

Lines changed: 20 additions & 21 deletions

File tree

app/components/run-or-live-reload.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ export default Ember.Component.extend({
1111

1212
actions: {
1313
runNowClicked() {
14-
this.attrs.runNow();
14+
this.get('runNow')();
1515
},
1616

1717
liveReloadClicked(checked) {
18-
this.attrs.liveReloadChanged(checked);
18+
this.get('liveReloadChanged')(checked);
1919
}
2020
}
2121
});

tests/acceptance/gist-test.js

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -361,10 +361,10 @@ test('editing a file updates gist', function(assert) {
361361

362362
andThen(function() {
363363
assert.equal(find(firstColumnTextarea).val(), '<div class="index">some text</div>');
364-
});
365364

366-
click(".run-now");
367-
waitForLoadedIFrame();
365+
click(".run-now");
366+
waitForLoadedIFrame();
367+
});
368368

369369
andThen(function() {
370370
assert.equal(outputContents('.index'), 'some text');
@@ -394,11 +394,11 @@ test('own gist can be copied into a new one', function(assert) {
394394
keyEvent('.title input', 'keyup', 13);
395395
andThen(function() {
396396
assert.equal(find('.title input').val(), "my twiddle");
397-
});
398397

399-
click("#live-reload");
400-
click('.test-copy-action');
401-
waitForLoadedIFrame();
398+
click("#live-reload");
399+
click('.test-copy-action');
400+
waitForLoadedIFrame();
401+
});
402402

403403
andThen(function() {
404404
assert.equal(find('.title input').val(), "New Twiddle", "Description is reset");
@@ -424,12 +424,11 @@ test('accessing /:gist/copy creates a new Twiddle with a copy of the gist', func
424424
andThen(function() {
425425
assert.equal(find('.title input').val(), "my twiddle");
426426
assert.equal(find('.test-unsaved-indicator').length, 1, "Changing title triggers unsaved indicator");
427-
});
428427

429-
click("#live-reload");
430-
visit('/35de43cb81fc35ddffb2/copy');
431-
click('.run-now');
432-
waitForLoadedIFrame();
428+
click("#live-reload");
429+
visit('/35de43cb81fc35ddffb2/copy');
430+
waitForLoadedIFrame();
431+
});
433432

434433
andThen(function() {
435434
assert.equal(currentURL(), '/');

tests/acceptance/git-revision-test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,11 @@ test('Able to go from current version to revision and back via the UI', function
110110

111111
andThen(() => {
112112
assert.equal(outputContents('div'), 'Hello, ...');
113-
});
114113

115-
click(".test-show-current-version");
116-
click(".run-now");
117-
waitForLoadedIFrame();
114+
click(".test-show-current-version");
115+
click(".run-now");
116+
waitForLoadedIFrame();
117+
});
118118

119119
andThen(() => {
120120
assert.equal(outputContents('div'), 'Hello, World!');

tests/acceptance/run-now-test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ test('Able to reload the Twiddle', function(assert) {
2424

2525
andThen(function() {
2626
assert.equal(outputPane().find('input').val(), 'new value');
27-
});
2827

29-
click(".run-now");
30-
waitForLoadedIFrame();
28+
click(".run-now");
29+
waitForLoadedIFrame();
30+
});
3131

3232
andThen(function() {
3333
assert.equal(outputPane().find('input').val(), 'initial value');

0 commit comments

Comments
 (0)