feat(semi-auto): 换绑失败页支持返回角色核对界面
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import assert from 'node:assert/strict'
|
||||
import { readFileSync } from 'node:fs'
|
||||
import { dirname, join } from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
import test from 'node:test'
|
||||
|
||||
const source = readFileSync(
|
||||
join(
|
||||
dirname(fileURLToPath(import.meta.url)),
|
||||
'../src/pages/customer-fulfillment/CustomerFulfillmentPage.tsx',
|
||||
),
|
||||
'utf8',
|
||||
)
|
||||
|
||||
test('换绑失败页用「返回上一步」替换「仍使用原角色」', () => {
|
||||
assert.ok(source.includes('rebindFailureDismissed'))
|
||||
assert.ok(source.includes('返回上一步'))
|
||||
assert.ok(!source.includes('仍使用原角色'))
|
||||
})
|
||||
|
||||
test('返回后展示资料不一致核对界面', () => {
|
||||
assert.ok(source.includes('showRebindFailure'))
|
||||
assert.ok(source.includes('!showRebindFailure &&'))
|
||||
assert.ok(source.includes('同步平台角色并继续'))
|
||||
assert.ok(source.includes('id="customer-binding-stage"'))
|
||||
})
|
||||
|
||||
test('资料同步后提供确认使用原角色', () => {
|
||||
assert.ok(source.includes('确认使用原角色'))
|
||||
assert.ok(source.includes('handleAcceptExistingRole'))
|
||||
})
|
||||
Reference in New Issue
Block a user