两个「终版」目录(供应商应付(终版)、快递应付(终版))改为独立数据: 保留原有导入、导出、查询、重置、编辑按钮和导入模板,数据初始为空、按表独立存放, 不再借用基础目录的页面与数据。 - 终版目录拥有自己的同名子页面与横向页签 - 新增终版按表数据的独立导入/导出/模板/编辑接口(数据集键 final:<目录>:<页面>) - 供应商终版 13 个页面、快递终版 4 个页面已接入 - 终版导入模板统一增加“月份”列,记录标识列改为选填
76 lines
2.8 KiB
PHP
76 lines
2.8 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_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);
|
|
}
|
|
}
|