user->attachPermission( Permission::where('name', 'read-admin-panel')->firstOrFail() ); } public function test_supplier_reconciliation_navigation_contains_the_negative_alert_page(): void { $section = collect(BusinessNavigation::all())->firstWhere('slug', 'supplier-reconciliation'); $this->assertNotNull($section); $this->assertContains('supplier-negative-alert', array_column($section['pages'], 'slug')); $this->assertSame('supplier-negative-alert', $section['pages'][0]['slug']); $this->assertSame( '供应商负数预警', collect($section['pages'])->firstWhere('slug', 'supplier-negative-alert')['title'], ); } public function test_negative_alert_page_renders_in_the_supplier_reconciliation_tabs(): void { $this->loginAs() ->get(route('business.pages.show', [ 'section' => 'supplier-reconciliation', 'page' => 'supplier-negative-alert', ])) ->assertOk() ->assertSeeText('财务端数据') ->assertSeeText('厂家端数据') ->assertSeeText('供应商负数预警') ->assertSeeText('负数判定口径待确认') ->assertSeeText('待接入') ->assertSeeText('返回财务端数据'); } }