Better empty state copy

This commit is contained in:
Joshua Ogle
2018-11-03 11:21:49 -06:00
committed by Matthew Irish
parent ab00bc8d96
commit 4767923a8f
16 changed files with 105 additions and 57 deletions

View File

@@ -1,6 +1,6 @@
import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render } from '@ember/test-helpers';
import { render, find } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';
module('Integration | Component | empty-state', function(hooks) {
@@ -16,11 +16,28 @@ module('Integration | Component | empty-state', function(hooks) {
// Template block usage:
await render(hbs`
{{#empty-state}}
template block text
{{#empty-state
title="Empty State Title"
message="This is the empty state message"
}}
Actions Link
{{/empty-state}}
`);
assert.equal(this.element.textContent.trim(), 'template block text');
assert.equal(
find('.empty-state-title').textContent.trim(),
'Empty State Title',
'renders empty state title'
);
assert.equal(
find('.empty-state-message').textContent.trim(),
'This is the empty state message',
'renders empty state message'
);
assert.equal(
find('.empty-state-actions').textContent.trim(),
'Actions Link',
'renders empty state actions'
);
});
});