neues leeres Projekt aufgesetzt und Grundstruktur implementiert
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { click, visit, currentURL } from '@ember/test-helpers';
|
||||
import { setupApplicationTest } from 'ember-qunit';
|
||||
|
||||
module('Acceptance | einkaufszettel', function(hooks) {
|
||||
setupApplicationTest(hooks);
|
||||
|
||||
test('visiting /einkaufszettel', async function(assert) {
|
||||
await visit('/');
|
||||
|
||||
assert.equal(currentURL(), '/');
|
||||
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');
|
||||
|
||||
});
|
||||
|
||||
test('navigating using the nav-bar', async function(assert) {
|
||||
await visit('/');
|
||||
|
||||
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');
|
||||
|
||||
await click('nav a.menu-zettel');
|
||||
assert.equal(currentURL(), '/zettel');
|
||||
|
||||
await click('nav a.menu-produkte');
|
||||
assert.equal(currentURL(), '/produkte');
|
||||
|
||||
await click('nav a.menu-rezepte');
|
||||
assert.equal(currentURL(), '/rezepte');
|
||||
|
||||
await click('nav a.menu-index');
|
||||
assert.equal(currentURL(), '/');
|
||||
});
|
||||
|
||||
test('visiting /zettel', async function(assert) {
|
||||
await visit('/zettel');
|
||||
|
||||
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 a.h2').hasText('deine Zettel');
|
||||
assert.dom('.jumbo a.button').hasText('Zettel aktualisieren');
|
||||
await click('.jumbo a.button');
|
||||
|
||||
assert.equal(currentURL(), '/zettel');
|
||||
});
|
||||
|
||||
});
|
||||
@@ -0,0 +1,26 @@
|
||||
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 | jumbo', 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`<Jumbo />`);
|
||||
|
||||
assert.equal(this.element.textContent.trim(), '');
|
||||
|
||||
// Template block usage:
|
||||
await render(hbs`
|
||||
<Jumbo>
|
||||
template block text
|
||||
</Jumbo>
|
||||
`);
|
||||
|
||||
assert.equal(this.element.textContent.trim(), 'template block text');
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,26 @@
|
||||
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 | produkte', 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 />`);
|
||||
|
||||
assert.equal(this.element.textContent.trim(), '');
|
||||
|
||||
// Template block usage:
|
||||
await render(hbs`
|
||||
<Produkte>
|
||||
template block text
|
||||
</Produkte>
|
||||
`);
|
||||
|
||||
assert.equal(this.element.textContent.trim(), 'template block text');
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,26 @@
|
||||
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 | rezepte', 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 />`);
|
||||
|
||||
assert.equal(this.element.textContent.trim(), '');
|
||||
|
||||
// Template block usage:
|
||||
await render(hbs`
|
||||
<Rezepte>
|
||||
template block text
|
||||
</Rezepte>
|
||||
`);
|
||||
|
||||
assert.equal(this.element.textContent.trim(), 'template block text');
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,26 @@
|
||||
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