修复bug
This commit is contained in:
@@ -4,6 +4,9 @@ import test from 'node:test'
|
||||
|
||||
const loginSource = readFileSync(new URL('./LoginView.vue', import.meta.url), 'utf8')
|
||||
const registerSource = readFileSync(new URL('./RegisterView.vue', import.meta.url), 'utf8')
|
||||
const legalSource = readFileSync(new URL('./LegalDocumentView.vue', import.meta.url), 'utf8')
|
||||
const legalDocumentsSource = readFileSync(new URL('../legalDocuments.ts', import.meta.url), 'utf8')
|
||||
const authRoutesSource = readFileSync(new URL('../routes.ts', import.meta.url), 'utf8')
|
||||
const authStoreSource = readFileSync(new URL('../store/auth.ts', import.meta.url), 'utf8')
|
||||
const httpSource = readFileSync(new URL('../../../api/http.ts', import.meta.url), 'utf8')
|
||||
const sessionSource = readFileSync(new URL('../../../api/session.ts', import.meta.url), 'utf8')
|
||||
@@ -42,6 +45,17 @@ test('shows immediate login after registration and separates company review from
|
||||
assert.match(registerSource, /立即登录/)
|
||||
})
|
||||
|
||||
test('opens complete service and privacy documents from registration', () => {
|
||||
assert.match(registerSource, /to="\/legal\/terms" target="_blank"/)
|
||||
assert.match(registerSource, /to="\/legal\/privacy" target="_blank"/)
|
||||
assert.doesNotMatch(registerSource, /showDocument/)
|
||||
assert.match(authRoutesSource, /path: '\/legal\/terms'/)
|
||||
assert.match(authRoutesSource, /path: '\/legal\/privacy'/)
|
||||
assert.match(legalSource, /document\.sections/)
|
||||
assert.match(legalDocumentsSource, /跨境物流中的信息出境/)
|
||||
assert.match(legalDocumentsSource, /违禁品/)
|
||||
})
|
||||
|
||||
test('uses real auth endpoints and single-flight refresh handling', () => {
|
||||
assert.match(authApiSource, /\/auth\/login/)
|
||||
assert.match(authApiSource, /\/auth\/register/)
|
||||
|
||||
Reference in New Issue
Block a user