fix: keep extension 0.5.167 after updater rollback
This commit is contained in:
@@ -307,6 +307,28 @@ test('team-order live gate allows numbered receivable drift like 0.5.156', async
|
||||
clearTimeout(jq.ajax.__ltjt_restore_timer);
|
||||
});
|
||||
|
||||
test('split-parent entry waits adaptively for the current iframe add button before clicking', async () => {
|
||||
const inpage = await readFile(new URL('../chrome-extension/ltjt-order-assistant/inpage.js', import.meta.url), 'utf8');
|
||||
const readinessBody = inpage.slice(
|
||||
inpage.indexOf('async function waitForSplitParentAddButton'),
|
||||
inpage.indexOf('function nativeListRequestMatches')
|
||||
);
|
||||
const createBody = inpage.slice(
|
||||
inpage.indexOf('async function createSplitParentLive'),
|
||||
inpage.indexOf('async function createSplitChildLive')
|
||||
);
|
||||
assert.match(inpage, /SPLIT_PARENT_ENTRY_READY_TIMEOUT_MS = 15000/);
|
||||
assert.match(inpage, /SPLIT_PARENT_ENTRY_READY_INTERVAL_MS = 100/);
|
||||
assert.match(readinessBody, /return waitForCondition/);
|
||||
assert.match(readinessBody, /const candidate = mainIframe\(\) \? mainIframeDocument\(\) : initialListDocument/);
|
||||
assert.match(readinessBody, /addButton\.isConnected === false/);
|
||||
assert.match(readinessBody, /addButton\.disabled === true/);
|
||||
assert.match(createBody, /const listReady = await waitForSplitParentAddButton\(listDocument\)/);
|
||||
assert.match(createBody, /listDocument = listReady\.document/);
|
||||
assert.match(createBody, /listReady\.addButton\.click\(\)/);
|
||||
assert.doesNotMatch(createBody, /const addButton = listDocument\.querySelector/);
|
||||
});
|
||||
|
||||
test('split-parent post-write verification retries read-only and falls back after any missed response group', async () => {
|
||||
const inpage = await readFile(new URL('../chrome-extension/ltjt-order-assistant/inpage.js', import.meta.url), 'utf8');
|
||||
const createBody = inpage.slice(
|
||||
@@ -1296,7 +1318,7 @@ test('passenger explicit server success is terminal without a post-save row requ
|
||||
assert.doesNotMatch(passengerBranch, /passengerRequery|verifyLifecycleOperation/);
|
||||
assert.doesNotMatch(background, /attemptAutomaticPassengerReconciliation/);
|
||||
assert.match(background, /名单已取得 ERP 明确成功响应,按业务规则确认录入成功/);
|
||||
assert.match(platformApp, /REQUIRED_EXTENSION_VERSION = '0\.5\.165'/);
|
||||
assert.match(platformApp, /REQUIRED_EXTENSION_VERSION = '0\.5\.167'/);
|
||||
});
|
||||
|
||||
test('uncertain lifecycle writes can only converge through a read-only plugin requery', async () => {
|
||||
@@ -1503,6 +1525,22 @@ test('lifecycle execution keeps the MV3 worker alive until the durable task sett
|
||||
assert.match(background, /arrangement_resource_candidate_data_missing/);
|
||||
});
|
||||
|
||||
test('extension 0.5.167 keeps reload dormant unless its durable execution state is fully idle', async () => {
|
||||
const [background, bridge] = await Promise.all([
|
||||
readFile(new URL('../chrome-extension/ltjt-order-assistant/background.js', import.meta.url), 'utf8'),
|
||||
readFile(new URL('../chrome-extension/ltjt-order-assistant/business-bridge.js', import.meta.url), 'utf8')
|
||||
]);
|
||||
assert.match(background, /async function extensionUpdateSafetyStatus\(\)/);
|
||||
assert.match(background, /\['running', 'write_started', 'submitted', 'uncertain'\]/);
|
||||
assert.match(background, /saved_unverified\|execution_uncertain\|reconciliation_pending/);
|
||||
assert.match(background, /message\?\.type === 'LTJT_EXTENSION_UPDATE_STATUS'/);
|
||||
assert.match(background, /message\?\.type === 'LTJT_APPLY_EXTENSION_UPDATE'/);
|
||||
assert.match(background, /if \(comparison >= 0\)/);
|
||||
assert.match(background, /chrome\.runtime\.reload\(\)/);
|
||||
assert.match(bridge, /message\.type === 'APPLY_EXTENSION_UPDATE'/);
|
||||
assert.match(bridge, /type: 'LTJT_APPLY_EXTENSION_UPDATE'/);
|
||||
});
|
||||
|
||||
test('ERP browser injection is host-permission gated and fail-closed with diagnostics', async () => {
|
||||
const [manifestText, background, platform] = await Promise.all([
|
||||
readFile(new URL('../chrome-extension/ltjt-order-assistant/manifest.json', import.meta.url), 'utf8'),
|
||||
@@ -1926,7 +1964,7 @@ test('delete guard distinguishes independent, shared child, and shared parent ro
|
||||
for (const operation of operations) assert.equal(plans.validateOperation(operation).ok, true, plans.validateOperation(operation).blockers.join('; '));
|
||||
|
||||
const mapping = JSON.parse(await readFile(new URL('../mappings/lifecycle.mapping.json', import.meta.url), 'utf8'));
|
||||
assert.equal(mapping.current_extension_version, '0.5.165');
|
||||
assert.equal(mapping.current_extension_version, '0.5.167');
|
||||
assert.equal(
|
||||
mapping.updates.order_update_independent.field_mapped_pending_live_validation['pax.child_no_bed'],
|
||||
'ertrenshu'
|
||||
@@ -2309,10 +2347,10 @@ test('schema and browser adapters contain the v2 safety fields and no confirm ov
|
||||
assert.match(inpage, /`ys_danweiid\$\{index\}`, resolvedCustomerId/);
|
||||
assert.doesNotMatch(inpage, /product_customer_source_region|sourceRegionCheck|source_reference/);
|
||||
assert.doesNotMatch(teamBatchInpage, /product_customer_source_region|sourceRegionCheck/);
|
||||
assert.equal(extensionManifest.version, '0.5.165');
|
||||
assert.match(inpage, /version: '0\.5\.165'/);
|
||||
assert.match(teamBatchInpage, /version: '0\.5\.165'/);
|
||||
assert.match(platformApp, /REQUIRED_EXTENSION_VERSION = '0\.5\.165'/);
|
||||
assert.equal(extensionManifest.version, '0.5.167');
|
||||
assert.match(inpage, /version: '0\.5\.167'/);
|
||||
assert.match(teamBatchInpage, /version: '0\.5\.167'/);
|
||||
assert.match(platformApp, /REQUIRED_EXTENSION_VERSION = '0\.5\.167'/);
|
||||
assert.match(inpage, /function strictIsoDate\(value\)/);
|
||||
assert.match(inpage, /const startDate = strictIsoDate\(controlCanonicalValue\(form, 'riqi0'\)\)/);
|
||||
assert.match(inpage, /const endDate = strictIsoDate\(controlCanonicalValue\(form, 'riqis0'\)\)/);
|
||||
|
||||
Reference in New Issue
Block a user