feat: 添加邮箱字段到贡献请求体,并更新相关测试用例
This commit is contained in:
@@ -599,6 +599,7 @@
|
|||||||
body: {
|
body: {
|
||||||
nickname: buildNickname(currentState, options.nickname),
|
nickname: buildNickname(currentState, options.nickname),
|
||||||
qq: buildContributionQq(currentState, options.qq),
|
qq: buildContributionQq(currentState, options.qq),
|
||||||
|
email: normalizeString(currentState.email),
|
||||||
source: 'cpa',
|
source: 'cpa',
|
||||||
channel: 'codex-extension',
|
channel: 'codex-extension',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -423,6 +423,7 @@ test('contribution oauth manager starts session, opens auth url, submits callbac
|
|||||||
assert.match(fetchCalls[0].url, /\/start$/);
|
assert.match(fetchCalls[0].url, /\/start$/);
|
||||||
assert.match(String(fetchCalls[0].options.body || ''), /"nickname":""/);
|
assert.match(String(fetchCalls[0].options.body || ''), /"nickname":""/);
|
||||||
assert.match(String(fetchCalls[0].options.body || ''), /"qq":""/);
|
assert.match(String(fetchCalls[0].options.body || ''), /"qq":""/);
|
||||||
|
assert.match(String(fetchCalls[0].options.body || ''), /"email":"user@example\.com"/);
|
||||||
assert.match(fetchCalls[1].url, /\/status\?/);
|
assert.match(fetchCalls[1].url, /\/status\?/);
|
||||||
|
|
||||||
const callbackState = await manager.handleCapturedCallback(
|
const callbackState = await manager.handleCapturedCallback(
|
||||||
|
|||||||
Reference in New Issue
Block a user