Fix Laravel Pint formatting
This commit is contained in:
@@ -54,11 +54,11 @@ class ScenarioAFamilyEnrollmentTest extends TestCase
|
||||
|
||||
// Teacher sees student in roster.
|
||||
$this->actingAs($teacher, 'api');
|
||||
$this->getJson('/api/v1/teachers/classes?class_section_id=' . $classSectionId)
|
||||
$this->getJson('/api/v1/teachers/classes?class_section_id='.$classSectionId)
|
||||
->assertOk()
|
||||
->assertJsonPath('ok', true);
|
||||
|
||||
$studentIds = array_column($this->getJson('/api/v1/teachers/classes?class_section_id=' . $classSectionId)->json('students'), 'student_id');
|
||||
$studentIds = array_column($this->getJson('/api/v1/teachers/classes?class_section_id='.$classSectionId)->json('students'), 'student_id');
|
||||
$this->assertContains($studentId, $studentIds);
|
||||
|
||||
// Parent sees own profile.
|
||||
@@ -89,7 +89,7 @@ class ScenarioAFamilyEnrollmentTest extends TestCase
|
||||
]);
|
||||
|
||||
$this->actingAs($parentA, 'api');
|
||||
$this->patchJson('/api/v1/parents/students/' . $studentB, [
|
||||
$this->patchJson('/api/v1/parents/students/'.$studentB, [
|
||||
'firstname' => 'Hacked',
|
||||
'lastname' => 'Child',
|
||||
'dob' => '2015-01-01',
|
||||
|
||||
@@ -27,7 +27,7 @@ class ScenarioBSundaySchoolDayTest extends TestCase
|
||||
|
||||
$this->actingAs($teacher, 'api');
|
||||
|
||||
$form = $this->getJson('/api/v1/attendance/teacher/form?class_section_id=' . $classSectionId)
|
||||
$form = $this->getJson('/api/v1/attendance/teacher/form?class_section_id='.$classSectionId)
|
||||
->assertOk();
|
||||
|
||||
$date = (string) ($form->json('data.current_sunday') ?? '2025-10-05');
|
||||
@@ -52,7 +52,7 @@ class ScenarioBSundaySchoolDayTest extends TestCase
|
||||
|
||||
// Parent views attendance for their child.
|
||||
$this->actingAs($parent, 'api');
|
||||
$this->getJson('/api/v1/parents/attendance?school_year=' . self::E2E_SCHOOL_YEAR)
|
||||
$this->getJson('/api/v1/parents/attendance?school_year='.self::E2E_SCHOOL_YEAR)
|
||||
->assertOk()
|
||||
->assertJsonPath('ok', true);
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ class ScenarioCAcademicTermTest extends TestCase
|
||||
|
||||
$this->actingAs($teacher, 'api');
|
||||
|
||||
$this->getJson('/api/v1/scores/overview?class_section_id=' . $classSectionId . '&semester=' . self::E2E_SEMESTER . '&school_year=' . self::E2E_SCHOOL_YEAR)
|
||||
$this->getJson('/api/v1/scores/overview?class_section_id='.$classSectionId.'&semester='.self::E2E_SEMESTER.'&school_year='.self::E2E_SCHOOL_YEAR)
|
||||
->assertOk()
|
||||
->assertJsonPath('ok', true);
|
||||
|
||||
@@ -69,7 +69,7 @@ class ScenarioCAcademicTermTest extends TestCase
|
||||
'is_locked' => 1,
|
||||
]);
|
||||
|
||||
$this->getJson('/api/v1/reports/report-cards/students/' . $studentId . '?school_year=' . self::E2E_SCHOOL_YEAR . '&semester=' . self::E2E_SEMESTER)
|
||||
$this->getJson('/api/v1/reports/report-cards/students/'.$studentId.'?school_year='.self::E2E_SCHOOL_YEAR.'&semester='.self::E2E_SEMESTER)
|
||||
->assertOk();
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ class ScenarioDFamilyBillingTest extends TestCase
|
||||
->value('id');
|
||||
$this->assertGreaterThan(0, $chargeId);
|
||||
|
||||
$this->postJson('/api/v1/finance/event-charges/' . $chargeId . '/approve')
|
||||
$this->postJson('/api/v1/finance/event-charges/'.$chargeId.'/approve')
|
||||
->assertOk()
|
||||
->assertJsonPath('ok', true);
|
||||
|
||||
@@ -81,7 +81,7 @@ class ScenarioDFamilyBillingTest extends TestCase
|
||||
'invoice_id' => $invoiceId,
|
||||
]);
|
||||
|
||||
$this->getJson('/api/v1/finance/payments/parent/' . $parentId . '?school_year=' . self::E2E_SCHOOL_YEAR)
|
||||
$this->getJson('/api/v1/finance/payments/parent/'.$parentId.'?school_year='.self::E2E_SCHOOL_YEAR)
|
||||
->assertOk()
|
||||
->assertJsonPath('ok', true);
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ class ScenarioEFinanceEdgeTest extends TestCase
|
||||
$parent = $this->createApiUserWithRole('parent');
|
||||
$priorInvoiceId = $this->seedPriorYearUnpaidInvoice($parent->id);
|
||||
|
||||
$preview = $this->getJson('/api/v1/finance/carryforwards/preview?' . http_build_query([
|
||||
$preview = $this->getJson('/api/v1/finance/carryforwards/preview?'.http_build_query([
|
||||
'from_school_year' => self::E2E_PREV_SCHOOL_YEAR,
|
||||
'to_school_year' => self::E2E_SCHOOL_YEAR,
|
||||
'parent_id' => $parent->id,
|
||||
@@ -44,24 +44,24 @@ class ScenarioEFinanceEdgeTest extends TestCase
|
||||
$this->assertNotEmpty($draft->json('result.created'));
|
||||
|
||||
$carryforwardId = (int) $draft->json('result.created.0.id');
|
||||
$this->postJson('/api/v1/finance/carryforwards/' . $carryforwardId . '/approve')
|
||||
$this->postJson('/api/v1/finance/carryforwards/'.$carryforwardId.'/approve')
|
||||
->assertOk()
|
||||
->assertJsonPath('ok', true);
|
||||
|
||||
$posted = $this->postJson('/api/v1/finance/carryforwards/' . $carryforwardId . '/post')
|
||||
$posted = $this->postJson('/api/v1/finance/carryforwards/'.$carryforwardId.'/post')
|
||||
->assertOk()
|
||||
->assertJsonPath('ok', true);
|
||||
$newInvoiceId = (int) ($posted->json('carryforward.posted_invoice_id') ?? 0);
|
||||
$this->assertGreaterThan(0, $newInvoiceId);
|
||||
|
||||
$plan = $this->postJson('/api/v1/finance/invoices/' . $newInvoiceId . '/installment-plans', [
|
||||
$plan = $this->postJson('/api/v1/finance/invoices/'.$newInvoiceId.'/installment-plans', [
|
||||
'number_of_installments' => 2,
|
||||
'first_due_date' => '2025-09-15',
|
||||
'interval_months' => 1,
|
||||
])->assertCreated()->assertJsonPath('ok', true);
|
||||
|
||||
$planId = (int) $plan->json('plan.id');
|
||||
$this->postJson('/api/v1/finance/installment-plans/' . $planId . '/activate')
|
||||
$this->postJson('/api/v1/finance/installment-plans/'.$planId.'/activate')
|
||||
->assertOk()
|
||||
->assertJsonPath('ok', true);
|
||||
|
||||
@@ -81,7 +81,7 @@ class ScenarioEFinanceEdgeTest extends TestCase
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
|
||||
$this->postJson('/api/v1/finance/payments/' . $paymentId . '/allocate-installments', [])
|
||||
$this->postJson('/api/v1/finance/payments/'.$paymentId.'/allocate-installments', [])
|
||||
->assertOk()
|
||||
->assertJsonPath('ok', true);
|
||||
|
||||
@@ -89,20 +89,20 @@ class ScenarioEFinanceEdgeTest extends TestCase
|
||||
->assertOk()
|
||||
->assertJsonPath('ok', true);
|
||||
|
||||
$this->postJson('/api/v1/finance/parent-payment-followups/' . $parent->id . '/note', [
|
||||
$this->postJson('/api/v1/finance/parent-payment-followups/'.$parent->id.'/note', [
|
||||
'invoice_id' => $newInvoiceId,
|
||||
'school_year' => self::E2E_SCHOOL_YEAR,
|
||||
'note' => 'Called parent about prior-year balance.',
|
||||
'contact_method' => 'phone',
|
||||
])->assertCreated()->assertJsonPath('ok', true);
|
||||
|
||||
$this->postJson('/api/v1/finance/parent-payment-followups/' . $parent->id . '/promise-to-pay', [
|
||||
$this->postJson('/api/v1/finance/parent-payment-followups/'.$parent->id.'/promise-to-pay', [
|
||||
'invoice_id' => $newInvoiceId,
|
||||
'promise_to_pay_date' => '2025-10-15',
|
||||
'promise_to_pay_amount' => 50,
|
||||
])->assertCreated()->assertJsonPath('ok', true);
|
||||
|
||||
$this->postJson('/api/v1/finance/parent-payment-followups/' . $parent->id . '/resolve', [
|
||||
$this->postJson('/api/v1/finance/parent-payment-followups/'.$parent->id.'/resolve', [
|
||||
'invoice_id' => $newInvoiceId,
|
||||
'note' => 'Balance plan agreed.',
|
||||
])->assertCreated()->assertJsonPath('ok', true);
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
namespace Tests\Feature\Api\V1\Workflows;
|
||||
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Tests\Concerns\SeedsE2ETestFixtures;
|
||||
use Tests\TestCase;
|
||||
|
||||
@@ -36,7 +36,7 @@ class ScenarioGPrintBadgeTest extends TestCase
|
||||
|
||||
$this->actingAs($admin, 'api');
|
||||
foreach (['assigned', 'done', 'delivered'] as $status) {
|
||||
$this->patchJson('/api/v1/print-requests/' . $requestId . '/status', [
|
||||
$this->patchJson('/api/v1/print-requests/'.$requestId.'/status', [
|
||||
'status' => $status,
|
||||
])->assertOk();
|
||||
}
|
||||
@@ -46,7 +46,7 @@ class ScenarioGPrintBadgeTest extends TestCase
|
||||
'status' => 'delivered',
|
||||
]);
|
||||
|
||||
$badgeTag = 'E2E-BADGE-' . random_int(10000, 99999);
|
||||
$badgeTag = 'E2E-BADGE-'.random_int(10000, 99999);
|
||||
DB::table('users')->where('id', $teacher->id)->update(['rfid_tag' => $badgeTag]);
|
||||
|
||||
$this->postJson('/api/v1/badges/log-print', [
|
||||
|
||||
@@ -29,7 +29,7 @@ class ScenarioHSecurityUnauthorizedAccessTest extends TestCase
|
||||
|
||||
// Parent cannot update another family's student.
|
||||
$this->actingAs($parentA, 'api');
|
||||
$this->patchJson('/api/v1/parents/students/' . $world['student_id'], [
|
||||
$this->patchJson('/api/v1/parents/students/'.$world['student_id'], [
|
||||
'firstname' => 'Blocked',
|
||||
'lastname' => 'Update',
|
||||
'dob' => '2014-01-01',
|
||||
|
||||
@@ -87,13 +87,13 @@ class ScenarioIPublicAuthAndSystemUseCaseTest extends TestCase
|
||||
$token = (string) $login->json('token');
|
||||
$this->assertNotSame('', $token);
|
||||
|
||||
$this->withHeader('Authorization', 'Bearer ' . $token)
|
||||
$this->withHeader('Authorization', 'Bearer '.$token)
|
||||
->getJson('/api/v1/auth/me')
|
||||
->assertOk()
|
||||
->assertJsonPath('status', true)
|
||||
->assertJsonPath('data.email', 'e2e.auth.teacher@example.test');
|
||||
|
||||
$this->withHeader('Authorization', 'Bearer ' . $token)
|
||||
$this->withHeader('Authorization', 'Bearer '.$token)
|
||||
->postJson('/api/v1/auth/logout')
|
||||
->assertOk()
|
||||
->assertJsonPath('status', true);
|
||||
|
||||
@@ -31,14 +31,14 @@ class ScenarioJCrossModuleApiUseCaseSmokeTest extends TestCase
|
||||
'/api/v1/administrator/dashboard/user-search?query=Kai',
|
||||
'/api/v1/users',
|
||||
'/api/v1/students',
|
||||
'/api/v1/students/' . $world['student_id'],
|
||||
'/api/v1/students/' . $world['student_id'] . '/classes',
|
||||
'/api/v1/students/'.$world['student_id'],
|
||||
'/api/v1/students/'.$world['student_id'].'/classes',
|
||||
'/api/v1/class-sections',
|
||||
'/api/v1/teachers/classes?class_section_id=' . $world['class_section_id'],
|
||||
'/api/v1/teachers/classes?class_section_id='.$world['class_section_id'],
|
||||
'/api/v1/attendance/admin/daily?date=2025-10-05',
|
||||
'/api/v1/attendance-comment-templates',
|
||||
'/api/v1/finance/invoices/parent/' . $world['parent_id'],
|
||||
'/api/v1/finance/invoices/' . $invoiceId . '/preview',
|
||||
'/api/v1/finance/invoices/parent/'.$world['parent_id'],
|
||||
'/api/v1/finance/invoices/'.$invoiceId.'/preview',
|
||||
'/api/v1/finance/paypal-transactions',
|
||||
'/api/v1/inventory/items',
|
||||
'/api/v1/inventory/categories',
|
||||
|
||||
@@ -85,15 +85,15 @@ class ScenarioKParentSelfServiceAndPrivacyTest extends TestCase
|
||||
->assertOk()
|
||||
->assertJsonPath('ok', true);
|
||||
|
||||
$this->getJson('/api/v1/parents/attendance?school_year=' . self::E2E_SCHOOL_YEAR)
|
||||
$this->getJson('/api/v1/parents/attendance?school_year='.self::E2E_SCHOOL_YEAR)
|
||||
->assertOk()
|
||||
->assertJsonPath('ok', true);
|
||||
|
||||
$this->getJson('/api/v1/parents/invoices?school_year=' . self::E2E_SCHOOL_YEAR)
|
||||
$this->getJson('/api/v1/parents/invoices?school_year='.self::E2E_SCHOOL_YEAR)
|
||||
->assertOk()
|
||||
->assertJsonPath('ok', true);
|
||||
|
||||
$this->getJson('/api/v1/parents/enrollments?school_year=' . self::E2E_SCHOOL_YEAR)
|
||||
$this->getJson('/api/v1/parents/enrollments?school_year='.self::E2E_SCHOOL_YEAR)
|
||||
->assertOk()
|
||||
->assertJsonPath('ok', true);
|
||||
}
|
||||
@@ -123,14 +123,14 @@ class ScenarioKParentSelfServiceAndPrivacyTest extends TestCase
|
||||
|
||||
$this->actingAs($parentA, 'api');
|
||||
|
||||
$this->patchJson('/api/v1/parents/students/' . $studentB, [
|
||||
$this->patchJson('/api/v1/parents/students/'.$studentB, [
|
||||
'firstname' => 'Tampered',
|
||||
'lastname' => 'Student',
|
||||
'dob' => '2015-01-01',
|
||||
'gender' => 'Male',
|
||||
])->assertNotFound();
|
||||
|
||||
$this->patchJson('/api/v1/parents/emergency-contacts/' . $foreignContactId, [
|
||||
$this->patchJson('/api/v1/parents/emergency-contacts/'.$foreignContactId, [
|
||||
'name' => 'Tampered Contact',
|
||||
'cellphone' => '5553334444',
|
||||
'email' => 'foreign.contact@example.test',
|
||||
|
||||
@@ -28,11 +28,11 @@ class ScenarioLTeacherAcademicOperationsTest extends TestCase
|
||||
|
||||
$this->actingAs($teacher, 'api');
|
||||
|
||||
$this->getJson('/api/v1/teachers/classes?class_section_id=' . $classSectionId)
|
||||
$this->getJson('/api/v1/teachers/classes?class_section_id='.$classSectionId)
|
||||
->assertOk()
|
||||
->assertJsonPath('ok', true);
|
||||
|
||||
$this->getJson('/api/v1/class-progress/meta?class_id=3&school_year=' . self::E2E_SCHOOL_YEAR . '&semester=' . self::E2E_SEMESTER)
|
||||
$this->getJson('/api/v1/class-progress/meta?class_id=3&school_year='.self::E2E_SCHOOL_YEAR.'&semester='.self::E2E_SEMESTER)
|
||||
->assertOk()
|
||||
->assertJsonPath('status', true);
|
||||
|
||||
@@ -54,7 +54,7 @@ class ScenarioLTeacherAcademicOperationsTest extends TestCase
|
||||
->value('id');
|
||||
$this->assertGreaterThan(0, $reportId);
|
||||
|
||||
$this->patchJson('/api/v1/class-progress/' . $reportId, [
|
||||
$this->patchJson('/api/v1/class-progress/'.$reportId, [
|
||||
'status' => 'ahead',
|
||||
])->assertOk()->assertJsonPath('status', true);
|
||||
|
||||
@@ -84,11 +84,11 @@ class ScenarioLTeacherAcademicOperationsTest extends TestCase
|
||||
'school_year' => self::E2E_SCHOOL_YEAR,
|
||||
]);
|
||||
|
||||
$this->getJson('/api/v1/scores/homework?class_section_id=' . $classSectionId . '&semester=' . self::E2E_SEMESTER . '&school_year=' . self::E2E_SCHOOL_YEAR)
|
||||
$this->getJson('/api/v1/scores/homework?class_section_id='.$classSectionId.'&semester='.self::E2E_SEMESTER.'&school_year='.self::E2E_SCHOOL_YEAR)
|
||||
->assertOk()
|
||||
->assertJsonPath('ok', true);
|
||||
|
||||
$this->getJson('/api/v1/reports/report-cards/completeness?class_section_id=' . $classSectionId . '&semester=' . self::E2E_SEMESTER . '&school_year=' . self::E2E_SCHOOL_YEAR)
|
||||
$this->getJson('/api/v1/reports/report-cards/completeness?class_section_id='.$classSectionId.'&semester='.self::E2E_SEMESTER.'&school_year='.self::E2E_SCHOOL_YEAR)
|
||||
->assertOk()
|
||||
->assertJsonPath('status', true);
|
||||
}
|
||||
@@ -115,10 +115,10 @@ class ScenarioLTeacherAcademicOperationsTest extends TestCase
|
||||
|
||||
$this->actingAs($otherTeacher, 'api');
|
||||
|
||||
$this->getJson('/api/v1/class-progress/' . $reportId)
|
||||
$this->getJson('/api/v1/class-progress/'.$reportId)
|
||||
->assertForbidden();
|
||||
|
||||
$this->patchJson('/api/v1/class-progress/' . $reportId, [
|
||||
$this->patchJson('/api/v1/class-progress/'.$reportId, [
|
||||
'status' => 'behind',
|
||||
])->assertForbidden();
|
||||
|
||||
|
||||
+1
-1
@@ -80,7 +80,7 @@ class ScenarioMAdministratorEnrollmentAndClassOperationsTest extends TestCase
|
||||
'school_year' => self::E2E_SCHOOL_YEAR,
|
||||
]);
|
||||
|
||||
$this->getJson('/api/v1/students/' . $studentId . '/classes')
|
||||
$this->getJson('/api/v1/students/'.$studentId.'/classes')
|
||||
->assertOk()
|
||||
->assertJsonPath('ok', true);
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ class ScenarioNCommunicationsAndSupportLifecycleTest extends TestCase
|
||||
->assertOk()
|
||||
->assertJsonPath('ok', true);
|
||||
|
||||
$this->getJson('/api/v1/messages/' . $messageId)
|
||||
$this->getJson('/api/v1/messages/'.$messageId)
|
||||
->assertOk()
|
||||
->assertJsonPath('ok', true);
|
||||
|
||||
@@ -54,7 +54,7 @@ class ScenarioNCommunicationsAndSupportLifecycleTest extends TestCase
|
||||
'read_status' => 1,
|
||||
]);
|
||||
|
||||
$this->patchJson('/api/v1/messages/' . $messageId, [
|
||||
$this->patchJson('/api/v1/messages/'.$messageId, [
|
||||
'status' => 'archived',
|
||||
])->assertOk()->assertJsonPath('ok', true);
|
||||
|
||||
|
||||
@@ -47,13 +47,13 @@ class ScenarioOInventoryFinanceAndAuditControlsTest extends TestCase
|
||||
->value('id');
|
||||
$this->assertGreaterThan(0, $itemId);
|
||||
|
||||
$this->postJson('/api/v1/inventory/items/' . $itemId . '/adjust', [
|
||||
$this->postJson('/api/v1/inventory/items/'.$itemId.'/adjust', [
|
||||
'mode' => 'out',
|
||||
'quantity' => 2,
|
||||
'reason' => 'Issued to teacher cart',
|
||||
])->assertOk()->assertJsonPath('status', true);
|
||||
|
||||
$this->postJson('/api/v1/inventory/items/' . $itemId . '/audit', [
|
||||
$this->postJson('/api/v1/inventory/items/'.$itemId.'/audit', [
|
||||
'needs_repair_qty' => 1,
|
||||
'need_replace_qty' => 0,
|
||||
'cannot_find_qty' => 0,
|
||||
@@ -90,24 +90,24 @@ class ScenarioOInventoryFinanceAndAuditControlsTest extends TestCase
|
||||
->assertOk()
|
||||
->assertJsonPath('ok', true);
|
||||
|
||||
$this->postJson('/api/v1/finance/parent-payment-followups/' . $parentId . '/note', [
|
||||
$this->postJson('/api/v1/finance/parent-payment-followups/'.$parentId.'/note', [
|
||||
'note' => 'Left voicemail about remaining balance.',
|
||||
'invoice_id' => $invoiceId,
|
||||
])->assertSuccessful();
|
||||
|
||||
$this->postJson('/api/v1/finance/parent-payment-followups/' . $parentId . '/promise-to-pay', [
|
||||
$this->postJson('/api/v1/finance/parent-payment-followups/'.$parentId.'/promise-to-pay', [
|
||||
'invoice_id' => $invoiceId,
|
||||
'amount' => 300.00,
|
||||
'promise_date' => '2025-10-20',
|
||||
'note' => 'Parent promised to pay next Sunday.',
|
||||
])->assertSuccessful();
|
||||
|
||||
$this->postJson('/api/v1/finance/parent-payment-followups/' . $parentId . '/mark-contacted', [
|
||||
$this->postJson('/api/v1/finance/parent-payment-followups/'.$parentId.'/mark-contacted', [
|
||||
'invoice_id' => $invoiceId,
|
||||
'contacted_at' => '2025-10-06 12:00:00',
|
||||
])->assertSuccessful();
|
||||
|
||||
$this->postJson('/api/v1/finance/parent-payment-followups/' . $parentId . '/resolve', [
|
||||
$this->postJson('/api/v1/finance/parent-payment-followups/'.$parentId.'/resolve', [
|
||||
'invoice_id' => $invoiceId,
|
||||
'resolution_note' => 'Resolved after payment arrangement.',
|
||||
])->assertSuccessful();
|
||||
|
||||
+9
-9
@@ -16,9 +16,9 @@ use Tests\TestCase;
|
||||
*/
|
||||
class ScenarioPSettingsConfigurationAndCalendarGovernanceTest extends TestCase
|
||||
{
|
||||
use AssertsE2EApiResponses;
|
||||
use RefreshDatabase;
|
||||
use SeedsE2ETestFixtures;
|
||||
use AssertsE2EApiResponses;
|
||||
|
||||
public function test_admin_manages_calendar_event_configuration_and_notification_lifecycle(): void
|
||||
{
|
||||
@@ -56,11 +56,11 @@ class ScenarioPSettingsConfigurationAndCalendarGovernanceTest extends TestCase
|
||||
->value('id');
|
||||
$this->assertGreaterThan(0, $eventId);
|
||||
|
||||
$this->getJson('/api/v1/settings/school-calendar/events?school_year=' . self::E2E_SCHOOL_YEAR . '&include_meetings=1')
|
||||
$this->getJson('/api/v1/settings/school-calendar/events?school_year='.self::E2E_SCHOOL_YEAR.'&include_meetings=1')
|
||||
->assertOk()
|
||||
->assertJsonPath('status', true);
|
||||
|
||||
$this->patchJson('/api/v1/settings/school-calendar/events/' . $eventId, [
|
||||
$this->patchJson('/api/v1/settings/school-calendar/events/'.$eventId, [
|
||||
'title' => 'E2E Parent Orientation Updated',
|
||||
'date' => '2025-10-19',
|
||||
'description' => 'Updated orientation for new families.',
|
||||
@@ -88,17 +88,17 @@ class ScenarioPSettingsConfigurationAndCalendarGovernanceTest extends TestCase
|
||||
$this->getJson('/api/v1/notifications/active')
|
||||
->assertOk();
|
||||
|
||||
$this->postJson('/api/v1/notifications/' . $notificationId . '/read')
|
||||
$this->postJson('/api/v1/notifications/'.$notificationId.'/read')
|
||||
->assertSuccessful();
|
||||
|
||||
$this->deleteJson('/api/v1/notifications/' . $notificationId)
|
||||
$this->deleteJson('/api/v1/notifications/'.$notificationId)
|
||||
->assertSuccessful();
|
||||
|
||||
$this->postJson('/api/v1/notifications/' . $notificationId . '/restore')
|
||||
$this->postJson('/api/v1/notifications/'.$notificationId.'/restore')
|
||||
->assertSuccessful();
|
||||
}
|
||||
|
||||
$this->deleteJson('/api/v1/settings/school-calendar/events/' . $eventId)
|
||||
$this->deleteJson('/api/v1/settings/school-calendar/events/'.$eventId)
|
||||
->assertOk()
|
||||
->assertJsonPath('status', true);
|
||||
}
|
||||
@@ -127,12 +127,12 @@ class ScenarioPSettingsConfigurationAndCalendarGovernanceTest extends TestCase
|
||||
->assertSuccessful();
|
||||
|
||||
if ($configId > 0) {
|
||||
$this->patchJson('/api/v1/configuration-admin/' . $configId, [
|
||||
$this->patchJson('/api/v1/configuration-admin/'.$configId, [
|
||||
'config_value' => 'E2E guardrail updated',
|
||||
'description' => 'Updated by explicit workflow coverage.',
|
||||
])->assertSuccessful();
|
||||
|
||||
$this->deleteJson('/api/v1/configuration-admin/' . $configId)
|
||||
$this->deleteJson('/api/v1/configuration-admin/'.$configId)
|
||||
->assertSuccessful();
|
||||
}
|
||||
}
|
||||
|
||||
+11
-11
@@ -16,9 +16,9 @@ use Tests\TestCase;
|
||||
*/
|
||||
class ScenarioQSchoolYearPromotionClosureLifecycleTest extends TestCase
|
||||
{
|
||||
use AssertsE2EApiResponses;
|
||||
use RefreshDatabase;
|
||||
use SeedsE2ETestFixtures;
|
||||
use AssertsE2EApiResponses;
|
||||
|
||||
public function test_admin_and_parent_work_through_promotion_before_year_close(): void
|
||||
{
|
||||
@@ -56,7 +56,7 @@ class ScenarioQSchoolYearPromotionClosureLifecycleTest extends TestCase
|
||||
->value('id');
|
||||
|
||||
if ($promotionId > 0) {
|
||||
$this->patchJson('/api/v1/administrator/promotions/' . $promotionId . '/status', [
|
||||
$this->patchJson('/api/v1/administrator/promotions/'.$promotionId.'/status', [
|
||||
'status' => 'parent_action_required',
|
||||
'decision' => 'promote',
|
||||
'notes' => 'Ready for next level.',
|
||||
@@ -65,14 +65,14 @@ class ScenarioQSchoolYearPromotionClosureLifecycleTest extends TestCase
|
||||
$this->actingAs($parent, 'api');
|
||||
$this->getJson('/api/v1/parents/promotions')
|
||||
->assertOk();
|
||||
$this->postJson('/api/v1/parents/promotions/' . $promotionId . '/start')
|
||||
$this->postJson('/api/v1/parents/promotions/'.$promotionId.'/start')
|
||||
->assertSuccessful();
|
||||
$this->patchJson('/api/v1/parents/promotions/' . $promotionId . '/steps', [
|
||||
$this->patchJson('/api/v1/parents/promotions/'.$promotionId.'/steps', [
|
||||
'confirm_returning' => true,
|
||||
'confirm_contact_info' => true,
|
||||
'confirm_policy' => true,
|
||||
])->assertSuccessful();
|
||||
$this->postJson('/api/v1/parents/promotions/' . $promotionId . '/submit')
|
||||
$this->postJson('/api/v1/parents/promotions/'.$promotionId.'/submit')
|
||||
->assertSuccessful();
|
||||
}
|
||||
}
|
||||
@@ -84,7 +84,7 @@ class ScenarioQSchoolYearPromotionClosureLifecycleTest extends TestCase
|
||||
$parentId = $world['parent_id'];
|
||||
$studentId = $world['student_id'];
|
||||
$this->seedInvoiceForParent($parentId, [
|
||||
'invoice_number' => 'INV-CLOSE-' . random_int(1000, 9999),
|
||||
'invoice_number' => 'INV-CLOSE-'.random_int(1000, 9999),
|
||||
'balance' => 125.00,
|
||||
'paid_amount' => 375.00,
|
||||
'total_amount' => 500.00,
|
||||
@@ -110,7 +110,7 @@ class ScenarioQSchoolYearPromotionClosureLifecycleTest extends TestCase
|
||||
|
||||
$this->actingAs($admin, 'api');
|
||||
|
||||
$this->postJson('/api/v1/school-years/' . $activeYearId . '/validate-close', [
|
||||
$this->postJson('/api/v1/school-years/'.$activeYearId.'/validate-close', [
|
||||
'new_school_year' => [
|
||||
'name' => '2026-2027',
|
||||
'start_date' => '2026-09-01',
|
||||
@@ -119,7 +119,7 @@ class ScenarioQSchoolYearPromotionClosureLifecycleTest extends TestCase
|
||||
'transfer_unpaid_balances' => true,
|
||||
])->assertSuccessful();
|
||||
|
||||
$this->postJson('/api/v1/school-years/' . $activeYearId . '/preview-close', [
|
||||
$this->postJson('/api/v1/school-years/'.$activeYearId.'/preview-close', [
|
||||
'new_school_year' => [
|
||||
'name' => '2026-2027',
|
||||
'start_date' => '2026-09-01',
|
||||
@@ -128,14 +128,14 @@ class ScenarioQSchoolYearPromotionClosureLifecycleTest extends TestCase
|
||||
'transfer_unpaid_balances' => true,
|
||||
])->assertSuccessful();
|
||||
|
||||
$close = $this->postJson('/api/v1/school-years/' . $activeYearId . '/close', [
|
||||
$close = $this->postJson('/api/v1/school-years/'.$activeYearId.'/close', [
|
||||
'new_school_year' => [
|
||||
'name' => '2026-2027',
|
||||
'start_date' => '2026-09-01',
|
||||
'end_date' => '2027-06-30',
|
||||
],
|
||||
'transfer_unpaid_balances' => true,
|
||||
'confirmation' => 'CLOSE ' . self::E2E_SCHOOL_YEAR,
|
||||
'confirmation' => 'CLOSE '.self::E2E_SCHOOL_YEAR,
|
||||
]);
|
||||
$this->assertNoServerError($close, 'School year close');
|
||||
|
||||
@@ -144,7 +144,7 @@ class ScenarioQSchoolYearPromotionClosureLifecycleTest extends TestCase
|
||||
->value('id');
|
||||
|
||||
if ($newYearId > 0) {
|
||||
$this->postJson('/api/v1/school-years/' . $newYearId . '/reopen')
|
||||
$this->postJson('/api/v1/school-years/'.$newYearId.'/reopen')
|
||||
->assertSuccessful();
|
||||
}
|
||||
}
|
||||
|
||||
+8
-8
@@ -17,9 +17,9 @@ use Tests\TestCase;
|
||||
*/
|
||||
class ScenarioRAttendanceOperationsAndExceptionHandlingTest extends TestCase
|
||||
{
|
||||
use AssertsE2EApiResponses;
|
||||
use RefreshDatabase;
|
||||
use SeedsE2ETestFixtures;
|
||||
use AssertsE2EApiResponses;
|
||||
|
||||
public function test_teacher_admin_and_staff_handle_attendance_day_end_to_end(): void
|
||||
{
|
||||
@@ -30,9 +30,9 @@ class ScenarioRAttendanceOperationsAndExceptionHandlingTest extends TestCase
|
||||
$classSectionId = $world['class_section_id'];
|
||||
|
||||
$this->actingAs($teacher, 'api');
|
||||
$this->getJson('/api/v1/attendance/teacher/grid?class_section_id=' . $classSectionId . '&date=2025-10-05')
|
||||
$this->getJson('/api/v1/attendance/teacher/grid?class_section_id='.$classSectionId.'&date=2025-10-05')
|
||||
->assertSuccessful();
|
||||
$this->getJson('/api/v1/attendance/teacher/form?class_section_id=' . $classSectionId . '&date=2025-10-05')
|
||||
$this->getJson('/api/v1/attendance/teacher/form?class_section_id='.$classSectionId.'&date=2025-10-05')
|
||||
->assertSuccessful();
|
||||
|
||||
$submit = $this->postJson('/api/v1/attendance/teacher/submit', [
|
||||
@@ -51,7 +51,7 @@ class ScenarioRAttendanceOperationsAndExceptionHandlingTest extends TestCase
|
||||
$this->assertNoServerError($submit, 'Teacher attendance submit');
|
||||
|
||||
$this->actingAs($admin, 'api');
|
||||
$this->getJson('/api/v1/attendance/admin/daily?date=2025-10-05&class_section_id=' . $classSectionId)
|
||||
$this->getJson('/api/v1/attendance/admin/daily?date=2025-10-05&class_section_id='.$classSectionId)
|
||||
->assertSuccessful();
|
||||
|
||||
$manualAdd = $this->postJson('/api/v1/attendance/admin/add-entry', [
|
||||
@@ -124,9 +124,9 @@ class ScenarioRAttendanceOperationsAndExceptionHandlingTest extends TestCase
|
||||
|
||||
$this->getJson('/api/v1/attendance-tracking/pending-violations')
|
||||
->assertSuccessful();
|
||||
$this->getJson('/api/v1/attendance-tracking/student-case/' . $studentId)
|
||||
$this->getJson('/api/v1/attendance-tracking/student-case/'.$studentId)
|
||||
->assertSuccessful();
|
||||
$this->getJson('/api/v1/attendance-tracking/compose?student_id=' . $studentId)
|
||||
$this->getJson('/api/v1/attendance-tracking/compose?student_id='.$studentId)
|
||||
->assertSuccessful();
|
||||
|
||||
$note = $this->postJson('/api/v1/attendance-tracking/save-notification-note', [
|
||||
@@ -157,7 +157,7 @@ class ScenarioRAttendanceOperationsAndExceptionHandlingTest extends TestCase
|
||||
|
||||
$this->getJson('/api/v1/attendance-comment-templates/list-data')
|
||||
->assertOk();
|
||||
$this->putJson('/api/v1/attendance-comment-templates/' . $templateId, [
|
||||
$this->putJson('/api/v1/attendance-comment-templates/'.$templateId, [
|
||||
'comment' => 'E2E: arrived late, parent notified.',
|
||||
'type' => 'late',
|
||||
'is_active' => true,
|
||||
@@ -169,7 +169,7 @@ class ScenarioRAttendanceOperationsAndExceptionHandlingTest extends TestCase
|
||||
'type' => 'late',
|
||||
])->assertSuccessful();
|
||||
|
||||
$this->deleteJson('/api/v1/attendance-comment-templates/' . $templateId)
|
||||
$this->deleteJson('/api/v1/attendance-comment-templates/'.$templateId)
|
||||
->assertSuccessful();
|
||||
}
|
||||
}
|
||||
|
||||
+13
-14
@@ -3,7 +3,6 @@
|
||||
namespace Tests\Feature\Api\V1\Workflows;
|
||||
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Tests\Concerns\AssertsE2EApiResponses;
|
||||
use Tests\Concerns\SeedsE2ETestFixtures;
|
||||
use Tests\TestCase;
|
||||
@@ -16,9 +15,9 @@ use Tests\TestCase;
|
||||
*/
|
||||
class ScenarioSScoringGradingAndReportCardLifecycleTest extends TestCase
|
||||
{
|
||||
use AssertsE2EApiResponses;
|
||||
use RefreshDatabase;
|
||||
use SeedsE2ETestFixtures;
|
||||
use AssertsE2EApiResponses;
|
||||
|
||||
public function test_teacher_records_every_score_type_and_admin_reviews_grading_outputs(): void
|
||||
{
|
||||
@@ -31,14 +30,14 @@ class ScenarioSScoringGradingAndReportCardLifecycleTest extends TestCase
|
||||
$this->actingAs($teacher, 'api');
|
||||
|
||||
foreach (['homework', 'quizzes', 'projects'] as $type) {
|
||||
$column = $this->postJson('/api/v1/scores/' . $type . '/columns', [
|
||||
$column = $this->postJson('/api/v1/scores/'.$type.'/columns', [
|
||||
'class_section_id' => $classSectionId,
|
||||
'semester' => self::E2E_SEMESTER,
|
||||
'school_year' => self::E2E_SCHOOL_YEAR,
|
||||
]);
|
||||
$this->assertNoServerError($column, ucfirst($type) . ' score column creation');
|
||||
$this->assertNoServerError($column, ucfirst($type).' score column creation');
|
||||
|
||||
$save = $this->postJson('/api/v1/scores/' . $type, [
|
||||
$save = $this->postJson('/api/v1/scores/'.$type, [
|
||||
'class_section_id' => $classSectionId,
|
||||
'semester' => self::E2E_SEMESTER,
|
||||
'school_year' => self::E2E_SCHOOL_YEAR,
|
||||
@@ -47,11 +46,11 @@ class ScenarioSScoringGradingAndReportCardLifecycleTest extends TestCase
|
||||
],
|
||||
'missing_ok' => [],
|
||||
]);
|
||||
$this->assertNoServerError($save, ucfirst($type) . ' score save');
|
||||
$this->assertNoServerError($save, ucfirst($type).' score save');
|
||||
}
|
||||
|
||||
foreach (['midterm', 'final', 'participation'] as $type) {
|
||||
$save = $this->postJson('/api/v1/scores/' . $type, [
|
||||
$save = $this->postJson('/api/v1/scores/'.$type, [
|
||||
'class_section_id' => $classSectionId,
|
||||
'semester' => self::E2E_SEMESTER,
|
||||
'school_year' => self::E2E_SCHOOL_YEAR,
|
||||
@@ -59,7 +58,7 @@ class ScenarioSScoringGradingAndReportCardLifecycleTest extends TestCase
|
||||
(string) $studentId => 88,
|
||||
],
|
||||
]);
|
||||
$this->assertNoServerError($save, ucfirst($type) . ' score save');
|
||||
$this->assertNoServerError($save, ucfirst($type).' score save');
|
||||
}
|
||||
|
||||
$this->postJson('/api/v1/scores/comments', [
|
||||
@@ -70,22 +69,22 @@ class ScenarioSScoringGradingAndReportCardLifecycleTest extends TestCase
|
||||
'comment' => 'Consistent progress across the semester.',
|
||||
])->assertSuccessful();
|
||||
|
||||
$this->getJson('/api/v1/scores/overview?class_section_id=' . $classSectionId . '&school_year=' . self::E2E_SCHOOL_YEAR)
|
||||
$this->getJson('/api/v1/scores/overview?class_section_id='.$classSectionId.'&school_year='.self::E2E_SCHOOL_YEAR)
|
||||
->assertSuccessful();
|
||||
$this->getJson('/api/v1/scores/student-scores?student_id=' . $studentId . '&class_section_id=' . $classSectionId)
|
||||
$this->getJson('/api/v1/scores/student-scores?student_id='.$studentId.'&class_section_id='.$classSectionId)
|
||||
->assertSuccessful();
|
||||
|
||||
$this->actingAs($admin, 'api');
|
||||
$this->getJson('/api/v1/grading/overview?class_section_id=' . $classSectionId)
|
||||
$this->getJson('/api/v1/grading/overview?class_section_id='.$classSectionId)
|
||||
->assertSuccessful();
|
||||
$this->postJson('/api/v1/grading/decisions/generate', [
|
||||
'class_section_id' => $classSectionId,
|
||||
'school_year' => self::E2E_SCHOOL_YEAR,
|
||||
'semester' => self::E2E_SEMESTER,
|
||||
])->assertSuccessful();
|
||||
$this->getJson('/api/v1/grading/decisions?class_section_id=' . $classSectionId)
|
||||
$this->getJson('/api/v1/grading/decisions?class_section_id='.$classSectionId)
|
||||
->assertSuccessful();
|
||||
$this->getJson('/api/v1/reports/report-cards/completeness?class_section_id=' . $classSectionId . '&school_year=' . self::E2E_SCHOOL_YEAR . '&semester=' . self::E2E_SEMESTER)
|
||||
$this->getJson('/api/v1/reports/report-cards/completeness?class_section_id='.$classSectionId.'&school_year='.self::E2E_SCHOOL_YEAR.'&semester='.self::E2E_SEMESTER)
|
||||
->assertSuccessful();
|
||||
}
|
||||
|
||||
@@ -112,7 +111,7 @@ class ScenarioSScoringGradingAndReportCardLifecycleTest extends TestCase
|
||||
'locked' => false,
|
||||
])->assertSuccessful();
|
||||
|
||||
$this->getJson('/api/v1/grading/below-sixty?school_year=' . self::E2E_SCHOOL_YEAR)
|
||||
$this->getJson('/api/v1/grading/below-sixty?school_year='.self::E2E_SCHOOL_YEAR)
|
||||
->assertSuccessful();
|
||||
$this->postJson('/api/v1/grading/below-sixty/decisions', [
|
||||
'student_id' => $studentId,
|
||||
|
||||
+6
-6
@@ -18,9 +18,9 @@ use Tests\TestCase;
|
||||
*/
|
||||
class ScenarioTDocumentsPrintBadgesAndCertificatesLifecycleTest extends TestCase
|
||||
{
|
||||
use AssertsE2EApiResponses;
|
||||
use RefreshDatabase;
|
||||
use SeedsE2ETestFixtures;
|
||||
use AssertsE2EApiResponses;
|
||||
|
||||
public function test_teacher_print_request_moves_from_upload_to_admin_status_and_file_access(): void
|
||||
{
|
||||
@@ -50,17 +50,17 @@ class ScenarioTDocumentsPrintBadgesAndCertificatesLifecycleTest extends TestCase
|
||||
->value('id');
|
||||
|
||||
if ($requestId > 0) {
|
||||
$this->get('/api/v1/print-requests/' . $requestId . '/file')
|
||||
$this->get('/api/v1/print-requests/'.$requestId.'/file')
|
||||
->assertSuccessful();
|
||||
|
||||
$this->actingAs($admin, 'api');
|
||||
$this->getJson('/api/v1/print-requests/admin')
|
||||
->assertSuccessful();
|
||||
$this->patchJson('/api/v1/print-requests/' . $requestId . '/status', [
|
||||
$this->patchJson('/api/v1/print-requests/'.$requestId.'/status', [
|
||||
'status' => 'processing',
|
||||
'admin_notes' => 'Queued for printing.',
|
||||
])->assertSuccessful();
|
||||
$this->get('/api/v1/print-requests/' . $requestId . '/file')
|
||||
$this->get('/api/v1/print-requests/'.$requestId.'/file')
|
||||
->assertSuccessful();
|
||||
}
|
||||
}
|
||||
@@ -75,7 +75,7 @@ class ScenarioTDocumentsPrintBadgesAndCertificatesLifecycleTest extends TestCase
|
||||
|
||||
$this->getJson('/api/v1/badges/form-data')
|
||||
->assertSuccessful();
|
||||
$this->getJson('/api/v1/badges/print-status?student_ids[]=' . $studentId)
|
||||
$this->getJson('/api/v1/badges/print-status?student_ids[]='.$studentId)
|
||||
->assertSuccessful();
|
||||
|
||||
$badge = $this->postJson('/api/v1/badges/pdf', [
|
||||
@@ -93,7 +93,7 @@ class ScenarioTDocumentsPrintBadgesAndCertificatesLifecycleTest extends TestCase
|
||||
|
||||
$this->getJson('/api/v1/reports/stickers/form-data')
|
||||
->assertSuccessful();
|
||||
$this->getJson('/api/v1/reports/stickers/students?class_section_id=' . $classSectionId)
|
||||
$this->getJson('/api/v1/reports/stickers/students?class_section_id='.$classSectionId)
|
||||
->assertSuccessful();
|
||||
$sticker = $this->postJson('/api/v1/reports/stickers/print', [
|
||||
'student_ids' => [$studentId],
|
||||
|
||||
+15
-15
@@ -16,9 +16,9 @@ use Tests\TestCase;
|
||||
*/
|
||||
class ScenarioUFinanceBillingPaymentRefundAndInstallmentLifecycleTest extends TestCase
|
||||
{
|
||||
use AssertsE2EApiResponses;
|
||||
use RefreshDatabase;
|
||||
use SeedsE2ETestFixtures;
|
||||
use AssertsE2EApiResponses;
|
||||
|
||||
public function test_admin_generates_invoice_records_payment_transaction_and_receipt_notification(): void
|
||||
{
|
||||
@@ -27,7 +27,7 @@ class ScenarioUFinanceBillingPaymentRefundAndInstallmentLifecycleTest extends Te
|
||||
$parentId = $world['parent_id'];
|
||||
$studentId = $world['student_id'];
|
||||
$invoiceId = $this->seedInvoiceForParent($parentId, [
|
||||
'invoice_number' => 'INV-E2E-PAY-' . random_int(1000, 9999),
|
||||
'invoice_number' => 'INV-E2E-PAY-'.random_int(1000, 9999),
|
||||
'total_amount' => 600.00,
|
||||
'balance' => 600.00,
|
||||
'status' => 'unpaid',
|
||||
@@ -36,9 +36,9 @@ class ScenarioUFinanceBillingPaymentRefundAndInstallmentLifecycleTest extends Te
|
||||
$this->actingAs($admin, 'api');
|
||||
$this->getJson('/api/v1/finance/invoices/management')
|
||||
->assertSuccessful();
|
||||
$this->getJson('/api/v1/finance/invoices/parent/' . $parentId)
|
||||
$this->getJson('/api/v1/finance/invoices/parent/'.$parentId)
|
||||
->assertSuccessful();
|
||||
$this->getJson('/api/v1/finance/invoices/' . $invoiceId . '/preview')
|
||||
$this->getJson('/api/v1/finance/invoices/'.$invoiceId.'/preview')
|
||||
->assertSuccessful();
|
||||
|
||||
$payment = $this->postJson('/api/v1/finance/payments', [
|
||||
@@ -58,15 +58,15 @@ class ScenarioUFinanceBillingPaymentRefundAndInstallmentLifecycleTest extends Te
|
||||
if ($paymentId > 0) {
|
||||
$this->postJson('/api/v1/finance/payment-transactions', [
|
||||
'payment_id' => $paymentId,
|
||||
'transaction_id' => 'E2E-TXN-' . random_int(1000, 9999),
|
||||
'transaction_id' => 'E2E-TXN-'.random_int(1000, 9999),
|
||||
'amount' => 250.00,
|
||||
'status' => 'completed',
|
||||
'provider' => 'manual',
|
||||
])->assertSuccessful();
|
||||
|
||||
$this->getJson('/api/v1/finance/payment-transactions/payment/' . $paymentId)
|
||||
$this->getJson('/api/v1/finance/payment-transactions/payment/'.$paymentId)
|
||||
->assertSuccessful();
|
||||
$this->postJson('/api/v1/finance/payments/' . $paymentId . '/send-receipt')
|
||||
$this->postJson('/api/v1/finance/payments/'.$paymentId.'/send-receipt')
|
||||
->assertSuccessful();
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ class ScenarioUFinanceBillingPaymentRefundAndInstallmentLifecycleTest extends Te
|
||||
|
||||
$this->actingAs($admin, 'api');
|
||||
|
||||
$plan = $this->postJson('/api/v1/finance/invoices/' . $invoiceId . '/installment-plans', [
|
||||
$plan = $this->postJson('/api/v1/finance/invoices/'.$invoiceId.'/installment-plans', [
|
||||
'installments' => [
|
||||
['due_date' => '2025-10-15', 'amount' => 300.00],
|
||||
['due_date' => '2025-11-15', 'amount' => 300.00],
|
||||
@@ -108,11 +108,11 @@ class ScenarioUFinanceBillingPaymentRefundAndInstallmentLifecycleTest extends Te
|
||||
->where('invoice_id', $invoiceId)
|
||||
->value('id');
|
||||
if ($planId > 0) {
|
||||
$this->postJson('/api/v1/finance/installment-plans/' . $planId . '/activate')
|
||||
$this->postJson('/api/v1/finance/installment-plans/'.$planId.'/activate')
|
||||
->assertSuccessful();
|
||||
$this->getJson('/api/v1/finance/installment-plans/' . $planId)
|
||||
$this->getJson('/api/v1/finance/installment-plans/'.$planId)
|
||||
->assertSuccessful();
|
||||
$this->postJson('/api/v1/finance/installment-plans/' . $planId . '/restructure', [
|
||||
$this->postJson('/api/v1/finance/installment-plans/'.$planId.'/restructure', [
|
||||
'reason' => 'Parent requested revised dates.',
|
||||
'installments' => [
|
||||
['due_date' => '2025-10-22', 'amount' => 450.00],
|
||||
@@ -134,18 +134,18 @@ class ScenarioUFinanceBillingPaymentRefundAndInstallmentLifecycleTest extends Te
|
||||
->where('parent_id', $parentId)
|
||||
->value('id');
|
||||
if ($refundId > 0) {
|
||||
$this->postJson('/api/v1/finance/refunds/' . $refundId . '/approve')
|
||||
$this->postJson('/api/v1/finance/refunds/'.$refundId.'/approve')
|
||||
->assertSuccessful();
|
||||
$this->postJson('/api/v1/finance/refunds/' . $refundId . '/payments', [
|
||||
$this->postJson('/api/v1/finance/refunds/'.$refundId.'/payments', [
|
||||
'amount' => 50.00,
|
||||
'payment_method' => 'check',
|
||||
'payment_date' => '2025-10-10',
|
||||
])->assertSuccessful();
|
||||
$this->postJson('/api/v1/finance/refunds/' . $refundId . '/send-receipt')
|
||||
$this->postJson('/api/v1/finance/refunds/'.$refundId.'/send-receipt')
|
||||
->assertSuccessful();
|
||||
}
|
||||
|
||||
$this->getJson('/api/v1/finance/carryforwards/preview?from_school_year=' . self::E2E_SCHOOL_YEAR . '&to_school_year=2026-2027')
|
||||
$this->getJson('/api/v1/finance/carryforwards/preview?from_school_year='.self::E2E_SCHOOL_YEAR.'&to_school_year=2026-2027')
|
||||
->assertSuccessful();
|
||||
$draft = $this->postJson('/api/v1/finance/carryforwards/draft', [
|
||||
'from_school_year' => self::E2E_SCHOOL_YEAR,
|
||||
|
||||
+5
-5
@@ -18,9 +18,9 @@ use Tests\TestCase;
|
||||
*/
|
||||
class ScenarioVProcurementReimbursementAndSupplyLifecycleTest extends TestCase
|
||||
{
|
||||
use AssertsE2EApiResponses;
|
||||
use RefreshDatabase;
|
||||
use SeedsE2ETestFixtures;
|
||||
use AssertsE2EApiResponses;
|
||||
|
||||
public function test_admin_manages_suppliers_supply_categories_purchase_order_and_receipt(): void
|
||||
{
|
||||
@@ -69,9 +69,9 @@ class ScenarioVProcurementReimbursementAndSupplyLifecycleTest extends TestCase
|
||||
->value('id');
|
||||
|
||||
if ($purchaseOrderId > 0) {
|
||||
$this->getJson('/api/v1/finance/purchase-orders/' . $purchaseOrderId)
|
||||
$this->getJson('/api/v1/finance/purchase-orders/'.$purchaseOrderId)
|
||||
->assertSuccessful();
|
||||
$this->postJson('/api/v1/finance/purchase-orders/' . $purchaseOrderId . '/receive', [
|
||||
$this->postJson('/api/v1/finance/purchase-orders/'.$purchaseOrderId.'/receive', [
|
||||
'received_date' => '2025-10-12',
|
||||
'items' => [
|
||||
['name' => 'Printer paper', 'quantity_received' => 10],
|
||||
@@ -106,7 +106,7 @@ class ScenarioVProcurementReimbursementAndSupplyLifecycleTest extends TestCase
|
||||
->value('id');
|
||||
|
||||
if ($reimbursementId > 0) {
|
||||
$this->putJson('/api/v1/finance/reimbursements/' . $reimbursementId, [
|
||||
$this->putJson('/api/v1/finance/reimbursements/'.$reimbursementId, [
|
||||
'amount' => 45.75,
|
||||
'description' => 'Updated E2E reimbursement description.',
|
||||
'status' => 'under_processing',
|
||||
@@ -136,7 +136,7 @@ class ScenarioVProcurementReimbursementAndSupplyLifecycleTest extends TestCase
|
||||
$this->postJson('/api/v1/finance/reimbursements/batches/lock', [
|
||||
'batch_id' => $batchId,
|
||||
])->assertSuccessful();
|
||||
$this->getJson('/api/v1/finance/reimbursements/batches/export?batch_id=' . $batchId)
|
||||
$this->getJson('/api/v1/finance/reimbursements/batches/export?batch_id='.$batchId)
|
||||
->assertSuccessful();
|
||||
}
|
||||
|
||||
|
||||
+6
-6
@@ -17,9 +17,9 @@ use Tests\TestCase;
|
||||
*/
|
||||
class ScenarioWAccessControlRolesNavigationAndPreferencesTest extends TestCase
|
||||
{
|
||||
use AssertsE2EApiResponses;
|
||||
use RefreshDatabase;
|
||||
use SeedsE2ETestFixtures;
|
||||
use AssertsE2EApiResponses;
|
||||
|
||||
public function test_admin_creates_role_permission_assigns_user_and_builds_navigation(): void
|
||||
{
|
||||
@@ -43,10 +43,10 @@ class ScenarioWAccessControlRolesNavigationAndPreferencesTest extends TestCase
|
||||
$teacherRoleId = (int) DB::table('roles')->where('name', 'teacher')->value('id');
|
||||
|
||||
if ($permissionId > 0 && $teacherRoleId > 0) {
|
||||
$this->putJson('/api/v1/role-permissions/roles/' . $teacherRoleId . '/permissions', [
|
||||
$this->putJson('/api/v1/role-permissions/roles/'.$teacherRoleId.'/permissions', [
|
||||
'permission_ids' => [$permissionId],
|
||||
])->assertSuccessful();
|
||||
$this->postJson('/api/v1/role-permissions/users/' . $teacher->id . '/roles', [
|
||||
$this->postJson('/api/v1/role-permissions/users/'.$teacher->id.'/roles', [
|
||||
'role_ids' => [$teacherRoleId],
|
||||
])->assertSuccessful();
|
||||
}
|
||||
@@ -76,7 +76,7 @@ class ScenarioWAccessControlRolesNavigationAndPreferencesTest extends TestCase
|
||||
['id' => $navId, 'sort_order' => 1],
|
||||
],
|
||||
])->assertSuccessful();
|
||||
$this->deleteJson('/api/v1/nav-builder/' . $navId)
|
||||
$this->deleteJson('/api/v1/nav-builder/'.$navId)
|
||||
->assertSuccessful();
|
||||
}
|
||||
}
|
||||
@@ -109,13 +109,13 @@ class ScenarioWAccessControlRolesNavigationAndPreferencesTest extends TestCase
|
||||
$this->getJson('/api/v1/preferences/list')
|
||||
->assertOk();
|
||||
|
||||
$this->putJson('/api/v1/preferences/' . $user->id, [
|
||||
$this->putJson('/api/v1/preferences/'.$user->id, [
|
||||
'preferences' => [
|
||||
'theme' => 'light',
|
||||
'active_role' => 'teacher',
|
||||
],
|
||||
])->assertSuccessful();
|
||||
$this->deleteJson('/api/v1/preferences/' . $user->id)
|
||||
$this->deleteJson('/api/v1/preferences/'.$user->id)
|
||||
->assertSuccessful();
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -16,9 +16,9 @@ use Tests\TestCase;
|
||||
*/
|
||||
class ScenarioXPublicKioskScannerAndVerificationLifecycleTest extends TestCase
|
||||
{
|
||||
use AssertsE2EApiResponses;
|
||||
use RefreshDatabase;
|
||||
use SeedsE2ETestFixtures;
|
||||
use AssertsE2EApiResponses;
|
||||
|
||||
public function test_public_content_documentation_and_policy_endpoints_are_reachable_without_auth(): void
|
||||
{
|
||||
@@ -41,7 +41,7 @@ class ScenarioXPublicKioskScannerAndVerificationLifecycleTest extends TestCase
|
||||
'/api/docs/public',
|
||||
] as $endpoint) {
|
||||
$response = $this->getJson($endpoint);
|
||||
$this->assertNoServerError($response, 'Public endpoint ' . $endpoint);
|
||||
$this->assertNoServerError($response, 'Public endpoint '.$endpoint);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ class ScenarioXPublicKioskScannerAndVerificationLifecycleTest extends TestCase
|
||||
$world = $this->seedTeacherClassWithStudent();
|
||||
$admin = $this->actingAsApiAdministrator();
|
||||
$studentId = $world['student_id'];
|
||||
$badgeCode = 'E2E-BADGE-' . random_int(1000, 9999);
|
||||
$badgeCode = 'E2E-BADGE-'.random_int(1000, 9999);
|
||||
|
||||
DB::table('students')->where('id', $studentId)->update([
|
||||
'badge_scan' => $badgeCode,
|
||||
@@ -64,7 +64,7 @@ class ScenarioXPublicKioskScannerAndVerificationLifecycleTest extends TestCase
|
||||
$this->assertNoServerError($knownScan, 'Known badge scan');
|
||||
|
||||
$unknownScan = $this->postJson('/api/v1/badge_scan/scan', [
|
||||
'code' => 'UNKNOWN-' . random_int(1000, 9999),
|
||||
'code' => 'UNKNOWN-'.random_int(1000, 9999),
|
||||
'scanner' => 'front-desk',
|
||||
'scanned_at' => '2025-10-05 09:05:00',
|
||||
]);
|
||||
|
||||
+8
-8
@@ -17,9 +17,9 @@ use Tests\TestCase;
|
||||
*/
|
||||
class ScenarioYFamilyGuardianAuthorizedUserAndWhatsappLifecycleTest extends TestCase
|
||||
{
|
||||
use AssertsE2EApiResponses;
|
||||
use RefreshDatabase;
|
||||
use SeedsE2ETestFixtures;
|
||||
use AssertsE2EApiResponses;
|
||||
|
||||
public function test_admin_builds_family_links_and_manages_guardian_flags(): void
|
||||
{
|
||||
@@ -30,7 +30,7 @@ class ScenarioYFamilyGuardianAuthorizedUserAndWhatsappLifecycleTest extends Test
|
||||
$secondParent = $this->createApiUserWithRole('parent', [
|
||||
'firstname' => 'Second',
|
||||
'lastname' => 'Guardian',
|
||||
'email' => 'second.guardian.' . uniqid('', true) . '@example.test',
|
||||
'email' => 'second.guardian.'.uniqid('', true).'@example.test',
|
||||
]);
|
||||
|
||||
$this->actingAs($admin, 'api');
|
||||
@@ -65,13 +65,13 @@ class ScenarioYFamilyGuardianAuthorizedUserAndWhatsappLifecycleTest extends Test
|
||||
'can_receive_academic' => true,
|
||||
])->assertSuccessful();
|
||||
|
||||
$this->getJson('/api/v1/families/' . $familyId . '/guardians')
|
||||
$this->getJson('/api/v1/families/'.$familyId.'/guardians')
|
||||
->assertSuccessful();
|
||||
$this->getJson('/api/v1/family-admin/card?family_id=' . $familyId)
|
||||
$this->getJson('/api/v1/family-admin/card?family_id='.$familyId)
|
||||
->assertSuccessful();
|
||||
}
|
||||
|
||||
$this->getJson('/api/v1/families/by-student/' . $studentId)
|
||||
$this->getJson('/api/v1/families/by-student/'.$studentId)
|
||||
->assertSuccessful();
|
||||
$this->getJson('/api/v1/family-admin/search?q=E2E')
|
||||
->assertSuccessful();
|
||||
@@ -86,7 +86,7 @@ class ScenarioYFamilyGuardianAuthorizedUserAndWhatsappLifecycleTest extends Test
|
||||
|
||||
$invite = $this->postJson('/api/v1/parents/authorized-users', [
|
||||
'name' => 'E2E Pickup Helper',
|
||||
'email' => 'pickup.helper.' . uniqid('', true) . '@example.test',
|
||||
'email' => 'pickup.helper.'.uniqid('', true).'@example.test',
|
||||
'cellphone' => '5554446666',
|
||||
'relation' => 'Uncle',
|
||||
'permissions' => ['pickup'],
|
||||
@@ -100,7 +100,7 @@ class ScenarioYFamilyGuardianAuthorizedUserAndWhatsappLifecycleTest extends Test
|
||||
if ($authorizedUserId > 0) {
|
||||
$this->getJson('/api/v1/parents/authorized-users')
|
||||
->assertSuccessful();
|
||||
$this->patchJson('/api/v1/parents/authorized-users/' . $authorizedUserId, [
|
||||
$this->patchJson('/api/v1/parents/authorized-users/'.$authorizedUserId, [
|
||||
'name' => 'E2E Pickup Helper Updated',
|
||||
'cellphone' => '5554447777',
|
||||
'relation' => 'Uncle',
|
||||
@@ -127,7 +127,7 @@ class ScenarioYFamilyGuardianAuthorizedUserAndWhatsappLifecycleTest extends Test
|
||||
->where('title', 'E2E Parent Group')
|
||||
->value('id');
|
||||
if ($linkId > 0) {
|
||||
$this->patchJson('/api/v1/whatsapp/links/' . $linkId, [
|
||||
$this->patchJson('/api/v1/whatsapp/links/'.$linkId, [
|
||||
'title' => 'E2E Parent Group Updated',
|
||||
'url' => 'https://chat.whatsapp.com/e2e-test-link-updated',
|
||||
'audience' => 'parents',
|
||||
|
||||
+18
-18
@@ -15,9 +15,9 @@ use Tests\TestCase;
|
||||
*/
|
||||
class ScenarioZLegacyAliasesValidationAndCompatibilityTest extends TestCase
|
||||
{
|
||||
use AssertsE2EApiResponses;
|
||||
use RefreshDatabase;
|
||||
use SeedsE2ETestFixtures;
|
||||
use AssertsE2EApiResponses;
|
||||
|
||||
public function test_legacy_teacher_aliases_match_modern_teacher_and_score_surfaces(): void
|
||||
{
|
||||
@@ -27,26 +27,26 @@ class ScenarioZLegacyAliasesValidationAndCompatibilityTest extends TestCase
|
||||
$this->actingAs($teacher, 'api');
|
||||
|
||||
foreach ([
|
||||
'/api/v1/teacher/homework-list?class_section_id=' . $classSectionId,
|
||||
'/api/v1/teacher/add-homework?class_section_id=' . $classSectionId,
|
||||
'/api/v1/teacher/add-quiz?class_section_id=' . $classSectionId,
|
||||
'/api/v1/teacher/add-midterm-exam?class_section_id=' . $classSectionId,
|
||||
'/api/v1/teacher/add-final-exam?class_section_id=' . $classSectionId,
|
||||
'/api/v1/teacher/add-participation?class_section_id=' . $classSectionId,
|
||||
'/api/v1/teacher/add-project?class_section_id=' . $classSectionId,
|
||||
'/api/v1/teacher/homework-list?class_section_id='.$classSectionId,
|
||||
'/api/v1/teacher/add-homework?class_section_id='.$classSectionId,
|
||||
'/api/v1/teacher/add-quiz?class_section_id='.$classSectionId,
|
||||
'/api/v1/teacher/add-midterm-exam?class_section_id='.$classSectionId,
|
||||
'/api/v1/teacher/add-final-exam?class_section_id='.$classSectionId,
|
||||
'/api/v1/teacher/add-participation?class_section_id='.$classSectionId,
|
||||
'/api/v1/teacher/add-project?class_section_id='.$classSectionId,
|
||||
'/api/v1/teacher/teacher-assignment',
|
||||
'/api/v1/teacher/class-view?class_section_id=' . $classSectionId,
|
||||
'/api/v1/teacher/showupdate-attendance?class_section_id=' . $classSectionId,
|
||||
'/api/v1/teacher/showupdate_attendance?class_section_id=' . $classSectionId,
|
||||
'/api/v1/teacher/scores?class_section_id=' . $classSectionId,
|
||||
'/api/v1/teacher/class-view?class_section_id='.$classSectionId,
|
||||
'/api/v1/teacher/showupdate-attendance?class_section_id='.$classSectionId,
|
||||
'/api/v1/teacher/showupdate_attendance?class_section_id='.$classSectionId,
|
||||
'/api/v1/teacher/scores?class_section_id='.$classSectionId,
|
||||
'/api/v1/teacher/calendar',
|
||||
'/api/v1/teacher/class-progress-submit?class_section_id=' . $classSectionId,
|
||||
'/api/v1/teacher/class-progress-history?class_section_id=' . $classSectionId,
|
||||
'/api/v1/teacher/class-progress-view?class_section_id=' . $classSectionId,
|
||||
'/api/v1/teacher/competition-scores?class_section_id=' . $classSectionId,
|
||||
'/api/v1/teacher/class-progress-submit?class_section_id='.$classSectionId,
|
||||
'/api/v1/teacher/class-progress-history?class_section_id='.$classSectionId,
|
||||
'/api/v1/teacher/class-progress-view?class_section_id='.$classSectionId,
|
||||
'/api/v1/teacher/competition-scores?class_section_id='.$classSectionId,
|
||||
] as $endpoint) {
|
||||
$response = $this->getJson($endpoint);
|
||||
$this->assertNoServerError($response, 'Legacy teacher alias ' . $endpoint);
|
||||
$this->assertNoServerError($response, 'Legacy teacher alias '.$endpoint);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ class ScenarioZLegacyAliasesValidationAndCompatibilityTest extends TestCase
|
||||
'/api/v1/teacher/add-project',
|
||||
] as $endpoint) {
|
||||
$response = $this->postJson($endpoint, $scorePayload);
|
||||
$this->assertNoServerError($response, 'Legacy score post alias ' . $endpoint);
|
||||
$this->assertNoServerError($response, 'Legacy score post alias '.$endpoint);
|
||||
}
|
||||
|
||||
$progress = $this->postJson('/api/v1/teacher/class-progress-submit', [
|
||||
|
||||
@@ -26,6 +26,7 @@ class StudentEnrollmentWorkflowTest extends TestCase
|
||||
use RefreshDatabase;
|
||||
|
||||
private const SCHOOL_YEAR = '2025-2026';
|
||||
|
||||
private const SEMESTER = 'Fall';
|
||||
|
||||
public function test_admin_creates_account_adds_student_and_enrolls_them(): void
|
||||
@@ -127,14 +128,14 @@ class StudentEnrollmentWorkflowTest extends TestCase
|
||||
]);
|
||||
|
||||
// The class roster endpoint reflects the assignment.
|
||||
$classes = $this->getJson('/api/v1/students/' . $studentId . '/classes');
|
||||
$classes = $this->getJson('/api/v1/students/'.$studentId.'/classes');
|
||||
$classes->assertOk()->assertJsonPath('ok', true);
|
||||
$assignedIds = array_column($classes->json('classes'), 'class_section_id');
|
||||
$this->assertContains($classSectionId, $assignedIds);
|
||||
|
||||
// 5. Move the student to "enrolled" via the enrollment workflow.
|
||||
$statusResponse = $this->post(
|
||||
'/api/v1/administrator/enrollment-withdrawal/update-statuses?' .
|
||||
'/api/v1/administrator/enrollment-withdrawal/update-statuses?'.
|
||||
http_build_query(['enrollment_status' => [$studentId => 'enrolled']]),
|
||||
[]
|
||||
);
|
||||
@@ -194,14 +195,14 @@ class StudentEnrollmentWorkflowTest extends TestCase
|
||||
|
||||
// First enrol...
|
||||
$this->post(
|
||||
'/api/v1/administrator/enrollment-withdrawal/update-statuses?' .
|
||||
'/api/v1/administrator/enrollment-withdrawal/update-statuses?'.
|
||||
http_build_query(['enrollment_status' => [$studentId => 'enrolled']]),
|
||||
[]
|
||||
)->assertOk();
|
||||
|
||||
// ...then withdraw.
|
||||
$this->post(
|
||||
'/api/v1/administrator/enrollment-withdrawal/update-statuses?' .
|
||||
'/api/v1/administrator/enrollment-withdrawal/update-statuses?'.
|
||||
http_build_query(['enrollment_status' => [$studentId => 'withdrawn']]),
|
||||
[]
|
||||
)->assertOk();
|
||||
|
||||
Reference in New Issue
Block a user