mirror of
https://github.com/ansible/awx.git
synced 2026-02-26 07:26:03 -03:30
Merge pull request #11917 from nixocio/ui_survey_issue
Fix credential encrypted
This commit is contained in:
@@ -116,6 +116,13 @@ function SurveyReorderModal({
|
|||||||
const defaultAnswer = (q) => {
|
const defaultAnswer = (q) => {
|
||||||
let component = null;
|
let component = null;
|
||||||
switch (q.type) {
|
switch (q.type) {
|
||||||
|
case 'password':
|
||||||
|
component = (
|
||||||
|
<span id="survey-preview-encrypted">
|
||||||
|
{t`encrypted`.toUpperCase()}
|
||||||
|
</span>
|
||||||
|
);
|
||||||
|
break;
|
||||||
case 'textarea':
|
case 'textarea':
|
||||||
component = (
|
component = (
|
||||||
<TextArea
|
<TextArea
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ describe('<SurveyReorderModal />', () => {
|
|||||||
const question3Value = wrapper.find('textarea');
|
const question3Value = wrapper.find('textarea');
|
||||||
|
|
||||||
const question4 = wrapper.find('td[aria-label="Password Question"]');
|
const question4 = wrapper.find('td[aria-label="Password Question"]');
|
||||||
const question4Value = wrapper.find('TextInputBase#survey-preview-text-c');
|
const question4Value = wrapper.find('#survey-preview-encrypted');
|
||||||
|
|
||||||
const question5 = wrapper.find('td[aria-label="Multiple select Question"]');
|
const question5 = wrapper.find('td[aria-label="Multiple select Question"]');
|
||||||
const question5Value = wrapper
|
const question5Value = wrapper
|
||||||
@@ -110,8 +110,7 @@ describe('<SurveyReorderModal />', () => {
|
|||||||
expect(question3Value.prop('value')).toBe('Text Area Question Value');
|
expect(question3Value.prop('value')).toBe('Text Area Question Value');
|
||||||
expect(question3Value.prop('disabled')).toBe(true);
|
expect(question3Value.prop('disabled')).toBe(true);
|
||||||
expect(question4).toHaveLength(1);
|
expect(question4).toHaveLength(1);
|
||||||
expect(question4Value.prop('value')).toBe('$encrypted$');
|
expect(question4Value.prop('children')).toBe('ENCRYPTED');
|
||||||
expect(question4Value.prop('isDisabled')).toBe(true);
|
|
||||||
|
|
||||||
expect(question5).toHaveLength(1);
|
expect(question5).toHaveLength(1);
|
||||||
expect(question5Value.length).toBe(4);
|
expect(question5Value.length).toBe(4);
|
||||||
|
|||||||
Reference in New Issue
Block a user