Datenanbindung und Kategorie Komponente implementiert.
This commit is contained in:
@@ -48,11 +48,45 @@ module('Acceptance | einkaufszettel', function(hooks) {
|
||||
assert.dom('nav a.menu-produkte').hasText('Produkte');
|
||||
assert.dom('nav a.menu-rezepte').hasText('Rezepte');
|
||||
|
||||
assert.dom('.jumbo a.h2').hasText('deine Zettel');
|
||||
assert.dom('.jumbo h2').hasText('deine Zettel');
|
||||
assert.dom('.jumbo a.button').hasText('Zettel aktualisieren');
|
||||
await click('.jumbo a.button');
|
||||
|
||||
assert.equal(currentURL(), '/zettel');
|
||||
});
|
||||
|
||||
test('visiting /produkte', async function(assert) {
|
||||
await visit('/produkte');
|
||||
|
||||
assert.dom('nav').exists();
|
||||
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');
|
||||
|
||||
assert.dom('.jumbo h2').hasText('deine Produkte');
|
||||
assert.dom('.jumbo a.button').hasText('Produkte bearbeiten');
|
||||
await click('.jumbo a.button');
|
||||
|
||||
assert.equal(currentURL(), '/produkte');
|
||||
});
|
||||
|
||||
test('visiting /rezepte', async function(assert) {
|
||||
await visit('/rezepte');
|
||||
|
||||
assert.dom('nav').exists();
|
||||
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');
|
||||
|
||||
assert.dom('.jumbo h2').hasText('deine Rezepte');
|
||||
assert.dom('.jumbo a.button').hasText('Rezepte bearbeiten');
|
||||
await click('.jumbo a.button');
|
||||
|
||||
assert.equal(currentURL(), '/rezepte');
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
+4
-4
@@ -3,22 +3,22 @@ import { setupRenderingTest } from 'ember-qunit';
|
||||
import { render } from '@ember/test-helpers';
|
||||
import { hbs } from 'ember-cli-htmlbars';
|
||||
|
||||
module('Integration | Component | produkte', function(hooks) {
|
||||
module('Integration | Component | kategorie', 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`<Produkte />`);
|
||||
await render(hbs`<Kategorie />`);
|
||||
|
||||
assert.equal(this.element.textContent.trim(), '');
|
||||
|
||||
// Template block usage:
|
||||
await render(hbs`
|
||||
<Produkte>
|
||||
<Kategorie>
|
||||
template block text
|
||||
</Produkte>
|
||||
</Kategorie>
|
||||
`);
|
||||
|
||||
assert.equal(this.element.textContent.trim(), 'template block text');
|
||||
+4
-4
@@ -3,22 +3,22 @@ import { setupRenderingTest } from 'ember-qunit';
|
||||
import { render } from '@ember/test-helpers';
|
||||
import { hbs } from 'ember-cli-htmlbars';
|
||||
|
||||
module('Integration | Component | rezepte', function(hooks) {
|
||||
module('Integration | Component | produkt', 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`<Rezepte />`);
|
||||
await render(hbs`<Produkt />`);
|
||||
|
||||
assert.equal(this.element.textContent.trim(), '');
|
||||
|
||||
// Template block usage:
|
||||
await render(hbs`
|
||||
<Rezepte>
|
||||
<Produkt>
|
||||
template block text
|
||||
</Rezepte>
|
||||
</Produkt>
|
||||
`);
|
||||
|
||||
assert.equal(this.element.textContent.trim(), 'template block text');
|
||||
@@ -1,26 +0,0 @@
|
||||
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 | zettel', 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`<Zettel />`);
|
||||
|
||||
assert.equal(this.element.textContent.trim(), '');
|
||||
|
||||
// Template block usage:
|
||||
await render(hbs`
|
||||
<Zettel>
|
||||
template block text
|
||||
</Zettel>
|
||||
`);
|
||||
|
||||
assert.equal(this.element.textContent.trim(), 'template block text');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user