-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7546 from rwjblue/remove-extraneous-test-files
Remove unused testing helper files.
- Loading branch information
Showing
24 changed files
with
84 additions
and
221 deletions.
There are no files selected for viewing
Empty file.
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
blueprints/app/files/tests/helpers/module-for-acceptance.js
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
5 changes: 0 additions & 5 deletions
5
blueprints/module-unification-app/files/tests/helpers/destroy-app.js
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
blueprints/module-unification-app/files/tests/helpers/module-for-acceptance.js
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
blueprints/module-unification-app/files/tests/helpers/start-app.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 13 additions & 21 deletions
34
tests/fixtures/addon/component-with-template/tests/acceptance/main-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,22 @@ | ||
import startApp from '../helpers/start-app'; | ||
import destroyApp from '../helpers/destroy-app'; | ||
import Ember from 'ember'; | ||
import { setupApplicationTest } from 'ember-qunit'; | ||
import { visit } from '@ember/test-helpers'; | ||
import { module, test } from 'qunit'; | ||
|
||
module('Acceptance', { | ||
beforeEach() { | ||
this.application = startApp(); | ||
}, | ||
afterEach() { | ||
destroyApp(this.application); | ||
} | ||
}); | ||
module('Acceptance', function(hooks) { | ||
setupApplicationTest(hooks); | ||
|
||
test('renders properly', function(assert) { | ||
visit('/'); | ||
test('renders properly', async function(assert) { | ||
await visit('/'); | ||
|
||
andThen(function() { | ||
var element = find('.basic-thing'); | ||
assert.equal(element.first().text().trim(), 'WOOT!!'); | ||
var element = this.element.querySelector('.basic-thing'); | ||
assert.equal(element.textContent.trim(), 'WOOT!!'); | ||
}); | ||
}); | ||
|
||
test('renders imported component', function(assert) { | ||
visit('/'); | ||
test('renders imported component', async function(assert) { | ||
await visit('/'); | ||
|
||
andThen(function() { | ||
var element = find('.second-thing'); | ||
assert.equal(element.first().text().trim(), 'SECOND!!'); | ||
var element = this.element.querySelector('.second-thing'); | ||
assert.equal(element.textContent.trim(), 'SECOND!!'); | ||
}); | ||
}); |
33 changes: 12 additions & 21 deletions
33
tests/fixtures/addon/kitchen-sink/tests/acceptance/main-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,23 @@ | ||
import startApp from '../helpers/start-app'; | ||
import destroyApp from '../helpers/destroy-app'; | ||
import { setupApplicationTest } from 'ember-qunit'; | ||
import { visit } from '@ember/test-helpers'; | ||
import truthyHelper from 'kitchen-sink/test-support/helper'; | ||
import { module, test } from 'qunit'; | ||
|
||
module('Acceptance', { | ||
beforeEach() { | ||
this.application = startApp(); | ||
}, | ||
afterEach() { | ||
destroyApp(this.application); | ||
} | ||
}); | ||
module('Acceptance', function(hooks) { | ||
setupApplicationTest(hooks); | ||
|
||
test('renders properly', function(assert) { | ||
visit('/'); | ||
test('renders properly', async function(assert) { | ||
await visit('/'); | ||
|
||
andThen(function() { | ||
var element = find('.basic-thing'); | ||
assert.equal(element.first().text().trim(), 'WOOT!!'); | ||
var element = this.element.querySelector('.basic-thing'); | ||
assert.equal(element.textContent.trim(), 'WOOT!!'); | ||
assert.ok(truthyHelper(), 'addon-test-support helper'); | ||
}); | ||
}); | ||
|
||
test('renders imported component', function(assert) { | ||
visit('/'); | ||
test('renders imported component', async function(assert) { | ||
await visit('/'); | ||
|
||
andThen(function() { | ||
var element = find('.second-thing'); | ||
assert.equal(element.first().text().trim(), 'SECOND!!'); | ||
var element = this.element.querySelector('.second-thing'); | ||
assert.equal(element.textContent.trim(), 'SECOND!!'); | ||
}); | ||
}); |
3 changes: 2 additions & 1 deletion
3
tests/fixtures/brocfile-tests/custom-environment-config/tests/unit/config-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import { test } from 'qunit'; | ||
import config from '../../config/environment'; | ||
|
||
QUnit.test('the correct config is used', function(assert) { | ||
test('the correct config is used', function(assert) { | ||
assert.equal(config.fileUsed, 'config/something-else.js'); | ||
}); |
24 changes: 8 additions & 16 deletions
24
tests/fixtures/brocfile-tests/default-development/tests/integration/app-boots-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,15 @@ | ||
import Ember from 'ember'; | ||
import startApp from '../helpers/start-app'; | ||
import destroyApp from '../helpers/destroy-app'; | ||
import { setupApplicationTest } from 'ember-qunit'; | ||
import { visit } from '@ember/test-helpers'; | ||
import { module, test } from 'qunit'; | ||
|
||
module('default-development - Integration', { | ||
beforeEach() { | ||
this.application = startApp(); | ||
}, | ||
afterEach() { | ||
destroyApp(this.application); | ||
} | ||
}); | ||
|
||
test('the application boots properly', function(assert) { | ||
assert.expect(1); | ||
module('default-development - Integration', function(hook) { | ||
setupApplicationTest(hooks); | ||
|
||
visit('/'); | ||
test('renders properly', async function(assert) { | ||
await visit('/'); | ||
|
||
andThen(function() { | ||
assert.ok(Ember.$('.ember-view').length > 0); | ||
var elements = this.element.querySelectorAll('.ember-view'); | ||
assert.ok(elements.length > 0); | ||
}); | ||
}); |
25 changes: 9 additions & 16 deletions
25
tests/fixtures/brocfile-tests/pods-templates/tests/integration/pods-template-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,16 @@ | ||
import Ember from 'ember'; | ||
import startApp from '../helpers/start-app'; | ||
import destroyApp from '../helpers/destroy-app'; | ||
import { setupApplicationTest } from 'ember-qunit'; | ||
import { visit } from '@ember/test-helpers'; | ||
import { module, test } from 'qunit'; | ||
|
||
module('pods based templates', { | ||
beforeEach() { | ||
this.application = startApp(); | ||
}, | ||
afterEach() { | ||
destroyApp(this.application); | ||
} | ||
}); | ||
module('pods based templates', function(hooks) { | ||
setupApplicationTest(hooks); | ||
|
||
test('the application boots properly with pods based templates', function(assert) { | ||
assert.expect(1); | ||
test('the application boots properly with pods based templates', async function(assert) { | ||
assert.expect(1); | ||
|
||
visit('/'); | ||
await visit('/'); | ||
|
||
andThen(function() { | ||
assert.equal(Ember.$('#title').text(), 'ZOMG, PODS WORKS!!'); | ||
let actual = this.element.querySelector('#title').textContent | ||
assert.equal(actual, 'ZOMG, PODS WORKS!!'); | ||
}); | ||
}); |
4 changes: 2 additions & 2 deletions
4
tests/fixtures/brocfile-tests/pods-with-prefix-templates/app/app.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 9 additions & 17 deletions
26
...ixtures/brocfile-tests/pods-with-prefix-templates/tests/integration/pods-template-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,16 @@ | ||
import Ember from 'ember'; | ||
import startApp from '../helpers/start-app'; | ||
import destroyApp from '../helpers/destroy-app'; | ||
import { setupApplicationTest } from 'ember-qunit'; | ||
import { visit } from '@ember/test-helpers'; | ||
import { module, test } from 'qunit'; | ||
|
||
module('pods based templates', { | ||
beforeEach() { | ||
this.application = startApp(); | ||
}, | ||
afterEach() { | ||
destroyApp(this.application); | ||
} | ||
}); | ||
|
||
module('pods based templates', function(hooks) { | ||
setupApplicationTest(hooks); | ||
|
||
test('the application boots properly with pods based templates with a podModulePrefix set', function(assert) { | ||
assert.expect(1); | ||
test('the application boots properly with pods based templates with a podModulePrefix set', async function(assert) { | ||
assert.expect(1); | ||
|
||
visit('/'); | ||
await visit('/'); | ||
|
||
andThen(function() { | ||
assert.equal(Ember.$('#title').text(), 'ZOMG, PODS WORKS!!'); | ||
let actual = this.element.querySelector('#title').textContent | ||
assert.equal(actual, 'ZOMG, PODS WORKS!!'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
tests/fixtures/smoke-tests/failing-test/tests/unit/some-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
QUnit.test('failing test', function(assert) { | ||
import { test } from 'qunit'; | ||
|
||
test('failing test', function(assert) { | ||
assert.ok(false, 'test should fail to confirm ember test exit code'); | ||
}); |
33 changes: 15 additions & 18 deletions
33
tests/fixtures/smoke-tests/passing-test/tests/acceptance/acceptance-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,20 @@ | ||
import moduleForAcceptance from '../helpers/module-for-acceptance'; | ||
import QUnit from 'qunit'; | ||
import { setupApplicationTest } from 'ember-qunit'; | ||
import QUnit, { module, test } from 'qunit'; | ||
|
||
let application, firstArgument; | ||
let firstArgument; | ||
|
||
moduleForAcceptance('Module', { | ||
beforeEach(assert) { | ||
application = this.application; | ||
firstArgument = assert; | ||
}, | ||
module('Module', function(hooks) { | ||
setupApplicationTest(hooks); | ||
|
||
afterEach() { | ||
console.log('afterEach called'); | ||
} | ||
}); | ||
hooks.beforeEach(function(assert) { | ||
firstArgument = assert; | ||
}); | ||
|
||
QUnit.test('it works', function(assert) { | ||
assert.ok(application, 'beforeEach binds to the setup context'); | ||
assert.ok( | ||
Object.getPrototypeOf(firstArgument) === QUnit.assert, | ||
'first argument is QUnit assert' | ||
); | ||
test('it works', function(assert) { | ||
assert.ok(this.owner, 'setupApplicationTest binds to the context'); | ||
assert.ok( | ||
Object.getPrototypeOf(firstArgument) === QUnit.assert, | ||
'first argument is QUnit assert' | ||
); | ||
}); | ||
}); |
4 changes: 3 additions & 1 deletion
4
tests/fixtures/smoke-tests/passing-test/tests/unit/some-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
QUnit.test('passing test', function(assert) { | ||
import { test } from 'qunit'; | ||
|
||
test('passing test', function(assert) { | ||
assert.ok(true, 'test should pass'); | ||
}); |
Oops, something went wrong.