feat: 更新贡献上传URL逻辑,优化上传页面打开功能并更新相关测试用例
This commit is contained in:
@@ -7,7 +7,7 @@ test('sidepanel html keeps a single contribution mode button in header', () => {
|
||||
const matches = html.match(/id="btn-contribution-mode"/g) || [];
|
||||
|
||||
assert.equal(matches.length, 1);
|
||||
assert.match(html, /id="btn-contribution-mode"[^>]*title="进入贡献模式"/);
|
||||
assert.match(html, /id="btn-contribution-mode"[^>]*title="进入贡献模式并打开上传页"/);
|
||||
assert.match(html, />贡献\/使用<\/button>/);
|
||||
});
|
||||
|
||||
|
||||
@@ -393,7 +393,7 @@ test('contribution mode manager enters mode, starts main auto flow, polls contri
|
||||
},
|
||||
},
|
||||
constants: {
|
||||
contributionUploadUrl: 'https://apikey.qzz.io/',
|
||||
contributionUploadUrl: 'https://apikey.qzz.io',
|
||||
pollIntervalMs: 2500,
|
||||
},
|
||||
});
|
||||
@@ -420,6 +420,7 @@ test('contribution mode manager enters mode, starts main auto flow, polls contri
|
||||
assert.ok(updateSyncUiCount >= 1);
|
||||
assert.ok(updateConfigMenuCount >= 1);
|
||||
assert.equal(timers.length, 0);
|
||||
assert.deepStrictEqual(openedUrls, ['https://apikey.qzz.io']);
|
||||
|
||||
dom.inputContributionNickname.value = '贡献者昵称';
|
||||
dom.inputContributionQq.value = '123456';
|
||||
@@ -440,7 +441,7 @@ test('contribution mode manager enters mode, starts main auto flow, polls contri
|
||||
assert.equal(dom.contributionModeSummary.textContent, '\u5df2\u63d0\u4ea4\u56de\u8c03\uff0c\u7b49\u5f85 CPA \u786e\u8ba4');
|
||||
|
||||
dom.btnOpenContributionUpload.listeners.click();
|
||||
assert.deepStrictEqual(openedUrls, ['https://apikey.qzz.io/']);
|
||||
assert.deepStrictEqual(openedUrls, ['https://apikey.qzz.io', 'https://apikey.qzz.io']);
|
||||
|
||||
await dom.btnExitContributionMode.listeners.click();
|
||||
manager.render();
|
||||
|
||||
Reference in New Issue
Block a user