From d70d86e94088c9c3c8d053ee5de4935122c09381 Mon Sep 17 00:00:00 2001 From: Ava Wroten Date: Thu, 5 Mar 2020 10:27:38 -0600 Subject: [PATCH] Tests --- .../app/components/sortable-item-accessible.hbs | 6 ++++-- .../components/sortable-item-accessible-test.js | 14 +++----------- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/ember-ui/app/components/sortable-item-accessible.hbs b/ember-ui/app/components/sortable-item-accessible.hbs index 0bf049b..1e806bc 100644 --- a/ember-ui/app/components/sortable-item-accessible.hbs +++ b/ember-ui/app/components/sortable-item-accessible.hbs @@ -6,7 +6,8 @@ {{on 'blur' @handleBlur}} data-action-up role="button" - class="text-gray-800 outline-none absolute left-0 top-0 p-2 m-4 bg-white rounded-lg border-2 border-gray-800 focus:border-teal-400 shadow-sm"> + class="text-gray-800 outline-none absolute left-0 top-0 p-2 m-4 bg-white rounded-lg border-2 border-gray-800 focus:border-teal-400 shadow-sm" + data-test-id='sort-down'> {{/if}} diff --git a/ember-ui/tests/integration/components/sortable-item-accessible-test.js b/ember-ui/tests/integration/components/sortable-item-accessible-test.js index 234ea88..b50d5de 100644 --- a/ember-ui/tests/integration/components/sortable-item-accessible-test.js +++ b/ember-ui/tests/integration/components/sortable-item-accessible-test.js @@ -6,21 +6,13 @@ import { hbs } from 'ember-cli-htmlbars'; module('Integration | Component | sortable-item-accessible', 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``); - - assert.equal(this.element.textContent.trim(), ''); - - // Template block usage: + test('it can yield text', async function(assert) { await render(hbs` - template block text + yielded text `); - assert.equal(this.element.textContent.trim(), 'template block text'); + assert.equal(this.element.textContent.trim(), 'yielded text'); }); });