Skip to content
Snippets Groups Projects
Commit 510ea543 authored by gfyoung's avatar gfyoung
Browse files

Toggle Show / Hide Button for Kubernetes Password

Closes #49193.
parent 0d488c7b
No related branches found
No related tags found
1 merge request!10495Merge Requests - Assignee
Loading
Loading
@@ -162,8 +162,10 @@ export default class Clusters {
 
if (type === 'password') {
this.tokenField.setAttribute('type', 'text');
this.showTokenButton.textContent = s__('ClusterIntegration|Hide');
} else {
this.tokenField.setAttribute('type', 'password');
this.showTokenButton.textContent = s__('ClusterIntegration|Show');
}
}
 
Loading
Loading
---
title: Toggle Show / Hide Button for Kubernetes Password
merge_request: 20659
author: gfyoung
type: fixed
Loading
Loading
@@ -1286,6 +1286,9 @@ msgstr ""
msgid "ClusterIntegration|Helm Tiller"
msgstr ""
 
msgid "ClusterIntegration|Hide"
msgstr ""
msgid "ClusterIntegration|Ingress"
msgstr ""
 
Loading
Loading
Loading
Loading
@@ -45,17 +45,33 @@ describe('Clusters', () => {
});
 
describe('showToken', () => {
it('should update tye field type', () => {
it('should update token field type', () => {
cluster.showTokenButton.click();
expect(
cluster.tokenField.getAttribute('type'),
).toEqual('text');
 
cluster.showTokenButton.click();
expect(
cluster.tokenField.getAttribute('type'),
).toEqual('password');
});
it('should update show token button text', () => {
cluster.showTokenButton.click();
expect(
cluster.showTokenButton.textContent,
).toEqual('Hide');
cluster.showTokenButton.click();
expect(
cluster.showTokenButton.textContent,
).toEqual('Show');
});
});
 
describe('checkForNewInstalls', () => {
Loading
Loading
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