Commit d6d0a24c by 张立顺

test: cover customer archive display fields

1 parent e71f67aa
......@@ -116,6 +116,7 @@ value="{{ orderObj.remark }}"
label="车主姓名"
titleBtn="客户档案"
bindtitleClick="showCustomPop"
labelWidth="var(--fontSize290)"
value="{{ orderObj.customer.customerName || '请通过客户档案选择' }}"
/>
</view>
......
......@@ -18,7 +18,23 @@ describe('createOrder customer information template', () => {
assert.ok(start >= 0)
assert.ok(end > start)
assert.match(customerSection, /bindtitleClick="showCustomPop"/)
assert.match(customerSection, /请通过客户档案选择/)
assert.match(customerSection, /label="车主姓名"/)
assert.match(customerSection, /labelWidth="var\(--fontSize290\)"/)
assert.match(customerSection, /orderObj\.customer\.customerName \|\| '请通过客户档案选择'/)
assert.match(customerSection, /label="客户来源"/)
assert.match(customerSection, /filter\.getSalesTypeName\(Sourcecolumns, orderObj\.customer\.salesType\) \|\| '请通过客户档案选择'/)
assert.match(customerSection, /label="性别"/)
assert.match(customerSection, /orderObj\.customer\.customerSex == 1 \? '男' : \(orderObj\.customer\.customerSex == 2 \? '女' : '请通过客户档案选择'\)/)
assert.match(customerSection, /label="手机号"/)
assert.match(customerSection, /orderObj\.customer\.customerPhone \|\| '请通过客户档案选择'/)
assert.match(customerSection, /label="选择车型"/)
assert.match(customerSection, /orderObj\.customer\.carSeriesName \? orderObj\.customer\.carBrand \+ ' - ' \+ orderObj\.customer\.carChildsBrandName \+ ' - ' \+ orderObj\.customer\.carSeriesName : '请通过客户档案选择'/)
assert.match(customerSection, /label="车架号\( VIN \)"/)
assert.match(customerSection, /orderObj\.customer\.standNo \|\| '请通过客户档案选择'/)
assert.match(customerSection, /label="车牌号"/)
assert.match(customerSection, /orderObj\.customer\.plateNumber \|\| '请通过客户档案选择'/)
assert.match(customerSection, /label="是否体验"/)
assert.match(customerSection, /orderObj\.customer\.experienceFlag == 'Y' \? '是' : \(orderObj\.customer\.experienceFlag == 'N' \? '否' : '请通过客户档案选择'\)/)
assert.doesNotMatch(customerSection, /<input/)
assert.doesNotMatch(customerSection, /bind:click="toSelectCustomerSource"/)
assert.doesNotMatch(customerSection, /bindtap="changeGender"/)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!