chore: 🤖 cleanup json creds code / tests (#1535)
This commit is contained in:
1 parent
f1b7a9cd84
commit
51c1aba794
10 files changed
+117
-81
No files matched your search
@@ -3,18 +3,21 @@ import { setupRenderingTest } from 'ember-qunit';
|
||||
import { render } from '@ember/test-helpers';
|
||||
import { hbs } from 'ember-cli-htmlbars';
|
||||
|
||||
module('Integration | Component | form/field/json-secret/skeleton', function (hooks) {
|
||||
setupRenderingTest(hooks);
|
||||
module(
|
||||
'Integration | Component | form/field/json-secret/skeleton',
|
||||
function (hooks) {
|
||||
setupRenderingTest(hooks);
|
||||
|
||||
test('it renders', async function (assert) {
|
||||
assert.expect(2);
|
||||
await render(hbs`
|
||||
test('it renders', async function (assert) {
|
||||
assert.expect(2);
|
||||
await render(hbs`
|
||||
<Form::Field::JsonSecret::Skeleton>
|
||||
Skeleton Message
|
||||
</Form::Field::JsonSecret::Skeleton>
|
||||
`);
|
||||
|
||||
assert.dom('.secret-editor-skeleton-wrapper').isVisible();
|
||||
assert.dom('.secret-editor-skeleton-message').hasText('Skeleton Message');
|
||||
});
|
||||
});
|
||||
assert.dom('.secret-editor-skeleton-wrapper').isVisible();
|
||||
assert.dom('.secret-editor-skeleton-message').hasText('Skeleton Message');
|
||||
});
|
||||
}
|
||||
);
|
||||
@@ -26,7 +26,9 @@ module('Integration | Component | form/field/json-secret', function (hooks) {
|
||||
|
||||
assert.dom('.secret-editor').isVisible();
|
||||
assert.dom('.secret-editor-json').isVisible();
|
||||
assert.dom('.secret-editor-json .CodeMirror-line').hasText(this.model.json_object);
|
||||
assert
|
||||
.dom('.secret-editor-json .CodeMirror-line')
|
||||
.hasText(this.model.json_object);
|
||||
});
|
||||
|
||||
test('it renders the disabled editor', async function (assert) {
|
||||
@@ -42,7 +44,9 @@ module('Integration | Component | form/field/json-secret', function (hooks) {
|
||||
|
||||
assert.dom('.secret-editor').isVisible();
|
||||
assert.dom('.secret-editor-json').doesNotExist();
|
||||
assert.dom('.secret-editor-skeleton-wrapper').hasText('This secret is saved but won\'t be displayed');
|
||||
assert
|
||||
.dom('.secret-editor-skeleton-wrapper')
|
||||
.hasText("This secret is saved but won't be displayed");
|
||||
});
|
||||
|
||||
test('it renders the actionable editor', async function (assert) {
|
||||
@@ -58,7 +62,9 @@ module('Integration | Component | form/field/json-secret', function (hooks) {
|
||||
|
||||
assert.dom('.secret-editor').isVisible();
|
||||
assert.dom('.secret-editor-json').doesNotExist();
|
||||
assert.dom('.secret-editor-skeleton-wrapper').hasText('Click to replace this secret');
|
||||
assert
|
||||
.dom('.secret-editor-skeleton-wrapper')
|
||||
.hasText('Click to replace this secret');
|
||||
});
|
||||
|
||||
test('it renders the active editor from the actionable view', async function (assert) {
|
||||
@@ -74,9 +80,11 @@ module('Integration | Component | form/field/json-secret', function (hooks) {
|
||||
|
||||
assert.dom('.secret-editor').isVisible();
|
||||
assert.dom('.secret-editor-json').doesNotExist();
|
||||
assert.dom('.secret-editor-skeleton-wrapper').hasText('Click to replace this secret');
|
||||
assert
|
||||
.dom('.secret-editor-skeleton-wrapper')
|
||||
.hasText('Click to replace this secret');
|
||||
|
||||
await click('button')
|
||||
await click('button');
|
||||
assert.dom('.secret-editor-json').isVisible();
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user