隐藏营销账户账单未启用平台
This commit is contained in:
parent
6a787610b5
commit
0ffbbb7c6a
@ -324,6 +324,42 @@ class MarketingAccountBillsTabsTest extends FeatureTestCase
|
||||
|
||||
}
|
||||
|
||||
public function testMarketingAccountBillsRemovesDisabledPlatformTabs(): void
|
||||
{
|
||||
$this->allowMarketingAccountBillsPage();
|
||||
$repository = Mockery::mock(TmallTaobaoSpreadBillRepository::class);
|
||||
$repository->shouldReceive('usesBusinessMirror')->andReturnTrue();
|
||||
$repository->shouldReceive('paginate')->andReturn(['rows' => [], 'total' => 0]);
|
||||
$repository->shouldReceive('summary')->andReturn([
|
||||
'income_total' => 0,
|
||||
'expense_total' => 0,
|
||||
'net' => 0,
|
||||
'count' => 0,
|
||||
]);
|
||||
$repository->shouldReceive('storeOptions')->andReturn([]);
|
||||
$this->app->instance(TmallTaobaoSpreadBillRepository::class, $repository);
|
||||
|
||||
$this->loginAs()
|
||||
->get(route('business.pages.show', [
|
||||
'section' => 'billing-transactions',
|
||||
'page' => 'marketing-account-bills',
|
||||
'tab' => 'taobao-alipay',
|
||||
]))
|
||||
->assertOk()
|
||||
->assertDontSeeText('抖音账户')
|
||||
->assertDontSeeText('得物账户')
|
||||
->assertDontSeeText('唯品会账户');
|
||||
|
||||
$page = collect(config('business_navigation'))
|
||||
->firstWhere('slug', 'billing-transactions')['pages'];
|
||||
$marketingBills = collect($page)->firstWhere('slug', 'marketing-account-bills');
|
||||
$tabSlugs = collect($marketingBills['tabs'])->pluck('slug')->all();
|
||||
|
||||
$this->assertNotContains('douyin', $tabSlugs);
|
||||
$this->assertNotContains('dewu', $tabSlugs);
|
||||
$this->assertNotContains('vipshop', $tabSlugs);
|
||||
}
|
||||
|
||||
public function testPinduoduoBillsPageShowsExportForTheCurrentFilters(): void
|
||||
{
|
||||
$this->allowMarketingAccountBillsPage();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user