presentation version
This commit is contained in:
@@ -10,7 +10,7 @@ module('Acceptance | einkaufszettel', function(hooks) {
|
||||
|
||||
assert.equal(currentURL(), '/');
|
||||
assert.dom('nav').exists();
|
||||
assert.dom('nav a.menu-index').hasText('EinkaufsZettel')
|
||||
assert.dom('nav a.menu-index').hasText('EinkaufsZettel');
|
||||
assert.dom('nav a.menu-zettel').hasText('Zettel');
|
||||
assert.dom('nav a.menu-produkte').hasText('Produkte');
|
||||
assert.dom('nav a.menu-rezepte').hasText('Rezepte');
|
||||
@@ -21,7 +21,7 @@ module('Acceptance | einkaufszettel', function(hooks) {
|
||||
await visit('/');
|
||||
|
||||
assert.dom('nav').exists();
|
||||
assert.dom('nav a.menu-index').hasText('EinkaufsZettel')
|
||||
assert.dom('nav a.menu-index').hasText('EinkaufsZettel');
|
||||
assert.dom('nav a.menu-zettel').hasText('Zettel');
|
||||
assert.dom('nav a.menu-produkte').hasText('Produkte');
|
||||
assert.dom('nav a.menu-rezepte').hasText('Rezepte');
|
||||
@@ -43,7 +43,7 @@ module('Acceptance | einkaufszettel', function(hooks) {
|
||||
await visit('/zettel');
|
||||
|
||||
assert.dom('nav').exists();
|
||||
assert.dom('nav a.menu-index').hasText('EinkaufsZettel')
|
||||
assert.dom('nav a.menu-index').hasText('EinkaufsZettel');
|
||||
assert.dom('nav a.menu-zettel').hasText('Zettel');
|
||||
assert.dom('nav a.menu-produkte').hasText('Produkte');
|
||||
assert.dom('nav a.menu-rezepte').hasText('Rezepte');
|
||||
@@ -59,7 +59,7 @@ module('Acceptance | einkaufszettel', function(hooks) {
|
||||
await visit('/produkte');
|
||||
|
||||
assert.dom('nav').exists();
|
||||
assert.dom('nav a.menu-index').hasText('EinkaufsZettel')
|
||||
assert.dom('nav a.menu-index').hasText('EinkaufsZettel');
|
||||
assert.dom('nav a.menu-zettel').hasText('Zettel');
|
||||
assert.dom('nav a.menu-produkte').hasText('Produkte');
|
||||
assert.dom('nav a.menu-rezepte').hasText('Rezepte');
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupRenderingTest } from 'ember-qunit';
|
||||
import { render } from '@ember/test-helpers';
|
||||
import { hbs } from 'ember-cli-htmlbars';
|
||||
|
||||
module('Integration | Component | bild', function(hooks) {
|
||||
setupRenderingTest(hooks);
|
||||
|
||||
test('it renders', async function(assert) {
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.set('myAction', function(val) { ... });
|
||||
|
||||
await render(hbs`<Bild />`);
|
||||
|
||||
assert.equal(this.element.textContent.trim(), '');
|
||||
|
||||
});
|
||||
});
|
||||
@@ -12,15 +12,7 @@ module('Integration | Component | produkt', function(hooks) {
|
||||
|
||||
await render(hbs`<Produkt />`);
|
||||
|
||||
assert.equal(this.element.textContent.trim(), '');
|
||||
assert.dom('.produkt img').isVisible();
|
||||
|
||||
// Template block usage:
|
||||
await render(hbs`
|
||||
<Produkt>
|
||||
template block text
|
||||
</Produkt>
|
||||
`);
|
||||
|
||||
assert.equal(this.element.textContent.trim(), 'template block text');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupRenderingTest } from 'ember-qunit';
|
||||
import { render } from '@ember/test-helpers';
|
||||
import { hbs } from 'ember-cli-htmlbars';
|
||||
|
||||
module('Integration | Component | rezept', function(hooks) {
|
||||
setupRenderingTest(hooks);
|
||||
|
||||
test('it renders', async function(assert) {
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.set('myAction', function(val) { ... });
|
||||
|
||||
await render(hbs`<Rezept />`);
|
||||
assert.dom('.rezept h4').hasText('Zutaten:');
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupTest } from 'ember-qunit';
|
||||
|
||||
module('Unit | Adapter | application', function(hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it exists', function(assert) {
|
||||
let adapter = this.owner.lookup('adapter:application');
|
||||
assert.ok(adapter);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupTest } from 'ember-qunit';
|
||||
|
||||
module('Unit | Model | produkte', function(hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
test('it has the right type', function(assert) {
|
||||
let store = this.owner.lookup('service:store');
|
||||
let model = store.createRecord('produkt', {titel: 'Testprodukt'});
|
||||
assert.ok(model);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupTest } from 'ember-qunit';
|
||||
|
||||
module('Unit | Model | rezepte', function(hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
test('it has the right type', function(assert) {
|
||||
let store = this.owner.lookup('service:store');
|
||||
let model = store.createRecord('rezept', {titel: 'Testrezept'});
|
||||
assert.ok(model);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,11 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupTest } from 'ember-qunit';
|
||||
|
||||
module('Unit | Route | zettel', function(hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
test('it exists', function(assert) {
|
||||
let route = this.owner.lookup('route:zettel');
|
||||
assert.ok(route);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,23 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupTest } from 'ember-qunit';
|
||||
|
||||
module('Unit | Serializer | application', function(hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it exists', function(assert) {
|
||||
let store = this.owner.lookup('service:store');
|
||||
let serializer = store.serializerFor('produkt');
|
||||
|
||||
assert.ok(serializer);
|
||||
});
|
||||
|
||||
test('it serializes records', function(assert) {
|
||||
let store = this.owner.lookup('service:store');
|
||||
let record = store.createRecord('produkt', {});
|
||||
|
||||
let serializedRecord = record.serialize();
|
||||
|
||||
assert.ok(serializedRecord);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user