diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2019-03-28 00:42:23 +0300 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2019-03-28 00:42:23 +0300 |
commit | 89fdf64c8a3764cf8c646cb4b9eb9b11a3871eae (patch) | |
tree | 8b31028a23cbb3a8b39375b3992f7423b3d5705f /spec/javascripts/ci_variable_list | |
parent | 1b26f3c536682b8989710e70aeb702f76cad9b92 (diff) |
Revert "Merge branch '13784-validate-variables-for-masking' into 'master'"
This reverts merge request !25476
Diffstat (limited to 'spec/javascripts/ci_variable_list')
-rw-r--r-- | spec/javascripts/ci_variable_list/ci_variable_list_spec.js | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/spec/javascripts/ci_variable_list/ci_variable_list_spec.js b/spec/javascripts/ci_variable_list/ci_variable_list_spec.js index 394e60fc22c..70f49469300 100644 --- a/spec/javascripts/ci_variable_list/ci_variable_list_spec.js +++ b/spec/javascripts/ci_variable_list/ci_variable_list_spec.js @@ -127,25 +127,20 @@ describe('VariableList', () => { variableList.init(); }); - it('should not add another row when editing the last rows protected checkbox', done => { + it('should add another row when editing the last rows protected checkbox', done => { const $row = $wrapper.find('.js-row:last-child'); $row.find('.ci-variable-protected-item .js-project-feature-toggle').click(); getSetTimeoutPromise() .then(() => { - expect($wrapper.find('.js-row').length).toBe(1); - }) - .then(done) - .catch(done.fail); - }); + expect($wrapper.find('.js-row').length).toBe(2); - it('should not add another row when editing the last rows masked checkbox', done => { - const $row = $wrapper.find('.js-row:last-child'); - $row.find('.ci-variable-masked-item .js-project-feature-toggle').click(); + // Check for the correct default in the new row + const $protectedInput = $wrapper + .find('.js-row:last-child') + .find('.js-ci-variable-input-protected'); - getSetTimeoutPromise() - .then(() => { - expect($wrapper.find('.js-row').length).toBe(1); + expect($protectedInput.val()).toBe('false'); }) .then(done) .catch(done.fail); |