CaiWuXiTong/tests/Feature/Business/PayablesFinalEntriesTest.php

47 lines
1.6 KiB
PHP

<?php
namespace Tests\Feature\Business;
use App\Models\Auth\Permission;
use Tests\Feature\FeatureTestCase;
class PayablesFinalEntriesTest extends FeatureTestCase
{
protected function setUp(): void
{
parent::setUp();
$this->user->attachPermission(
Permission::where('name', 'read-admin-panel')->firstOrFail()
);
}
public function test_supplier_payables_final_entry_renders_the_existing_supplier_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',
'page' => 'supplier-payables-report',
]), false)
->assertDontSee('class="business-blank-page"', false);
}
public function test_courier_payables_final_entry_renders_the_existing_courier_workspace(): void
{
$this->loginAs()
->get(route('business.pages.show', ['section' => 'courier-payables-final']))
->assertOk()
->assertSee('data-courier-final', false)
->assertSee('aria-label="快递应付子功能"', false)
->assertSee(route('business.pages.show', [
'section' => 'courier-payables',
'page' => 'courier-information',
]), false)
->assertDontSee('class="business-blank-page"', false);
}
}