diff --git a/resources/assets/src/components/Captcha.vue b/resources/assets/src/components/Captcha.vue index d6d09258..d345948f 100644 --- a/resources/assets/src/components/Captcha.vue +++ b/resources/assets/src/components/Captcha.vue @@ -29,7 +29,7 @@ :title="$t('auth.change-captcha')" data-placement="top" data-toggle="tooltip" - @click="refreshCaptcha" + @click="refresh" > @@ -71,7 +71,7 @@ export default { onVerify(response) { this.value = response }, - refreshCaptcha() { + refresh() { if (this.recaptcha) { this.$refs.recaptcha.reset() } else { diff --git a/resources/assets/src/views/auth/Forgot.vue b/resources/assets/src/views/auth/Forgot.vue index 804b684f..5b6d1b76 100644 --- a/resources/assets/src/views/auth/Forgot.vue +++ b/resources/assets/src/views/auth/Forgot.vue @@ -88,7 +88,7 @@ export default { this.infoMsg = '' this.warningMsg = msg this.pending = false - this.$refs.captcha.refreshCaptcha() + this.$refs.captcha.refresh() } }, }, diff --git a/resources/assets/src/views/auth/Login.vue b/resources/assets/src/views/auth/Login.vue index 6fe00048..21c6d3b3 100644 --- a/resources/assets/src/views/auth/Login.vue +++ b/resources/assets/src/views/auth/Login.vue @@ -118,7 +118,7 @@ export default { this.infoMsg = '' this.warningMsg = msg this.pending = false - this.$refs.captcha.refreshCaptcha() + this.$refs.captcha.refresh() } }, }, diff --git a/resources/assets/src/views/auth/Register.vue b/resources/assets/src/views/auth/Register.vue index abd7118c..5b375ebf 100644 --- a/resources/assets/src/views/auth/Register.vue +++ b/resources/assets/src/views/auth/Register.vue @@ -179,7 +179,7 @@ export default { } else { this.infoMsg = '' this.warningMsg = msg - this.$refs.captcha.refreshCaptcha() + this.$refs.captcha.refresh() this.pending = false } }, diff --git a/resources/assets/tests/components/Captcha.test.ts b/resources/assets/tests/components/Captcha.test.ts index 067b01b6..d744d3cc 100644 --- a/resources/assets/tests/components/Captcha.test.ts +++ b/resources/assets/tests/components/Captcha.test.ts @@ -17,8 +17,8 @@ test('display recaptcha', () => { }) test('refresh recaptcha', () => { - const wrapper = mount(Captcha) - wrapper.vm.refreshCaptcha() + const wrapper = mount(Captcha) + wrapper.vm.refresh() }) test('recaptcha verified', () => { diff --git a/resources/assets/tests/views/auth/Forgot.test.ts b/resources/assets/tests/views/auth/Forgot.test.ts index 27d805eb..eb884d2b 100644 --- a/resources/assets/tests/views/auth/Forgot.test.ts +++ b/resources/assets/tests/views/auth/Forgot.test.ts @@ -9,7 +9,7 @@ const Captcha = Vue.extend({ execute() { return Promise.resolve('captcha') }, - refreshCaptcha() { /* */ }, + refresh() { /* */ }, }, }) diff --git a/resources/assets/tests/views/auth/Login.test.ts b/resources/assets/tests/views/auth/Login.test.ts index 310c0a06..7f2571d0 100644 --- a/resources/assets/tests/views/auth/Login.test.ts +++ b/resources/assets/tests/views/auth/Login.test.ts @@ -7,7 +7,7 @@ const Captcha = Vue.extend({ execute() { return Promise.resolve('a') }, - refreshCaptcha() { /* */ }, + refresh() { /* */ }, }, template: '', }) diff --git a/resources/assets/tests/views/auth/Register.test.ts b/resources/assets/tests/views/auth/Register.test.ts index 577b245e..5e9f35af 100644 --- a/resources/assets/tests/views/auth/Register.test.ts +++ b/resources/assets/tests/views/auth/Register.test.ts @@ -10,7 +10,7 @@ const Captcha = Vue.extend({ execute() { return Promise.resolve('captcha') }, - refreshCaptcha() { /* */ }, + refresh() { /* */ }, }, })