mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-22 15:11:07 +02:00
* Completed initial replacement of editor * fixing ts issues * removing codemirror modifier and deps * working on replacing the code editor * addressing linting concerns * cleaning up policy-form editor * fixing linting issues * fixing linting issues * fixing tests * fixing tests * fixing tests * fixing tests * fixing failing tests * cleaning up PR * fixing tests * remove outdated message for navigating editor * fix linting in tests * add changelog * fix tests * update naming * remove unused lint param + name changes * update test selector usage * update test selector usage * update test selector usage * lint fixes * replace page object selectors * lint fix * fix lint * fix lint after merge * update tests * remove import --------- Co-authored-by: Lane Wetmore <lane.wetmore@hashicorp.com>
27 lines
976 B
JavaScript
27 lines
976 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
import { module, test } from 'qunit';
|
|
import { setupRenderingTest } from 'ember-qunit';
|
|
import { render } from '@ember/test-helpers';
|
|
import hbs from 'htmlbars-inline-precompile';
|
|
import { assertCodeBlockValue } from 'vault/tests/helpers/codemirror';
|
|
|
|
module('Integration | Component | console/log json', function (hooks) {
|
|
setupRenderingTest(hooks);
|
|
|
|
test('it renders', async function (assert) {
|
|
// Set any properties with this.set('myProperty', 'value');
|
|
// Handle any actions with this.on('myAction', function(val) { ... });
|
|
const objectContent = { one: 'two', three: 'four', seven: { five: 'six' }, eight: [5, 6] };
|
|
const expectedText = JSON.stringify(objectContent, null, 2);
|
|
|
|
this.set('content', objectContent);
|
|
|
|
await render(hbs`<Console::LogJson @content={{this.content}} />`);
|
|
assertCodeBlockValue(assert, '.hds-code-block__code', expectedText);
|
|
});
|
|
});
|