diff --git a/addons/rose/addon/components/rose/table.stories.mdx b/addons/rose/addon/components/rose/table.stories.mdx index 353980423..0af8d7d0b 100644 --- a/addons/rose/addon/components/rose/table.stories.mdx +++ b/addons/rose/addon/components/rose/table.stories.mdx @@ -13,23 +13,23 @@ A table component to display data in structure of rows and columns. It supports - - - - + Address + Host Set + Name + Description - - - - + 1.1.1.1 + host-set-1, host-set-2 + optional name + description - + Footer @@ -41,23 +41,23 @@ A table component to display data in structure of rows and columns. It supports - - - - + Address + Host Set + Name + Description - - - - + 1.1.1.1 + host-set-1, host-set-2 + optional name + description - + Footer diff --git a/addons/rose/addon/templates/components/rose/table/cell.hbs b/addons/rose/addon/templates/components/rose/table/cell.hbs index 211909d86..5cfc41c8d 100644 --- a/addons/rose/addon/templates/components/rose/table/cell.hbs +++ b/addons/rose/addon/templates/components/rose/table/cell.hbs @@ -1,11 +1,9 @@ {{#if @header}} - {{@text}} {{yield}} {{else}} - {{@text}} {{yield}} {{/if}} diff --git a/addons/rose/tests/dummy/app/templates/index.hbs b/addons/rose/tests/dummy/app/templates/index.hbs index cd1600429..3554ea5f2 100644 --- a/addons/rose/tests/dummy/app/templates/index.hbs +++ b/addons/rose/tests/dummy/app/templates/index.hbs @@ -1,23 +1,23 @@ - - - - + Address + Host Set + Name + Description - - - - + 1.1.1.1 + host-set-1, host-set-2 + optional name + description - + Footer diff --git a/addons/rose/tests/integration/components/rose/table/cell-test.js b/addons/rose/tests/integration/components/rose/table/cell-test.js index 10a88e890..aeec60376 100644 --- a/addons/rose/tests/integration/components/rose/table/cell-test.js +++ b/addons/rose/tests/integration/components/rose/table/cell-test.js @@ -18,6 +18,13 @@ module('Integration | Component | rose/table/cell', function (hooks) { assert.ok(find('#cell')); }); + test('it renders with content', async function (assert) { + await render(hbs` + Cell content + `); + assert.equal(find('.rose-table-cell').textContent.trim(), 'Cell content'); + }); + test('it renders as header cell', async function (assert) { await render(hbs``); assert.ok(find('.rose-table-cell'));