Commit b73b8dcd authored by Payton Burdette's avatar Payton Burdette Committed by Jose Ivan Vargas

Fix variables regression

When clearing the modal reset
the state with protected_variable
instead of protected.
parent 59b0dcc4
......@@ -74,7 +74,7 @@ export default {
variable_type: displayText.variableText,
key: '',
secret_value: '',
protected: false,
protected_variable: false,
masked: false,
environment_scope: displayText.allEnvironmentsText,
};
......@@ -103,7 +103,7 @@ export default {
},
[types.SET_VARIABLE_PROTECTED](state) {
state.variable.protected = true;
state.variable.protected_variable = true;
},
[types.UPDATE_VARIABLE_KEY](state, key) {
......
---
title: Fix not being able to add more than one CI variable through the UI
merge_request: 37001
author:
type: fixed
......@@ -41,7 +41,7 @@ describe('CI variable list mutations', () => {
variable_type: 'Variable',
key: '',
secret_value: '',
protected: false,
protected_variable: false,
masked: false,
environment_scope: 'All (default)',
};
......@@ -85,7 +85,7 @@ describe('CI variable list mutations', () => {
it('should set protected value to true', () => {
mutations[types.SET_VARIABLE_PROTECTED](stateCopy);
expect(stateCopy.variable.protected).toBe(true);
expect(stateCopy.variable.protected_variable).toBe(true);
});
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment