fix(ci): 校正守卫后的五条前端源码合同跟着搬家(BUG-940)
This commit is contained in:
@@ -177,11 +177,18 @@ test("creating and leaving a session keep the address bar in sync", () => {
|
||||
assert.match(startNewChat, /writeSessionUrl\(nextSession\.id, "push"\)/);
|
||||
assert.match(startNewChat, /window\.history\.replaceState\(null, "", previousHref\)/);
|
||||
|
||||
// 原值:delete/archive 函数体内直接 `writeSessionUrl(fallbackId || null, "replace")`
|
||||
// 新值:删/归档当前会话走 `activateFallbackSession`,由它 `writeSessionUrl(null|fallbackId, "replace")`
|
||||
// 原因:BUG-924 回退优先非校正会话,落到校正会话时要走 selectSession,不能在 delete 里写死 URL。
|
||||
const deleteSession = sourceBetween(page, "async function deleteSession(", "function togglePinnedSession");
|
||||
assert.match(deleteSession, /writeSessionUrl\(fallbackId \|\| null, "replace"\)/);
|
||||
assert.match(deleteSession, /if \(activeSessionId === session\.id\) \{\s*activateFallbackSession\(nextSessions\);/);
|
||||
|
||||
const archiveSession = sourceBetween(page, "function toggleArchivedSession(", "async function shareSession");
|
||||
assert.match(archiveSession, /writeSessionUrl\(fallbackId \|\| null, "replace"\)/);
|
||||
assert.match(archiveSession, /activateFallbackSession\(visibleSessions\.filter\(\(item\) => item\.id !== sessionId\)\)/);
|
||||
|
||||
const fallback = sourceBetween(page, "function activateFallbackSession(", "async function loadMoreSessions");
|
||||
assert.match(fallback, /writeSessionUrl\(null, "replace"\)/);
|
||||
assert.match(fallback, /writeSessionUrl\(fallbackId, "replace"\)/);
|
||||
|
||||
const recovery = sourceBetween(
|
||||
page,
|
||||
|
||||
Reference in New Issue
Block a user