提交 510ea543 编写于 作者: G gfyoung

Toggle Show / Hide Button for Kubernetes Password

Closes #49193.
上级 0d488c7b
......@@ -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');
}
}
......
---
title: Toggle Show / Hide Button for Kubernetes Password
merge_request: 20659
author: gfyoung
type: fixed
......@@ -1286,6 +1286,9 @@ msgstr ""
msgid "ClusterIntegration|Helm Tiller"
msgstr ""
msgid "ClusterIntegration|Hide"
msgstr ""
msgid "ClusterIntegration|Ingress"
msgstr ""
......
......@@ -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', () => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册