Add page indexes to conversation manifests
This commit is contained in:
@@ -110,8 +110,9 @@ test('buildConversationPackageManifest sorts artifacts and emits stable public s
|
||||
artifacts: [
|
||||
{
|
||||
id: 'ca_late',
|
||||
artifactKind: 'generated_file',
|
||||
displayName: 'notes.md',
|
||||
artifactKind: 'page',
|
||||
displayName: '项目周报',
|
||||
pageId: 'page-1',
|
||||
sortOrder: 2,
|
||||
createdAt: 3000,
|
||||
},
|
||||
@@ -122,6 +123,16 @@ test('buildConversationPackageManifest sorts artifacts and emits stable public s
|
||||
sortOrder: 1,
|
||||
createdAt: 2000,
|
||||
},
|
||||
{
|
||||
id: 'ca_public',
|
||||
artifactKind: 'public_html',
|
||||
displayName: 'report.html',
|
||||
pageId: 'page-1',
|
||||
publicationId: 'pub-1',
|
||||
canonicalUrl: 'https://m.tkmind.cn/MindSpace/user-1/public/report.html',
|
||||
sortOrder: 3,
|
||||
createdAt: 4000,
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
@@ -130,7 +141,7 @@ test('buildConversationPackageManifest sorts artifacts and emits stable public s
|
||||
assert.equal(manifest.storagePrefix, 'users/user-1/conversations/session-1');
|
||||
assert.deepEqual(
|
||||
manifest.artifacts.map((artifact) => artifact.artifactId),
|
||||
['ca_first', 'ca_late'],
|
||||
['ca_first', 'ca_late', 'ca_public'],
|
||||
);
|
||||
assert.deepEqual(manifest.artifacts[0], {
|
||||
artifactId: 'ca_first',
|
||||
@@ -139,4 +150,24 @@ test('buildConversationPackageManifest sorts artifacts and emits stable public s
|
||||
sortOrder: 1,
|
||||
createdAt: 2000,
|
||||
});
|
||||
assert.deepEqual(manifest.pages, [
|
||||
{
|
||||
pageId: 'page-1',
|
||||
artifactIds: ['ca_late', 'ca_public'],
|
||||
displayName: '项目周报',
|
||||
canonicalUrl: 'https://m.tkmind.cn/MindSpace/user-1/public/report.html',
|
||||
createdAt: 3000,
|
||||
updatedAt: 4000,
|
||||
},
|
||||
]);
|
||||
assert.deepEqual(manifest.publications, [
|
||||
{
|
||||
publicationId: 'pub-1',
|
||||
artifactIds: ['ca_public'],
|
||||
displayName: 'report.html',
|
||||
canonicalUrl: 'https://m.tkmind.cn/MindSpace/user-1/public/report.html',
|
||||
createdAt: 4000,
|
||||
updatedAt: 4000,
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user