From 91b50c0b3ab3a08dd061c4e5fcffbd52022961f3 Mon Sep 17 00:00:00 2001 From: Nicole Chung <771170+nicolechung@users.noreply.github.com> Date: Fri, 10 Feb 2023 15:06:12 -0500 Subject: [PATCH] wip commit --- .../integration/components/field-test.gts | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/test-app/tests/integration/components/field-test.gts b/test-app/tests/integration/components/field-test.gts index 4acf5068f..d20f338d7 100644 --- a/test-app/tests/integration/components/field-test.gts +++ b/test-app/tests/integration/components/field-test.gts @@ -1,4 +1,4 @@ -import { render } from '@ember/test-helpers'; +import { render, findAll } from '@ember/test-helpers'; import { module, test } from 'qunit'; import Field from '@crowdstrike/ember-toucan-core/components/form/field'; @@ -105,20 +105,22 @@ module('Integration | Component | Field', function (hooks) { // TODO: Checkpoint: finish this test('it renders conditionally', async function (assert) { await render(); const label = 'label'; const hint = '[data-test-hint]'; const error = '[data-test-error]'; const control = '[data-test-input]'; - + const children = findAll('[data-test-field] > div'); assert.dom(label).exists('Expected to have label block rendered'); assert.dom(label).hasText('label', 'Expected to have label text "label"'); @@ -130,6 +132,7 @@ module('Integration | Component | Field', function (hooks) { assert .dom('svg') .doesNotExist('Error block does not exist (no error icon shown)'); + assert .dom(error) .hasText('error', 'Expected to have error text rendered');