2023-03-15 12:00:52 -04:00
|
|
|
/**
|
|
|
|
|
* Copyright (c) HashiCorp, Inc.
|
2023-08-10 21:14:03 -04:00
|
|
|
* SPDX-License-Identifier: BUSL-1.1
|
2023-03-15 12:00:52 -04:00
|
|
|
*/
|
|
|
|
|
|
2020-10-05 17:34:52 -04:00
|
|
|
import { module, test } from 'qunit';
|
|
|
|
|
import { setupRenderingTest } from 'ember-qunit';
|
|
|
|
|
import { render } from '@ember/test-helpers';
|
|
|
|
|
import hbs from 'htmlbars-inline-precompile';
|
|
|
|
|
|
2021-12-16 22:44:29 -05:00
|
|
|
module('Integration | Component | form-error', function (hooks) {
|
2020-10-05 17:34:52 -04:00
|
|
|
setupRenderingTest(hooks);
|
|
|
|
|
|
2021-12-16 22:44:29 -05:00
|
|
|
test('it renders', async function (assert) {
|
2020-10-05 17:34:52 -04:00
|
|
|
// Set any properties with this.set('myProperty', 'value');
|
|
|
|
|
// Handle any actions with this.set('myAction', function(val) { ... });
|
|
|
|
|
|
|
|
|
|
await render(hbs`{{form-error}}`);
|
|
|
|
|
|
2021-04-26 12:23:57 -04:00
|
|
|
assert.dom(this.element).hasText('');
|
2020-10-05 17:34:52 -04:00
|
|
|
|
|
|
|
|
// Template block usage:
|
|
|
|
|
await render(hbs`
|
2023-10-19 10:59:12 -04:00
|
|
|
<FormError>
|
2020-10-05 17:34:52 -04:00
|
|
|
template block text
|
2023-10-19 10:59:12 -04:00
|
|
|
</FormError>
|
2020-10-05 17:34:52 -04:00
|
|
|
`);
|
|
|
|
|
|
2021-04-26 12:23:57 -04:00
|
|
|
assert.dom(this.element).hasText('template block text');
|
2020-10-05 17:34:52 -04:00
|
|
|
});
|
|
|
|
|
});
|