Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorgfyoung <gfyoung17@gmail.com>2018-07-16 23:59:37 +0300
committergfyoung <gfyoung17@gmail.com>2018-07-18 18:57:25 +0300
commit510ea543d190866202cd4f1bbb378c263fc9765c (patch)
treecae1041e786cc492fccce05d4e94f60bae0a4848 /spec
parent0d488c7b8a7ab462b78daa20e0f12fe73ebb8a6d (diff)
Toggle Show / Hide Button for Kubernetes Password
Closes #49193.
Diffstat (limited to 'spec')
-rw-r--r--spec/javascripts/clusters/clusters_bundle_spec.js18
1 files changed, 17 insertions, 1 deletions
diff --git a/spec/javascripts/clusters/clusters_bundle_spec.js b/spec/javascripts/clusters/clusters_bundle_spec.js
index abe2954d506..839b8a06b48 100644
--- a/spec/javascripts/clusters/clusters_bundle_spec.js
+++ b/spec/javascripts/clusters/clusters_bundle_spec.js
@@ -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', () => {