Beautiful Open-Source Form Builder
Add AI assistant to signup acquisition sources (#1302)
Julien Nahume087b5701825
diff --git a/api/tests/Feature/RegisterTest.php b/api/tests/Feature/RegisterTest.phpindex a0190c4d3..2628d1036 100644--- a/api/tests/Feature/RegisterTest.php+++ b/api/tests/Feature/RegisterTest.php@@ -6,7 +6,7 @@ use App\Rules\ValidReCaptcha;use Illuminate\Contracts\Encryption\DecryptException;use Illuminate\Support\Facades\Http;-it('can register', function () {+it('can register', function (string $source) {Http::fake([ValidReCaptcha::RECAPTCHA_VERIFY_URL => Http::response(['success' => true])@@ -15,7 +15,7 @@ it('can register', function () {$this->postJson('/register', ['name' => 'Test User','email' => '[email protected]',- 'hear_about_us' => 'google',+ 'hear_about_us' => $source,'password' => 'Abcd@1234','password_confirmation' => 'Abcd@1234','agree_terms' => true,@@ -36,9 +36,10 @@ it('can register', function () {$user = User::where('email', '[email protected]')->first();expect($user)->not->toBeNull();+ expect($user->hear_about_us)->toBe($source);expect($user->meta)->toHaveKey('registration_ip');expect($user->meta['registration_ip'])->toBe(request()->ip());-});+})->with(['google', 'ai_assistant']);it('cannot register with existing email', function () {User::factory()->create(['email' => '[email protected]']);diff --git a/client/components/pages/auth/components/RegisterForm.vue b/client/components/pages/auth/components/RegisterForm.vueindex 6e2c9dacc..e5d131d13 100644--- a/client/components/pages/auth/components/RegisterForm.vue+++ b/client/components/pages/auth/components/RegisterForm.vue@@ -212,6 +212,7 @@ const hearAboutUsOptions = computed(() => {name: "Search Engine (Google, DuckDuckGo...)",value: "search_engine",},+ {name: "AI assistant (ChatGPT, Claude, Gemini...)", value: "ai_assistant"},{name: "Friend or Colleague", value: "friend_colleague"},{name: "Blog/Article", value: "blog_article"},]