Commit ad636465 authored by Peter Hegman's avatar Peter Hegman

Merge branch 'jivanvl-register-runner-dropdown-improvements' into 'master'

Close the registration dropdown after a token reset

See merge request gitlab-org/gitlab!73009
parents 2f042494 b49999ab
...@@ -76,13 +76,21 @@ export default { ...@@ -76,13 +76,21 @@ export default {
}, },
onTokenReset(token) { onTokenReset(token) {
this.currentRegistrationToken = token; this.currentRegistrationToken = token;
this.$refs.runnerRegistrationDropdown.hide(true);
}, },
}, },
}; };
</script> </script>
<template> <template>
<gl-dropdown menu-class="gl-w-auto!" :text="dropdownText" variant="confirm" v-bind="$attrs"> <gl-dropdown
ref="runnerRegistrationDropdown"
menu-class="gl-w-auto!"
:text="dropdownText"
variant="confirm"
v-bind="$attrs"
>
<gl-dropdown-item @click.capture.native.stop="onShowInstructionsClick"> <gl-dropdown-item @click.capture.native.stop="onShowInstructionsClick">
{{ $options.i18n.showInstallationInstructions }} {{ $options.i18n.showInstallationInstructions }}
<runner-instructions-modal <runner-instructions-modal
......
...@@ -323,6 +323,8 @@ RSpec.describe "Admin Runners" do ...@@ -323,6 +323,8 @@ RSpec.describe "Admin Runners" do
end end
it 'changes registration token' do it 'changes registration token' do
click_on 'Register an instance runner'
click_on 'Click to reveal' click_on 'Click to reveal'
expect(page_token).not_to eq token expect(page_token).not_to eq token
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment