From 6a90249b6a9c14391bf1ada9bb4726e8bf1e4ffd Mon Sep 17 00:00:00 2001
From: mfluharty <mfluharty@gitlab.com>
Date: Thu, 6 Jun 2019 17:00:25 +0100
Subject: [PATCH] Add masked toggle click to frontend spec

Need to set masked to true before testing now that the default is false
---
 spec/javascripts/ci_variable_list/ci_variable_list_spec.js | 4 ++--
 1 file changed, 2 insertions(+), 2 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 1b2b186234e..064113e879a 100644
--- a/spec/javascripts/ci_variable_list/ci_variable_list_spec.js
+++ b/spec/javascripts/ci_variable_list/ci_variable_list_spec.js
@@ -154,11 +154,11 @@ describe('VariableList', () => {
     describe('validateMaskability', () => {
       let $row;
 
-      const maskingErrorElement = '.js-row:nth-child(2) .masking-validation-error';
+      const maskingErrorElement = '.js-row:last-child .masking-validation-error';
 
       beforeEach(() => {
         $row = $wrapper.find('.js-row:last-child');
-        $row.find('.js-ci-variable-input-key').val('variable-key');
+        $row.find('.ci-variable-masked-item .js-project-feature-toggle').click();
       });
 
       it('has a regex provided via a data attribute', () => {
-- 
2.30.9