Skip to content

Beautiful Open-Source Form Builder

Fix oAuth message spam

Julien Nahum7fe35454821d
diff --cc api/tests/Feature/Forms/FormSubmissionExportTest.php
index 6b90289a0,993e1180a..73a9d315a
--- a/api/tests/Feature/Forms/FormSubmissionExportTest.php
+++ b/api/tests/Feature/Forms/FormSubmissionExportTest.php
@@@ -97,42 -97,37 +97,76 @@@ it('includes status column when partia
$workspace = $this->createUserWorkspace($user);
$form = $this->createForm($user, $workspace, [
'enable_partial_submissions' => true,
++<<<<<<< HEAD
+ 'properties' => [
+ [
+ 'id' => 'name_field',
+ 'name' => 'Name',
+ 'type' => 'text',
+ 'required' => true,
+ ],
+ [
+ 'id' => 'email_field',
+ 'name' => 'Email',
+ 'type' => 'email',
+ 'required' => true,
+ ]
+ ]
+ ]);
+
+ // Create a partial submission (In Progress)
+ $partialSubmissionData = $this->generateFormSubmissionData($form, [
+ 'name_field' => 'John Partial',
+ ]);
+ $partialSubmissionData['is_partial'] = true;
+ $this->postJson(route('forms.answer', $form->slug), $partialSubmissionData);
+
+ // Create a completed submission
+ $completedSubmissionData = $this->generateFormSubmissionData($form, [
+ 'name_field' => 'Jane Complete',
+ 'email_field' => '[email protected]'
+ ]);
+ $this->postJson(route('forms.answer', $form->slug), $completedSubmissionData);
+
+ // Export with selected columns
+ $response = $this->postJson(route('open.forms.submissions.export', [
+ 'form' => $form,
+ 'columns' => [
+ 'name_field' => true,
+ 'email_field' => true,
++=======
+ ]);
+
+ // Create a partial submission (In Progress)
+ $textField = collect($form->properties)->firstWhere('type', 'text');
+ $partialSubmissionData = $this->generateFormSubmissionData($form, [
+ $textField['id'] => 'John Partial',
+ ]);
+ $partialSubmissionData['is_partial'] = true;
+ $partialResponse = $this->postJson(route('forms.answer', $form->slug), $partialSubmissionData);
+ $partialResponse->assertSuccessful();
+
+ // Create a completed submission
+ $emailField = collect($form->properties)->firstWhere('type', 'email');
+ $completedSubmissionData = $this->generateFormSubmissionData($form, [
+ $textField['id'] => 'Jane Complete',
+ $emailField['id'] => '[email protected]'
+ ]);
+ $completedResponse = $this->postJson(route('forms.answer', $form->slug), $completedSubmissionData);
+ $completedResponse->assertSuccessful();
+
+ // Verify counts before export
+ $form->refresh();
+ $total = $form->submissions()->count();
+ $partialCount = $form->submissions()->where('status', \App\Models\Forms\FormSubmission::STATUS_PARTIAL)->count();
+
+ // Export with selected columns (use real field ids)
+ $response = $this->postJson(route('open.forms.submissions.export', [
+ 'form' => $form,
+ 'columns' => [
+ $textField['id'] => true,
+ $emailField['id'] => true,
++>>>>>>> f011505849c7638f8250264957a9b95f1626d0df
]
]));
@@@ -140,19 -135,13 +174,29 @@@
->assertHeader('content-disposition', 'attachment; filename=' . $form->slug . '-submission-data.csv');
// Verify the exported CSV contains status column and correct values
++<<<<<<< HEAD
+ $content = $response->getContent();
+ $lines = explode("\n", $content);
+
+ // Check that CSV has at least 3 lines (header + 2 data rows)
+ expect(count($lines))->toBeGreaterThanOrEqual(3);
+
+ // Check header contains 'status'
+ $headerLine = trim($lines[0]);
+ expect($headerLine)->toContain('status');
+
+ // Check that data rows contain 'In Progress' or 'Completed'
+ $dataContent = implode("\n", array_slice($lines, 1));
+ expect(str_contains($dataContent, 'In Progress') || str_contains($dataContent, 'Completed'))->toBeTrue();
++=======
+ ob_start();
+ $response->sendContent();
+ $content = ob_get_clean();
+
+ expect(str_contains($content, 'status'))->toBeTrue();
+ expect(str_contains($content, 'In Progress'))->toBeTrue();
+ expect(str_contains($content, 'Completed'))->toBeTrue();
++>>>>>>> f011505849c7638f8250264957a9b95f1626d0df
});
it('does not include status column when partial submissions are disabled', function () {
@@@ -160,33 -149,29 +204,57 @@@
$workspace = $this->createUserWorkspace($user);
$form = $this->createForm($user, $workspace, [
'enable_partial_submissions' => false,
++<<<<<<< HEAD
+ 'properties' => [
+ [
+ 'id' => 'name_field',
+ 'name' => 'Name',
+ 'type' => 'text',
+ 'required' => true,
+ ]
+ ]
+ ]);
+
+ // Create a submission
+ $submissionData = $this->generateFormSubmissionData($form, [
+ 'name_field' => 'John Doe',
+ ]);
+ $this->postJson(route('forms.answer', $form->slug), $submissionData);
+
+ // Export with selected columns
+ $response = $this->postJson(route('open.forms.submissions.export', [
+ 'form' => $form,
+ 'columns' => [
+ 'name_field' => true,
++=======
+ ]);
+
+ // Create a submission
+ $textField = collect($form->properties)->firstWhere('type', 'text');
+ $submissionData = $this->generateFormSubmissionData($form, [
+ $textField['id'] => 'John Doe',
+ ]);
+ $this->postJson(route('forms.answer', $form->slug), $submissionData);
+
+ // Export with selected columns (use a real field id)
+ $response = $this->postJson(route('open.forms.submissions.export', [
+ 'form' => $form,
+ 'columns' => [
+ $textField['id'] => true,
++>>>>>>> f011505849c7638f8250264957a9b95f1626d0df
]
]));
$response->assertSuccessful();
// Verify the exported CSV does not contain status column
++<<<<<<< HEAD
+ $content = $response->getContent();
++=======
+ ob_start();
+ $response->sendContent();
+ $content = ob_get_clean();
+
++>>>>>>> f011505849c7638f8250264957a9b95f1626d0df
expect(str_contains($content, 'status'))->toBeFalse();
});
diff --cc client/components/pages/auth/components/QuickRegister.vue
index a4c979eb1,a4c979eb1..30264d3ef
--- a/client/components/pages/auth/components/QuickRegister.vue
+++ b/client/components/pages/auth/components/QuickRegister.vue
@@@ -105,11 -105,11 +105,6 @@@ onMounted(() =>
// Handle social login completion
handleSocialLogin()
})
--
-- // Set up after-login listener for component communication
-- afterLoginMessage.listen(() => {
-- afterQuickLogin()
-- })
})
// Reset the unauthorized error flag when component is unmounted