fix: require cloud chart sync and deployed revision
This commit is contained in:
@@ -9,3 +9,18 @@ test("other chart saves do not require the owner's rectification state", () => {
|
||||
assert.match(source, /if \(missingOtherProfileStep\(nextProfile\)\)/);
|
||||
assert.doesNotMatch(source, /saveOtherChart[\s\S]{0,500}missingProfileStep\(nextProfile\)/);
|
||||
});
|
||||
|
||||
test("other chart mutations acknowledge only confirmed cloud writes", () => {
|
||||
assert.match(source, /await saveCloudChartProfile\(record\);[\s\S]{0,500}已保存到云端星盘库/);
|
||||
assert.doesNotMatch(source, /saveOtherChart[\s\S]{0,500}catch\s*\{[\s\S]{0,500}已添加到星盘库/);
|
||||
assert.match(source, /async function deleteOtherChart[\s\S]{0,500}await deleteCloudChartProfile\(recordId\)/);
|
||||
assert.doesNotMatch(source, /deleteOtherChart[\s\S]{0,500}void deleteCloudChartProfile/);
|
||||
});
|
||||
|
||||
test("a successful cloud read replaces stale local other charts", () => {
|
||||
assert.match(
|
||||
source,
|
||||
/fetchCloudChartLibrary\(\)[\s\S]{0,800}upsertSelfChart\(cloudLibrary\.filter\(\(record\) => record\.role !== "self"\), profile\)/,
|
||||
);
|
||||
assert.doesNotMatch(source, /fetchCloudChartLibrary\(\)[\s\S]{0,800}new Map\(\[[\s\S]{0,500}current\.filter\(\(record\) => record\.role === "other"\)/);
|
||||
});
|
||||
|
||||
@@ -18,4 +18,7 @@ test("production deployment passes the tested revision into the web runtime", ()
|
||||
assert.match(compose, /GITHUB_SHA: \$\{GITHUB_SHA\}/);
|
||||
assert.match(workflow, /DEPLOY_GIT_SHA: \$\{\{ github\.event\.workflow_run\.head_sha \|\| github\.sha \}\}/);
|
||||
assert.match(workflow, /GITHUB_SHA='\$DEPLOY_GIT_SHA'/);
|
||||
assert.match(workflow, /get\("deployment", \{\}\)\.get\("gitCommit"/);
|
||||
assert.match(workflow, /DEPLOY_GIT_SHA/);
|
||||
assert.match(workflow, /Production revision did not converge/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user