assertStringContainsString("isDouyin(){return this.billType==='douyin';}", $source); $this->assertStringContainsString("usesStableDateControl(){return true;}", $source); $this->assertStringContainsString("{ 'is-stable-date': usesStableDateControl }", $source); $this->assertStringContainsString('.tw-date.is-stable-date .tw-date-control', $source); $this->assertStringContainsString("['douyin','pinduoduo','dewu','taobao-wechat','jd-transactions','jingxi','jd-wallet','vipshop','vipshop-jx'].indexOf(this.billType)!==-1", $source); $this->assertStringContainsString('v-if="usesMirrorOptions && !filterOptionsError"', $source); $this->assertStringContainsString('page-key="store-receiving-bills"', $source); $this->assertStringContainsString(':tab-key="billType"', $source); $this->assertStringContainsString("value=\"page-visible\"", $source); $this->assertStringContainsString("value=\"filtered-visible\"", $source); $this->assertStringContainsString("value=\"filtered-all\"", $source); $this->assertStringContainsString('position:sticky', $source); $this->assertStringContainsString('overflow:auto', $source); } public function test_store_receiving_tabs_route_the_vipshop_jx_account(): void { $source = file_get_contents(__DIR__ . '/../../../resources/assets/js/views/business/pages.js'); $this->assertStringContainsString( "const GENERIC_TABS = ['taobao-wechat', 'pinduoduo', 'jd-wallet', 'jd-transactions', 'jingxi', 'douyin', 'dewu', 'vipshop', 'vipshop-jx'];", $source, ); $this->assertStringContainsString( "const STORE_RECEIVING_TABS = ['taobao-alipay', 'taobao-wechat', 'pinduoduo', 'jd-wallet', 'jd-transactions', 'jingxi', 'douyin', 'dewu', 'vipshop', 'vipshop-jx'];", $source, ); } public function test_jd_and_jingxi_tabs_share_the_same_date_and_summary_behaviour(): void { $source = file_get_contents(__DIR__ . '/../../../resources/assets/js/components/business/AccountBills.vue'); $this->assertStringContainsString("const JD_BILL_TABS = ['jd-transactions','jingxi'];", $source); $this->assertStringContainsString("isJdBillTab(){return JD_BILL_TABS.indexOf(this.billType)!==-1;}", $source); $this->assertStringContainsString("const DATE_FILTER_LABELS = {'jd-transactions':'费用结算时间','jingxi':'费用结算时间','jd-wallet':'费用结算时间','douyin':'结算时间','vipshop':'结算时间','vipshop-jx':'结算时间'};", $source); $this->assertStringContainsString('{{ dateFilterLabel }}', $source); $this->assertStringContainsString('v-if="isJdBillTab && sync"', $source); $this->assertStringContainsString("netLabel=JD_BILL_TABS.concat(['vipshop-jx']).indexOf(this.billType)!==-1", $source); } }