* [COMPLIANCE] Add Copyright and License Headers * chore: 🤖 update Copyright headers to satisfy our lint rules --------- Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com> Co-authored-by: Cameron Perera <cameron.perera@hashicorp.com>
33 lines
984 B
JavaScript
33 lines
984 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
*/
|
|
|
|
import { module, test } from 'qunit';
|
|
import { setupRenderingTest } from 'ember-qunit';
|
|
import { render } from '@ember/test-helpers';
|
|
import { hbs } from 'ember-cli-htmlbars';
|
|
|
|
module('Integration | Component | rose/code-editor', function (hooks) {
|
|
setupRenderingTest(hooks);
|
|
|
|
test('it renders', async function (assert) {
|
|
const codeValue = 'export HCP_CLIENT_ID = {place your client_id here}';
|
|
this.set('codeValue', codeValue);
|
|
|
|
await render(hbs`
|
|
<Rose::CodeEditor
|
|
@codeValue={{this.codeValue}}
|
|
as |c|
|
|
>
|
|
<c.toolbar />
|
|
<c.fieldEditor />
|
|
</Rose::CodeEditor>
|
|
`);
|
|
assert.dom('[data-test-code-editor]').isVisible();
|
|
assert.dom('[data-test-code-editor-toolbar]').isVisible();
|
|
assert.dom('[data-test-code-editor-field-editor]').isVisible();
|
|
assert.dom('[data-test-code-editor-field-editor]').includesText(codeValue);
|
|
});
|
|
});
|