Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion e2e/binance-orderbook/helpers/live-performance-probe.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export function waitForBinanceLivePerformanceCompletion(options = {}) {
const expectsPrimary = kind === 'dialog-confirm';
if (dialogActions[0].detail?.primary !== expectsPrimary) return false;
return kind === 'dialog-cancel'
? /已取消撤单.*已恢复页面状态/.test(state.statusText)
? state.statusText === '撤单已取消'
: /撤单流程结束.*已恢复筛选状态/.test(state.statusText);
};

Expand Down
2 changes: 1 addition & 1 deletion e2e/binance-orderbook/specs/cancel-covering-matrix.pw.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ for (const entry of CANCEL_COVERING_SCENARIOS) {
await expect(page.getByText(
vector.dialogOutcome === 'confirm'
? '撤单流程结束,已恢复筛选状态'
: '已取消撤单,已恢复页面状态',
: '撤单已取消',
)).toBeVisible();
}

Expand Down
10 changes: 5 additions & 5 deletions e2e/binance-orderbook/specs/cancel-current-symbol.pw.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ test('cancelling the native dialog preserves current and other orders and restor
await expect(page.getByRole('dialog')).toBeVisible();
await expect.poll(async () => (await readFixtureState(page)).showOrders).toBe(false);
await page.getByRole('button', { name: '取消' }).click();
await expect(page.getByText('已取消撤单,已恢复页面状态')).toBeVisible();
await expect(page.getByText('撤单已取消')).toBeVisible();

const state = await readFixtureState(page);
expect(state.orders).toEqual(ORDER_SETS.both);
Expand Down Expand Up @@ -125,7 +125,7 @@ test('a 70-order drawing burst split across tasks performs one full save per tog
await expect(page.getByRole('dialog')).toBeVisible();
await expect.poll(async () => (await readFixtureState(page)).showOrders).toBe(false);
await page.getByRole('button', { name: '取消' }).click();
await expect(page.getByText('已取消撤单,已恢复页面状态')).toBeVisible();
await expect(page.getByText('撤单已取消')).toBeVisible();

const state = await readFixtureState(page);
expect(state.orders).toEqual(orders);
Expand Down Expand Up @@ -269,7 +269,7 @@ for (const closeMethod of ['Escape', 'backdrop']) {
} else {
await page.locator('.bn-modal-root').click({ position: { x: 4, y: 4 } });
}
await expect(page.getByText('已取消撤单,已恢复页面状态')).toBeVisible();
await expect(page.getByText('撤单已取消')).toBeVisible();

const state = await readFixtureState(page);
expect(state.orders).toEqual(ORDER_SETS.both);
Expand All @@ -294,7 +294,7 @@ test('a BFCache pagehide does not abort the active native dialog', async ({ page
})));
await expect(page.getByRole('dialog')).toBeVisible();
await page.getByRole('button', { name: '取消' }).click();
await expect(page.getByText('已取消撤单,已恢复页面状态')).toBeVisible();
await expect(page.getByText('撤单已取消')).toBeVisible();
await expectRestoredState(page, scenario);
expect(errors).toEqual([]);
});
Expand Down Expand Up @@ -405,7 +405,7 @@ test('dialog tracking survives React replacing the native dialog subtree', async
await readFixtureState(page)
).events.filter((event) => event.type === 'dialog-replaced').length).toBe(1);
await page.getByRole('button', { name: '取消' }).click();
await expect(page.getByText('已取消撤单,已恢复页面状态')).toBeVisible();
await expect(page.getByText('撤单已取消')).toBeVisible();

