Commit b49999ab authored by Jose Vargas's avatar Jose Vargas

Close the registration dropdown after a token reset

parent ea1e436a
...@@ -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