mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 14:43:46 +01:00
Merge pull request #18374 from overleaf/em-chat-resolved-thread-ids
Add resolved-thread-ids endpoint to chat GitOrigin-RevId: 211dee88707f2d7fb1c0c8805a1f6ac28dca494d
This commit is contained in:
@@ -38,6 +38,13 @@ describe('Resolving a thread', async function () {
|
||||
const resolvedAt = new Date(threads[threadId].resolved_at)
|
||||
expect(new Date() - resolvedAt).to.be.below(1000)
|
||||
})
|
||||
|
||||
it('should list the thread id in the resolved thread ids endpoint', async function () {
|
||||
const { response, body } =
|
||||
await ChatClient.getResolvedThreadIds(projectId)
|
||||
expect(response.statusCode).to.equal(200)
|
||||
expect(body.resolvedThreadIds).to.include(threadId)
|
||||
})
|
||||
})
|
||||
|
||||
describe('when a thread is not resolved', async function () {
|
||||
@@ -58,6 +65,13 @@ describe('Resolving a thread', async function () {
|
||||
expect(response.statusCode).to.equal(200)
|
||||
expect(threads[threadId].resolved).to.be.undefined
|
||||
})
|
||||
|
||||
it('should not list the thread in the resolved thread ids endpoint', async function () {
|
||||
const { response, body } =
|
||||
await ChatClient.getResolvedThreadIds(projectId)
|
||||
expect(response.statusCode).to.equal(200)
|
||||
expect(body.resolvedThreadIds).not.to.include(threadId)
|
||||
})
|
||||
})
|
||||
|
||||
describe('when a thread is resolved then reopened', async function () {
|
||||
@@ -89,5 +103,12 @@ describe('Resolving a thread', async function () {
|
||||
expect(response.statusCode).to.equal(200)
|
||||
expect(threads[threadId].resolved).to.be.undefined
|
||||
})
|
||||
|
||||
it('should not list the thread in the resolved thread ids endpoint', async function () {
|
||||
const { response, body } =
|
||||
await ChatClient.getResolvedThreadIds(projectId)
|
||||
expect(response.statusCode).to.equal(200)
|
||||
expect(body.resolvedThreadIds).not.to.include(threadId)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user