diff --git a/ui/lib/core/addon/components/json-editor.hbs b/ui/lib/core/addon/components/json-editor.hbs
index b357b9cd74a6..e16bc06c4e67 100644
--- a/ui/lib/core/addon/components/json-editor.hbs
+++ b/ui/lib/core/addon/components/json-editor.hbs
@@ -51,6 +51,7 @@
{{/if}}
and sets autoRefresh=true so JsonEditor renders content (without this property @value only renders if editor is focused)
* @param {string} [container] - Selector string or element object of containing element, set the focused element as the container value. This is for the Hds::Copy::Button and to set autoRefresh=true so content renders https://hds-website-hashicorp.vercel.app/components/copy/button?tab=code
diff --git a/ui/lib/core/addon/modifiers/code-mirror.js b/ui/lib/core/addon/modifiers/code-mirror.js
index 2860684abeaf..79fe0064aa4e 100644
--- a/ui/lib/core/addon/modifiers/code-mirror.js
+++ b/ui/lib/core/addon/modifiers/code-mirror.js
@@ -56,6 +56,7 @@ export default class CodeMirrorModifier extends Modifier {
styleActiveLine: true,
tabSize: 2,
// all values we can pass into the JsonEditor
+ screenReaderLabel: namedArgs.screenReaderLabel || '',
extraKeys: namedArgs.extraKeys || '',
lineNumbers: namedArgs.lineNumbers,
mode: namedArgs.mode || 'application/json',
diff --git a/ui/tests/integration/components/console/log-json-test.js b/ui/tests/integration/components/console/log-json-test.js
index d6d8944bca65..3304ba50c5de 100644
--- a/ui/tests/integration/components/console/log-json-test.js
+++ b/ui/tests/integration/components/console/log-json-test.js
@@ -7,19 +7,12 @@ import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render, find } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';
-import { setRunOptions } from 'ember-a11y-testing/test-support';
module('Integration | Component | console/log json', function (hooks) {
setupRenderingTest(hooks);
hooks.beforeEach(function () {
this.codeMirror = this.owner.lookup('service:code-mirror');
- // TODO: Fix JSONEditor/CodeMirror
- setRunOptions({
- rules: {
- label: { enabled: false },
- },
- });
});
test('it renders', async function (assert) {
diff --git a/ui/tests/integration/components/form-field-test.js b/ui/tests/integration/components/form-field-test.js
index 3942cd89c9a7..fb7d25fae4e9 100644
--- a/ui/tests/integration/components/form-field-test.js
+++ b/ui/tests/integration/components/form-field-test.js
@@ -12,7 +12,6 @@ import { create } from 'ember-cli-page-object';
import sinon from 'sinon';
import formFields from '../../pages/components/form-field';
import { format, startOfDay } from 'date-fns';
-import { setRunOptions } from 'ember-a11y-testing/test-support';
const component = create(formFields);
@@ -81,24 +80,12 @@ module('Integration | Component | form field', function (hooks) {
});
test('it renders: object', async function (assert) {
- // TODO: Fix JSONEditor/CodeMirror
- setRunOptions({
- rules: {
- label: { enabled: false },
- },
- });
await setup.call(this, createAttr('foo', 'object'));
assert.dom('[data-test-component="json-editor-title"]').hasText('Foo', 'renders a label');
assert.ok(component.hasJSONEditor, 'renders the json editor');
});
test('it renders: string as json with clear button', async function (assert) {
- // TODO: Fix JSONEditor/CodeMirror
- setRunOptions({
- rules: {
- label: { enabled: false },
- },
- });
await setup.call(this, createAttr('foo', 'string', { editType: 'json', allowReset: true }));
assert.dom('[data-test-component="json-editor-title"]').hasText('Foo', 'renders a label');
assert.ok(component.hasJSONEditor, 'renders the json editor');
diff --git a/ui/tests/integration/components/kubernetes/page/role/create-and-edit-test.js b/ui/tests/integration/components/kubernetes/page/role/create-and-edit-test.js
index c6b1d3c1f9db..daeb6ba4c6a0 100644
--- a/ui/tests/integration/components/kubernetes/page/role/create-and-edit-test.js
+++ b/ui/tests/integration/components/kubernetes/page/role/create-and-edit-test.js
@@ -48,8 +48,6 @@ module('Integration | Component | kubernetes | Page::Role::CreateAndEdit', funct
// TODO: fix RadioCard component (replace with HDS)
'aria-valid-attr-value': { enabled: false },
'nested-interactive': { enabled: false },
- // TODO: fix JSONEditor/CodeMirror
- label: { enabled: false },
},
});
});
diff --git a/ui/tests/integration/components/kubernetes/page/role/details-test.js b/ui/tests/integration/components/kubernetes/page/role/details-test.js
index b5b92673605b..91e3912ad773 100644
--- a/ui/tests/integration/components/kubernetes/page/role/details-test.js
+++ b/ui/tests/integration/components/kubernetes/page/role/details-test.js
@@ -11,7 +11,6 @@ import { render, click } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';
import sinon from 'sinon';
import { duration } from 'core/helpers/format-duration';
-import { setRunOptions } from 'ember-a11y-testing/test-support';
const allFields = [
{ label: 'Role name', key: 'name' },
@@ -79,12 +78,6 @@ module('Integration | Component | kubernetes | Page::Role::Details', function (h
}
});
};
- setRunOptions({
- rules: {
- // TODO: Fix JSONEditor component
- label: { enabled: false },
- },
- });
});
test('it should render header with role name and breadcrumbs', async function (assert) {
diff --git a/ui/tests/integration/components/kv/kv-data-fields-test.js b/ui/tests/integration/components/kv/kv-data-fields-test.js
index b60877941f34..0cd83dfb0c1b 100644
--- a/ui/tests/integration/components/kv/kv-data-fields-test.js
+++ b/ui/tests/integration/components/kv/kv-data-fields-test.js
@@ -11,7 +11,6 @@ import { hbs } from 'ember-cli-htmlbars';
import { fillIn, render, click } from '@ember/test-helpers';
import codemirror from 'vault/tests/helpers/codemirror';
import { PAGE, FORM } from 'vault/tests/helpers/kv/kv-selectors';
-import { setRunOptions } from 'ember-a11y-testing/test-support';
module('Integration | Component | kv-v2 | KvDataFields', function (hooks) {
setupRenderingTest(hooks);
@@ -23,12 +22,6 @@ module('Integration | Component | kv-v2 | KvDataFields', function (hooks) {
this.backend = 'my-kv-engine';
this.path = 'my-secret';
this.secret = this.store.createRecord('kv/data', { backend: this.backend });
- // TODO: Fix JSONEditor/CodeMirror
- setRunOptions({
- rules: {
- label: { enabled: false },
- },
- });
});
test('it updates the secret model', async function (assert) {
diff --git a/ui/tests/integration/components/kv/page/kv-page-secret-details-test.js b/ui/tests/integration/components/kv/page/kv-page-secret-details-test.js
index 6567f72f6701..c288f789804f 100644
--- a/ui/tests/integration/components/kv/page/kv-page-secret-details-test.js
+++ b/ui/tests/integration/components/kv/page/kv-page-secret-details-test.js
@@ -13,7 +13,6 @@ import { kvDataPath, kvMetadataPath } from 'vault/utils/kv-path';
import { allowAllCapabilitiesStub } from 'vault/tests/helpers/stubs';
import { FORM, PAGE, parseJsonEditor } from 'vault/tests/helpers/kv/kv-selectors';
import { syncStatusResponse } from 'vault/mirage/handlers/sync';
-import { setRunOptions } from 'ember-a11y-testing/test-support';
module('Integration | Component | kv-v2 | Page::Secret::Details', function (hooks) {
setupRenderingTest(hooks);
@@ -90,12 +89,6 @@ module('Integration | Component | kv-v2 | Page::Secret::Details', function (hook
secret: this.secretComplex,
metadata: this.metadata,
};
- setRunOptions({
- rules: {
- // TODO: Fix JSONEditor component
- label: { enabled: false },
- },
- });
});
test('it renders secret details and toggles json view', async function (assert) {
diff --git a/ui/tests/integration/components/ldap/page/role/create-and-edit-test.js b/ui/tests/integration/components/ldap/page/role/create-and-edit-test.js
index 505c05adefc3..1e4620339a46 100644
--- a/ui/tests/integration/components/ldap/page/role/create-and-edit-test.js
+++ b/ui/tests/integration/components/ldap/page/role/create-and-edit-test.js
@@ -10,7 +10,6 @@ import { setupMirage } from 'ember-cli-mirage/test-support';
import { render, click, fillIn } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';
import sinon from 'sinon';
-import { setRunOptions } from 'ember-a11y-testing/test-support';
module('Integration | Component | ldap | Page::Role::CreateAndEdit', function (hooks) {
setupRenderingTest(hooks);
@@ -51,12 +50,6 @@ module('Integration | Component | ldap | Page::Role::CreateAndEdit', function (h
{ owner: this.engine }
);
};
- setRunOptions({
- rules: {
- // TODO: Fix JsonEditor component
- label: { enabled: false },
- },
- });
});
test('it should display different form fields based on type', async function (assert) {
diff --git a/ui/tests/integration/components/oidc/scope-form-test.js b/ui/tests/integration/components/oidc/scope-form-test.js
index 15a5390ea4e4..40d960de3a25 100644
--- a/ui/tests/integration/components/oidc/scope-form-test.js
+++ b/ui/tests/integration/components/oidc/scope-form-test.js
@@ -9,7 +9,6 @@ import { render, fillIn, click, findAll } from '@ember/test-helpers';
import { hbs } from 'ember-cli-htmlbars';
import { setupMirage } from 'ember-cli-mirage/test-support';
import { SELECTORS, OIDC_BASE_URL, overrideCapabilities } from 'vault/tests/helpers/oidc-config';
-import { setRunOptions } from 'ember-a11y-testing/test-support';
module('Integration | Component | oidc/scope-form', function (hooks) {
setupRenderingTest(hooks);
@@ -17,12 +16,6 @@ module('Integration | Component | oidc/scope-form', function (hooks) {
hooks.beforeEach(function () {
this.store = this.owner.lookup('service:store');
- setRunOptions({
- rules: {
- // TODO: fix JSONEditor/CodeMirror
- label: { enabled: false },
- },
- });
});
test('it should save new scope', async function (assert) {
diff --git a/ui/tests/integration/components/policy-example-test.js b/ui/tests/integration/components/policy-example-test.js
index 884b6dfe8a9a..37659b0585c8 100644
--- a/ui/tests/integration/components/policy-example-test.js
+++ b/ui/tests/integration/components/policy-example-test.js
@@ -22,8 +22,6 @@ module('Integration | Component | policy-example', function (hooks) {
hooks.beforeEach(function () {
setRunOptions({
rules: {
- // TODO: Fix JSONEditor/CodeMirror
- label: { enabled: false },
// failing on .CodeMirror-scroll
'scrollable-region-focusable': { enabled: false },
},
diff --git a/ui/tests/integration/components/policy-form-test.js b/ui/tests/integration/components/policy-form-test.js
index bcb41c94aec0..72f3d61d9955 100644
--- a/ui/tests/integration/components/policy-form-test.js
+++ b/ui/tests/integration/components/policy-form-test.js
@@ -9,7 +9,6 @@ import { click, fillIn, render, triggerEvent } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';
import sinon from 'sinon';
import Pretender from 'pretender';
-import { setRunOptions } from 'ember-a11y-testing/test-support';
const SELECTORS = {
nameInput: '[data-test-policy-input="name"]',
@@ -55,13 +54,6 @@ module('Integration | Component | policy-form', function (hooks) {
return [204, { 'Content-Type': 'application/json' }];
});
});
- setRunOptions({
- rules: {
- // TODO: fix JSONEditor/CodeMirror
- label: { enabled: false },
- 'label-title-only': { enabled: false },
- },
- });
});
hooks.afterEach(function () {
this.server.shutdown();
diff --git a/ui/tests/integration/components/secret-edit-test.js b/ui/tests/integration/components/secret-edit-test.js
index 6cef7a95d263..88136b5ca6e7 100644
--- a/ui/tests/integration/components/secret-edit-test.js
+++ b/ui/tests/integration/components/secret-edit-test.js
@@ -10,7 +10,6 @@ import { resolve } from 'rsvp';
import { run } from '@ember/runloop';
import Service from '@ember/service';
import hbs from 'htmlbars-inline-precompile';
-import { setRunOptions } from 'ember-a11y-testing/test-support';
let capabilities;
const storeService = Service.extend({
@@ -29,12 +28,6 @@ module('Integration | Component | secret edit', function (hooks) {
this.owner.unregister('service:store');
this.owner.register('service:store', storeService);
});
- setRunOptions({
- rules: {
- // TODO: Fix JSONEditor/CodeMirror
- label: { enabled: false },
- },
- });
});
test('it disables JSON toggle in show mode when is an advanced format', async function (assert) {
diff --git a/ui/tests/integration/components/transform-advanced-templating-test.js b/ui/tests/integration/components/transform-advanced-templating-test.js
index f615d30a9a57..04dbd121b284 100644
--- a/ui/tests/integration/components/transform-advanced-templating-test.js
+++ b/ui/tests/integration/components/transform-advanced-templating-test.js
@@ -7,18 +7,11 @@ import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { click, fillIn, render, triggerEvent } from '@ember/test-helpers';
import { hbs } from 'ember-cli-htmlbars';
-import { setRunOptions } from 'ember-a11y-testing/test-support';
module('Integration | Component | transform-advanced-templating', function (hooks) {
setupRenderingTest(hooks);
test('it should render', async function (assert) {
- setRunOptions({
- rules: {
- // TODO: fix JSONEditor/CodeMirror
- label: { enabled: false },
- },
- });
this.model = {
pattern: '(\\d{3})-(\\d{2})-(?\\d{5})',
encodeFormat: null,
diff --git a/ui/tests/integration/components/transit-key-actions-test.js b/ui/tests/integration/components/transit-key-actions-test.js
index b516a57f81c4..544f22f85608 100644
--- a/ui/tests/integration/components/transit-key-actions-test.js
+++ b/ui/tests/integration/components/transit-key-actions-test.js
@@ -12,7 +12,6 @@ import { render, click, find, findAll, fillIn, blur, triggerEvent } from '@ember
import hbs from 'htmlbars-inline-precompile';
import { encodeString } from 'vault/utils/b64';
import waitForError from 'vault/tests/helpers/wait-for-error';
-import { setRunOptions } from 'ember-a11y-testing/test-support';
const storeStub = Service.extend({
callArgs: null,
@@ -46,12 +45,6 @@ module('Integration | Component | transit key actions', function (hooks) {
this.owner.register('service:store', storeStub);
this.storeService = this.owner.lookup('service:store');
});
- setRunOptions({
- rules: {
- // TODO: fix JSONEditor/CodeMirror
- label: { enabled: false },
- },
- });
});
test('it requires `key`', async function (assert) {