mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
[ranges-tracker] add legacy orderedRejections field in tracked-changes (#36565)
* [docstore] use more realistic test stubs for ranges * [monorepo] define ranges schemas in @overleaf/ranges-tracker * [ranges-tracker] add legacy orderedRejections field in tracked-changes * [monorepo] resolve @overleaf/ranges-tracker subpath imports in typescript * [real-time] validate comment thread ids and tracked change id seeds * [ranges-tracker] require ObjectId ids and tracked change metadata in ranges * [monorepo] require ObjectId tracked change ids on the accept routes * [web] use ObjectId comment thread ids in the DocumentController tests GitOrigin-RevId: 58b20dec311d85b917ef63f9efbe745a265a2de6
This commit is contained in:
@@ -15,22 +15,24 @@ describe('DocumentController', function () {
|
||||
ctx.doc = { _id: '5c9a5d5b0000000000000002' }
|
||||
ctx.doc_lines = ['one', 'two', 'three']
|
||||
ctx.version = 42
|
||||
ctx.threadId1 = '5c9a5d5b0000000000000011'
|
||||
ctx.threadId2 = '5c9a5d5b0000000000000012'
|
||||
ctx.ranges = {
|
||||
comments: [
|
||||
{
|
||||
id: 'comment1',
|
||||
id: ctx.threadId1,
|
||||
op: {
|
||||
c: 'foo',
|
||||
p: 123,
|
||||
t: 'comment1',
|
||||
t: ctx.threadId1,
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'comment2',
|
||||
id: ctx.threadId2,
|
||||
op: {
|
||||
c: 'bar',
|
||||
p: 456,
|
||||
t: 'comment2',
|
||||
t: ctx.threadId2,
|
||||
},
|
||||
},
|
||||
],
|
||||
@@ -53,8 +55,8 @@ describe('DocumentController', function () {
|
||||
},
|
||||
}
|
||||
ctx.resolvedThreadIds = [
|
||||
'comment2',
|
||||
'comment4', // Comment in project but not in doc
|
||||
ctx.threadId2,
|
||||
'5c9a5d5b0000000000000014', // Comment in project but not in doc
|
||||
]
|
||||
|
||||
ctx.ProjectGetter = {
|
||||
@@ -159,7 +161,7 @@ describe('DocumentController', function () {
|
||||
pathname: ctx.pathname,
|
||||
projectHistoryId: ctx.project.overleaf.history.id,
|
||||
projectHistoryType: 'project-history',
|
||||
resolvedCommentIds: ['comment2'],
|
||||
resolvedCommentIds: [ctx.threadId2],
|
||||
historyRangesSupport: false,
|
||||
otMigrationStage: 0,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user