forked from ember-learn/builds
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update tests to emberjs/rfcs#232 format.
- Loading branch information
Showing
24 changed files
with
252 additions
and
226 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,26 @@ | ||
import { moduleForComponent, test } from 'ember-qunit'; | ||
import { module, test } from 'qunit'; | ||
import { setupRenderingTest } from 'ember-qunit'; | ||
import { render } from '@ember/test-helpers'; | ||
import hbs from 'htmlbars-inline-precompile'; | ||
|
||
moduleForComponent('copy-clipboard', 'Integration | Component | copy clipboard', { | ||
integration: true | ||
}); | ||
module('Integration | Component | copy clipboard', function(hooks) { | ||
setupRenderingTest(hooks); | ||
|
||
test('it renders', function(assert) { | ||
// Set any properties with this.set('myProperty', 'value'); | ||
// Handle any actions with this.on('myAction', function(val) { ... }); | ||
test('it renders', async function(assert) { | ||
// Set any properties with this.set('myProperty', 'value'); | ||
// Handle any actions with this.on('myAction', function(val) { ... }); | ||
|
||
this.render(hbs`{{copy-clipboard}}`); | ||
await render(hbs`{{copy-clipboard}}`); | ||
|
||
assert.equal(this.$().text().trim(), ''); | ||
assert.equal(this.$().text().trim(), ''); | ||
|
||
// Template block usage: | ||
this.render(hbs` | ||
{{#copy-clipboard}} | ||
template block text | ||
{{/copy-clipboard}} | ||
`); | ||
// Template block usage: | ||
await render(hbs` | ||
{{#copy-clipboard}} | ||
template block text | ||
{{/copy-clipboard}} | ||
`); | ||
|
||
assert.equal(this.$().text().trim(), 'template block text'); | ||
assert.equal(this.$().text().trim(), 'template block text'); | ||
}); | ||
}); |
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,13 +1,15 @@ | ||
import { moduleForComponent, test } from 'ember-qunit'; | ||
import { module, test } from 'qunit'; | ||
import { setupRenderingTest } from 'ember-qunit'; | ||
import { render } from '@ember/test-helpers'; | ||
import hbs from 'htmlbars-inline-precompile'; | ||
|
||
moduleForComponent('ember-cli-usage', 'Integration | Component | ember cli usage', { | ||
integration: true | ||
}); | ||
module('Integration | Component | ember cli usage', function(hooks) { | ||
setupRenderingTest(hooks); | ||
|
||
test('it renders nothing if project doesn\'t install with Ember CLI', function(assert) { | ||
this.project = { installWithEmberCLI: false }; | ||
this.render(hbs`{{ember-cli-usage project=project}}`); | ||
test('it renders nothing if project doesn\'t install with Ember CLI', async function(assert) { | ||
this.project = { installWithEmberCLI: false }; | ||
await render(hbs`{{ember-cli-usage project=project}}`); | ||
|
||
assert.equal(this.$().text().trim(), ''); | ||
assert.equal(this.$().text().trim(), ''); | ||
}); | ||
}); |
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,25 +1,26 @@ | ||
import { moduleForComponent } from 'ember-qunit'; | ||
import { setupRenderingTest } from 'ember-qunit'; | ||
import '@ember/test-helpers'; | ||
import hbs from 'htmlbars-inline-precompile'; | ||
import { skip } from 'qunit'; | ||
import { module, skip } from 'qunit'; | ||
|
||
moduleForComponent('files-table', 'Integration | Component | files table', { | ||
integration: true | ||
}); | ||
module('Integration | Component | files table', function(hooks) { | ||
setupRenderingTest(hooks); | ||
|
||
skip('it renders', function(assert) { | ||
// Set any properties with this.set('myProperty', 'value'); | ||
// Handle any actions with this.on('myAction', function(val) { ... }); | ||
skip('it renders', function(assert) { | ||
// Set any properties with this.set('myProperty', 'value'); | ||
// Handle any actions with this.on('myAction', function(val) { ... }); | ||
|
||
this.render(hbs`{{files-table}}`); | ||
this.render(hbs`{{files-table}}`); | ||
|
||
assert.equal(this.$().text().trim(), ''); | ||
assert.equal(this.$().text().trim(), ''); | ||
|
||
// Template block usage: | ||
this.render(hbs` | ||
{{#files-table}} | ||
template block text | ||
{{/files-table}} | ||
`); | ||
// Template block usage: | ||
this.render(hbs` | ||
{{#files-table}} | ||
template block text | ||
{{/files-table}} | ||
`); | ||
|
||
assert.equal(this.$().text().trim(), 'template block text'); | ||
assert.equal(this.$().text().trim(), 'template block text'); | ||
}); | ||
}); |
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,25 +1,26 @@ | ||
import { moduleForComponent } from 'ember-qunit'; | ||
import { setupRenderingTest } from 'ember-qunit'; | ||
import '@ember/test-helpers'; | ||
import hbs from 'htmlbars-inline-precompile'; | ||
import { skip } from 'qunit'; | ||
import { module, skip } from 'qunit'; | ||
|
||
moduleForComponent('project-listing', 'Integration | Component | project listing', { | ||
integration: true | ||
}); | ||
module('Integration | Component | project listing', function(hooks) { | ||
setupRenderingTest(hooks); | ||
|
||
skip('it renders', function(assert) { | ||
// Set any properties with this.set('myProperty', 'value'); | ||
// Handle any actions with this.on('myAction', function(val) { ... }); | ||
skip('it renders', function(assert) { | ||
// Set any properties with this.set('myProperty', 'value'); | ||
// Handle any actions with this.on('myAction', function(val) { ... }); | ||
|
||
this.render(hbs`{{project-listing}}`); | ||
this.render(hbs`{{project-listing}}`); | ||
|
||
assert.equal(this.$().text().trim(), ''); | ||
assert.equal(this.$().text().trim(), ''); | ||
|
||
// Template block usage: | ||
this.render(hbs` | ||
{{#project-listing}} | ||
template block text | ||
{{/project-listing}} | ||
`); | ||
// Template block usage: | ||
this.render(hbs` | ||
{{#project-listing}} | ||
template block text | ||
{{/project-listing}} | ||
`); | ||
|
||
assert.equal(this.$().text().trim(), 'template block text'); | ||
assert.equal(this.$().text().trim(), 'template block text'); | ||
}); | ||
}); |
35 changes: 18 additions & 17 deletions
35
tests/integration/components/project-listing/beta-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,25 +1,26 @@ | ||
import { moduleForComponent } from 'ember-qunit'; | ||
import { setupRenderingTest } from 'ember-qunit'; | ||
import '@ember/test-helpers'; | ||
import hbs from 'htmlbars-inline-precompile'; | ||
import { skip } from 'qunit'; | ||
import { module, skip } from 'qunit'; | ||
|
||
moduleForComponent('project-listing/beta', 'Integration | Component | project listing/beta', { | ||
integration: true | ||
}); | ||
module('Integration | Component | project listing/beta', function(hooks) { | ||
setupRenderingTest(hooks); | ||
|
||
skip('it renders', function(assert) { | ||
// Set any properties with this.set('myProperty', 'value'); | ||
// Handle any actions with this.on('myAction', function(val) { ... }); | ||
skip('it renders', function(assert) { | ||
// Set any properties with this.set('myProperty', 'value'); | ||
// Handle any actions with this.on('myAction', function(val) { ... }); | ||
|
||
this.render(hbs`{{project-listing/beta}}`); | ||
this.render(hbs`{{project-listing/beta}}`); | ||
|
||
assert.equal(this.$().text().trim(), ''); | ||
assert.equal(this.$().text().trim(), ''); | ||
|
||
// Template block usage: | ||
this.render(hbs` | ||
{{#project-listing/beta}} | ||
template block text | ||
{{/project-listing/beta}} | ||
`); | ||
// Template block usage: | ||
this.render(hbs` | ||
{{#project-listing/beta}} | ||
template block text | ||
{{/project-listing/beta}} | ||
`); | ||
|
||
assert.equal(this.$().text().trim(), 'template block text'); | ||
assert.equal(this.$().text().trim(), 'template block text'); | ||
}); | ||
}); |
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,25 +1,26 @@ | ||
import { moduleForComponent } from 'ember-qunit'; | ||
import { setupRenderingTest } from 'ember-qunit'; | ||
import '@ember/test-helpers'; | ||
import hbs from 'htmlbars-inline-precompile'; | ||
import { skip } from 'qunit'; | ||
import { module, skip } from 'qunit'; | ||
|
||
moduleForComponent('release-timeline', 'Integration | Component | release timeline', { | ||
integration: true | ||
}); | ||
module('Integration | Component | release timeline', function(hooks) { | ||
setupRenderingTest(hooks); | ||
|
||
skip('it renders', function(assert) { | ||
// Set any properties with this.set('myProperty', 'value'); | ||
// Handle any actions with this.on('myAction', function(val) { ... }); | ||
skip('it renders', function(assert) { | ||
// Set any properties with this.set('myProperty', 'value'); | ||
// Handle any actions with this.on('myAction', function(val) { ... }); | ||
|
||
this.render(hbs`{{release-timeline}}`); | ||
this.render(hbs`{{release-timeline}}`); | ||
|
||
assert.equal(this.$().text().trim(), ''); | ||
assert.equal(this.$().text().trim(), ''); | ||
|
||
// Template block usage: | ||
this.render(hbs` | ||
{{#release-timeline}} | ||
template block text | ||
{{/release-timeline}} | ||
`); | ||
// Template block usage: | ||
this.render(hbs` | ||
{{#release-timeline}} | ||
template block text | ||
{{/release-timeline}} | ||
`); | ||
|
||
assert.equal(this.$().text().trim(), 'template block text'); | ||
assert.equal(this.$().text().trim(), 'template block text'); | ||
}); | ||
}); |
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,26 @@ | ||
import { moduleForComponent, test } from 'ember-qunit'; | ||
import { module, test } from 'qunit'; | ||
import { setupRenderingTest } from 'ember-qunit'; | ||
import { render } from '@ember/test-helpers'; | ||
import hbs from 'htmlbars-inline-precompile'; | ||
|
||
moduleForComponent('remove-spinner', 'Integration | Component | remove spinner', { | ||
integration: true | ||
}); | ||
module('Integration | Component | remove spinner', function(hooks) { | ||
setupRenderingTest(hooks); | ||
|
||
test('it renders', function(assert) { | ||
// Set any properties with this.set('myProperty', 'value'); | ||
// Handle any actions with this.on('myAction', function(val) { ... }); | ||
test('it renders', async function(assert) { | ||
// Set any properties with this.set('myProperty', 'value'); | ||
// Handle any actions with this.on('myAction', function(val) { ... }); | ||
|
||
this.render(hbs`{{remove-spinner}}`); | ||
await render(hbs`{{remove-spinner}}`); | ||
|
||
assert.equal(this.$().text().trim(), ''); | ||
assert.equal(this.$().text().trim(), ''); | ||
|
||
// Template block usage: | ||
this.render(hbs` | ||
{{#remove-spinner}} | ||
template block text | ||
{{/remove-spinner}} | ||
`); | ||
// Template block usage: | ||
await render(hbs` | ||
{{#remove-spinner}} | ||
template block text | ||
{{/remove-spinner}} | ||
`); | ||
|
||
assert.equal(this.$().text().trim(), 'template block text'); | ||
assert.equal(this.$().text().trim(), 'template block text'); | ||
}); | ||
}); |
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,17 +1,19 @@ | ||
|
||
import { moduleForComponent, test } from 'ember-qunit'; | ||
import { module, test } from 'qunit'; | ||
import { setupRenderingTest } from 'ember-qunit'; | ||
import { render } from '@ember/test-helpers'; | ||
import hbs from 'htmlbars-inline-precompile'; | ||
|
||
moduleForComponent('capitalize', 'helper:capitalize', { | ||
integration: true | ||
}); | ||
module('helper:capitalize', function(hooks) { | ||
setupRenderingTest(hooks); | ||
|
||
// Replace this with your real tests. | ||
test('it renders', function(assert) { | ||
this.set('inputValue', '1234'); | ||
// Replace this with your real tests. | ||
test('it renders', async function(assert) { | ||
this.set('inputValue', '1234'); | ||
|
||
this.render(hbs`{{capitalize inputValue}}`); | ||
await render(hbs`{{capitalize inputValue}}`); | ||
|
||
assert.equal(this.$().text().trim(), '1234'); | ||
assert.equal(this.$().text().trim(), '1234'); | ||
}); | ||
}); | ||
|
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,12 +1,12 @@ | ||
import { moduleFor, test } from 'ember-qunit'; | ||
import { module, test } from 'qunit'; | ||
import { setupTest } from 'ember-qunit'; | ||
|
||
moduleFor('controller:beta', 'Unit | Controller | beta', { | ||
// Specify the other units that are required for this test. | ||
// needs: ['controller:foo'] | ||
}); | ||
module('Unit | Controller | beta', function(hooks) { | ||
setupTest(hooks); | ||
|
||
// Replace this with your real tests. | ||
test('it exists', function(assert) { | ||
let controller = this.subject(); | ||
assert.ok(controller); | ||
// Replace this with your real tests. | ||
test('it exists', function(assert) { | ||
let controller = this.owner.lookup('controller:beta'); | ||
assert.ok(controller); | ||
}); | ||
}); |
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,12 +1,12 @@ | ||
import { moduleFor, test } from 'ember-qunit'; | ||
import { module, test } from 'qunit'; | ||
import { setupTest } from 'ember-qunit'; | ||
|
||
moduleFor('controller:canary', 'Unit | Controller | canary', { | ||
// Specify the other units that are required for this test. | ||
// needs: ['controller:foo'] | ||
}); | ||
module('Unit | Controller | canary', function(hooks) { | ||
setupTest(hooks); | ||
|
||
// Replace this with your real tests. | ||
test('it exists', function(assert) { | ||
let controller = this.subject(); | ||
assert.ok(controller); | ||
// Replace this with your real tests. | ||
test('it exists', function(assert) { | ||
let controller = this.owner.lookup('controller:canary'); | ||
assert.ok(controller); | ||
}); | ||
}); |
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,12 +1,12 @@ | ||
import { moduleFor, test } from 'ember-qunit'; | ||
import { module, test } from 'qunit'; | ||
import { setupTest } from 'ember-qunit'; | ||
|
||
moduleFor('controller:release', 'Unit | Controller | release', { | ||
// Specify the other units that are required for this test. | ||
// needs: ['controller:foo'] | ||
}); | ||
module('Unit | Controller | release', function(hooks) { | ||
setupTest(hooks); | ||
|
||
// Replace this with your real tests. | ||
test('it exists', function(assert) { | ||
let controller = this.subject(); | ||
assert.ok(controller); | ||
// Replace this with your real tests. | ||
test('it exists', function(assert) { | ||
let controller = this.owner.lookup('controller:release'); | ||
assert.ok(controller); | ||
}); | ||
}); |
Oops, something went wrong.