feat: 更新贡献昵称逻辑,允许用户留空昵称并调整相关测试用例

This commit is contained in:
QLHazyCoder
2026-04-21 01:55:06 +08:00
parent 2d3111228e
commit 157f49592a
4 changed files with 5 additions and 6 deletions
+2 -2
View File
@@ -421,7 +421,7 @@ test('contribution oauth manager starts session, opens auth url, submits callbac
assert.equal(startedState.contributionAuthTabId, 88);
assert.equal(tabCalls.length, 1);
assert.match(fetchCalls[0].url, /\/start$/);
assert.match(String(fetchCalls[0].options.body || ''), /"nickname":"user@example\.com"/);
assert.match(String(fetchCalls[0].options.body || ''), /"nickname":""/);
assert.match(String(fetchCalls[0].options.body || ''), /"qq":""/);
assert.match(fetchCalls[1].url, /\/status\?/);
@@ -511,7 +511,7 @@ return { refreshOAuthUrlBeforeStep6 };
{
type: 'contribution',
options: {
nickname: 'user@example.com',
nickname: '',
openAuthTab: false,
stateOverride: {
contributionMode: true,