user->attachPermission( Permission::where('name', 'read-admin-panel')->firstOrFail() ); } public function test_supplier_payables_final_entry_renders_its_own_workspace(): void { $this->loginAs() ->get(route('business.pages.show', ['section' => 'supplier-payables-final'])) ->assertOk() ->assertSee('data-supplier-workspace', false) ->assertSee('aria-label="供应商应付页面"', false) ->assertSee(route('business.pages.show', [ 'section' => 'supplier-payables-final', 'page' => 'supplier-payables-report', ]), false) ->assertDontSee(route('business.pages.show', [ 'section' => 'supplier-payables', 'page' => 'supplier-payables-report', ]), false) ->assertDontSee('class="business-blank-page"', false); } public function test_courier_payables_final_entry_renders_its_own_workspace(): void { $this->loginAs() ->get(route('business.pages.show', ['section' => 'courier-payables-final'])) ->assertOk() ->assertSee('aria-label="快递应付(终版)"', false) ->assertSee(route('business.pages.show', [ 'section' => 'courier-payables-final', 'page' => 'courier-information', ]), false) ->assertDontSee('data-courier-final', false) ->assertDontSee('class="business-blank-page"', false); } public function test_final_directory_renders_its_own_empty_table_with_toolbar(): void { $this->loginAs() ->get(route('business.pages.show', [ 'section' => 'supplier-payables-final', 'page' => 'supplier-payables-report', ])) ->assertOk() ->assertSeeText('暂无数据,请点击“导入”上传本表数据。') ->assertSee('workspace/supplier-payables-final/actions/supplier-payables-report/import', false) ->assertDontSee('supplier-payables-report-page', false); } public function test_courier_final_directory_does_not_borrow_the_other_directory_pages(): void { $this->loginAs() ->get(route('business.pages.show', [ 'section' => 'courier-payables-final', 'page' => 'freight-reconciliation', ])) ->assertOk() ->assertSeeText('该页面暂未配置数据表,敬请期待。') ->assertDontSee('data-summary-status', false); } }