From 6ce09162d79f86333103db5430adfe82f8105b23 Mon Sep 17 00:00:00 2001 From: Susmitha Girumala Date: Fri, 19 Mar 2021 11:54:28 -0400 Subject: [PATCH] test: Update integration tests in desktop --- .../components/branded-card-test.js | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/ui/desktop/tests/integration/components/branded-card-test.js b/ui/desktop/tests/integration/components/branded-card-test.js index 019103ec5..cc537772d 100644 --- a/ui/desktop/tests/integration/components/branded-card-test.js +++ b/ui/desktop/tests/integration/components/branded-card-test.js @@ -1,26 +1,27 @@ 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 'ember-cli-htmlbars'; module('Integration | Component | branded-card', 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.ok(find('.branded-card')); + assert.ok(find('.branded-card-title')); + assert.ok(find('.branded-card-description')); + }); - assert.equal(this.element.textContent.trim(), ''); - - // Template block usage: - await render(hbs` - - template block text - - `); - - assert.equal(this.element.textContent.trim(), 'template block text'); + test('it renders with content', async function (assert) { + await render(hbs``); + assert.equal(find('.branded-card-title').textContent.trim(), 'title'); + assert.equal( + find('.branded-card-description').textContent.trim(), + 'description' + ); }); });