Add file type icons

This commit is contained in:
2017-11-09 00:48:59 +01:00
parent 939dce2b1f
commit ff2f44df18
9 changed files with 47 additions and 3 deletions

View File

@@ -13,6 +13,6 @@ test('it renders directory items', function(assert) {
this.render(hbs`{{directory-listing items=items}}`);
assert.equal(this.$('table tbody tr:first td:first').text(), 'documents');
assert.equal(this.$('table tbody tr:first td:last').text(), 'folder');
assert.equal(this.$('table tbody tr:first td:nth-of-type(2)').text(), 'documents');
assert.equal(this.$('table tbody tr:first td:nth-of-type(3)').text(), 'folder');
});

View File

@@ -0,0 +1,12 @@
import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('item-icon', 'Integration | Component | item icon', {
integration: true
});
test('it renders', function(assert) {
this.render(hbs`{{item-icon type='folder'}}`);
assert.equal(this.$('img').attr('src'), '/img/file-icons/folder.svg');
});