Skip to content
Snippets Groups Projects
Commit df1bd5d3 authored by Sascha Eggenberger's avatar Sascha Eggenberger :speech_balloon:
Browse files

Merge branch 'runners-registration-token-ff-pw-fix' into 'master'

Fix save password form dialog on CI/CD Registration token

See merge request !135583



Merged-by: default avatarSascha Eggenberger <seggenberger@gitlab.com>
Approved-by: default avatarSerhii Yarynovskyi <syarynovskyi@gitlab.com>
Approved-by: default avatarElwyn Benson <ebenson@gitlab.com>
Reviewed-by: default avatarJustin Ho Tuan Duong <hduong@gitlab.com>
Reviewed-by: default avatarSascha Eggenberger <seggenberger@gitlab.com>
parents a4fb2903 d2fb0284
No related branches found
No related tags found
No related merge requests found
Pipeline #1062040592 failed
Pipeline: E2E GDK

#1062047950

    Pipeline: GitLab

    #1062047698

      ......@@ -94,8 +94,12 @@ export default {
      computedValueIsVisible() {
      return !this.showToggleVisibilityButton || this.valueIsVisible;
      },
      inputType() {
      return this.computedValueIsVisible ? 'text' : 'password';
      formInputClass() {
      return [
      'gl-font-monospace! gl-cursor-default!',
      { 'input-copy-show-disc': !this.computedValueIsVisible },
      this.formInputGroupProps.class,
      ];
      },
      },
      mounted() {
      ......@@ -157,10 +161,9 @@ export default {
      ref="input"
      :readonly="readonly"
      :width="size"
      class="gl-font-monospace! gl-cursor-default!"
      :class="formInputClass"
      v-bind="formInputGroupProps"
      :value="value"
      :type="inputType"
      @input="handleInput"
      @click="handleClick"
      />
      ......@@ -194,3 +197,8 @@ export default {
      </template>
      </gl-form-group>
      </template>
      <style>
      .input-copy-show-disc {
      -webkit-text-security: disc;
      }
      </style>
      ......@@ -64,9 +64,9 @@ def find_api_endpoint_url_field
      expect(page).to have_button('Copy SCIM token')
      expect(find_token_field[:type]).to eq('password')
      expect(page).to have_css('.input-copy-show-disc')
      page.click_button('Click to reveal')
      expect(find_token_field[:type]).to eq('text')
      expect(page).not_to have_css('.input-copy-show-disc')
      expect(find_token_field.value).not_to eq('')
      end
      end
      ......
      ......@@ -178,7 +178,7 @@ describe('RegistrationDropdown', () => {
      mountExtended,
      );
      expect(findRegistrationTokenInput().element.type).toBe('password');
      expect(findRegistrationTokenInput().classes()).toContain('input-copy-show-disc');
      });
      });
      ......
      ......@@ -55,7 +55,7 @@ describe('RegistrationToken', () => {
      mountFn: mountExtended,
      });
      expect(wrapper.find('input').element.type).toBe('password');
      expect(wrapper.find('input').classes()).toContain('input-copy-show-disc');
      });
      describe('When the copy to clipboard button is clicked', () => {
      ......
      ......@@ -44,11 +44,11 @@ describe('InputCopyToggleVisibility', () => {
      };
      function expectInputToBeMasked() {
      expect(findFormInput().element.type).toBe('password');
      expect(findFormInput().classes()).toContain('input-copy-show-disc');
      }
      function expectInputToBeRevealed() {
      expect(findFormInput().element.type).toBe('text');
      expect(findFormInput().classes()).not.toContain('input-copy-show-disc');
      expect(findFormInput().element.value).toBe(valueProp);
      }
      ......
      0% Loading or .
      You are about to add 0 people to the discussion. Proceed with caution.
      Finish editing this message first!
      Please register or to comment