2023-03-15 16:00:52 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) HashiCorp, Inc.
|
|
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
|
|
*/
|
|
|
|
|
2020-10-05 21:34:52 +00: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-17 03:44:29 +00:00
|
|
|
module('Integration | Component | form-error', function (hooks) {
|
2020-10-05 21:34:52 +00:00
|
|
|
setupRenderingTest(hooks);
|
|
|
|
|
2021-12-17 03:44:29 +00:00
|
|
|
test('it renders', async function (assert) {
|
2020-10-05 21:34:52 +00: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 16:23:57 +00:00
|
|
|
assert.dom(this.element).hasText('');
|
2020-10-05 21:34:52 +00:00
|
|
|
|
|
|
|
// Template block usage:
|
|
|
|
await render(hbs`
|
|
|
|
{{#form-error}}
|
|
|
|
template block text
|
|
|
|
{{/form-error}}
|
|
|
|
`);
|
|
|
|
|
2021-04-26 16:23:57 +00:00
|
|
|
assert.dom(this.element).hasText('template block text');
|
2020-10-05 21:34:52 +00:00
|
|
|
});
|
|
|
|
});
|