const state = await readFixtureState(page);
expect(state.orders).toEqual(ORDER_SETS.current);
Expand Down
2 changes: 1 addition & 1 deletion e2e/binance-orderbook/specs/live-performance-probe.pw.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ test('live probe has no user-decision deadline and follows a replaced portal dia

await page.getByRole('button', { name: '取消' }).click();
const snapshot = await finishLivePerformanceProbeWhenReady(page);
await expect(page.getByText('已取消撤单,已恢复页面状态')).toBeVisible();
await expect(page.getByText('撤单已取消')).toBeVisible();
expect(() => validateLivePerformanceProbeSnapshot(snapshot)).not.toThrow();
expect(snapshot.events.map((event) => event.kind)).toEqual(expect.arrayContaining([
'dialog-visible',
Expand Down
6 changes: 3 additions & 3 deletions scripts/binance-orderbook-trade.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// @namespace binance.orderbook.trade
// @icon data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2064%2064%22%3E%3Crect%20width%3D%2264%22%20height%3D%2264%22%20rx%3D%2214%22%20fill%3D%22%23f0b90b%22%2F%3E%3Ctext%20x%3D%2232%22%20y%3D%2249%22%20text-anchor%3D%22middle%22%20font-family%3D%22Arial%2C%20sans-serif%22%20font-size%3D%2242%22%20font-weight%3D%22800%22%20fill%3D%22%23111827%22%3EJ%3C%2Ftext%3E%3C%2Fsvg%3E
// @icon64 data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2064%2064%22%3E%3Crect%20width%3D%2264%22%20height%3D%2264%22%20rx%3D%2214%22%20fill%3D%22%23f0b90b%22%2F%3E%3Ctext%20x%3D%2232%22%20y%3D%2249%22%20text-anchor%3D%22middle%22%20font-family%3D%22Arial%2C%20sans-serif%22%20font-size%3D%2242%22%20font-weight%3D%22800%22%20fill%3D%22%23111827%22%3EJ%3C%2Ftext%3E%3C%2Fsvg%3E
// @version 2.7.151
// @version 2.7.152
// @author jackhai9
// @description 单击订单簿价格,按当前开仓/平仓 tab 自动填数量并执行下单,内置数量倍率面板
// @match https://www.binance.com/*/futures/*
Expand Down Expand Up @@ -5707,8 +5707,8 @@
return { ok: false, status: "dialog_not_found", message };
}
if (dialogDecision.status === "cancelled") {
const message = "已取消撤单";
successStatusMessage = `${message},已恢复页面状态`;
const message = "撤单已取消";
successStatusMessage = message;
return { ok: false, status: "cancelled", message };
}
waitForTradeUiMutation({ timeoutMs: 800 });
Expand Down
6 changes: 3 additions & 3 deletions src/binance-orderbook-trade/index.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// @namespace binance.orderbook.trade
// @icon data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2064%2064%22%3E%3Crect%20width%3D%2264%22%20height%3D%2264%22%20rx%3D%2214%22%20fill%3D%22%23f0b90b%22%2F%3E%3Ctext%20x%3D%2232%22%20y%3D%2249%22%20text-anchor%3D%22middle%22%20font-family%3D%22Arial%2C%20sans-serif%22%20font-size%3D%2242%22%20font-weight%3D%22800%22%20fill%3D%22%23111827%22%3EJ%3C%2Ftext%3E%3C%2Fsvg%3E
// @icon64 data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2064%2064%22%3E%3Crect%20width%3D%2264%22%20height%3D%2264%22%20rx%3D%2214%22%20fill%3D%22%23f0b90b%22%2F%3E%3Ctext%20x%3D%2232%22%20y%3D%2249%22%20text-anchor%3D%22middle%22%20font-family%3D%22Arial%2C%20sans-serif%22%20font-size%3D%2242%22%20font-weight%3D%22800%22%20fill%3D%22%23111827%22%3EJ%3C%2Ftext%3E%3C%2Fsvg%3E
// @version 2.7.151
// @version 2.7.152
// @author jackhai9
// @description 单击订单簿价格,按当前开仓/平仓 tab 自动填数量并执行下单,内置数量倍率面板
// @match https://www.binance.com/*/futures/*
Expand Down Expand Up @@ -4180,8 +4180,8 @@ import {
return { ok: false, status: 'dialog_not_found', message };
}
if (dialogDecision.status === 'cancelled') {
const message = '已取消撤单';
successStatusMessage = `${message},已恢复页面状态`;
const message = '撤单已取消';
successStatusMessage = message;
return { ok: false, status: 'cancelled', message };
}
waitForTradeUiMutation({ timeoutMs: 800 });
Expand Down
2 changes: 2 additions & 0 deletions test/unit/binance-orderbook-trade/source-regressions.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1105,6 +1105,8 @@ test('cancel current-symbol open orders are single-flight and follow the native
assert.doesNotMatch(cancelRunBody, /查找 \$\{symbol\} 当前委托/);
assert.doesNotMatch(cancelRunBody, /正在隐藏 \$\{symbol\} 图表当前委托/);
assert.doesNotMatch(cancelRunBody, /正在恢复页面状态/);
assert.match(cancelRunBody, /const message = '撤单已取消';\s*successStatusMessage = message;/);
assert.doesNotMatch(cancelRunBody, /,已恢复页面状态/);
assert.match(cancelRunBody, /撤单确认弹窗已打开/);
assert.match(cancelRunBody, /已确认撤单,等待当前币挂单清空/);
assert.match(cancelRunBody, /未能恢复隐藏其他合约状态/);
Expand Down
Loading