Discussion stays open for finished studies; only planned studies are closed; v2.11.2
Publish Container / build (push) Successful in 16m10s
Publish Container / build (push) Successful in 16m10s
A finished study is just no longer the main study, so students who take it later still need discussion. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f1d4909acb
commit
0ab94bfcd4
5 files changed
+20
-17
No files matched your search
@@ -60,7 +60,7 @@ test('re-engagement emails skip students whose only study is finished', async ()
|
||||
assert.deepEqual(sent, ['c@d.co'])
|
||||
})
|
||||
|
||||
test('discussion is open only for active studies', async () => {
|
||||
test('discussion is open for active and finished studies, closed only for planned ones', async () => {
|
||||
const { isStudyDiscussionOpen } = await import('../server/study-helpers.js')
|
||||
const past = '2020-01-01T00:00:00Z'
|
||||
const future = '2099-01-01T00:00:00Z'
|
||||
@@ -73,8 +73,8 @@ test('discussion is open only for active studies', async () => {
|
||||
],
|
||||
}
|
||||
assert.equal(isStudyDiscussionOpen('live'), true)
|
||||
assert.equal(isStudyDiscussionOpen('done'), false)
|
||||
assert.equal(isStudyDiscussionOpen('auto-done'), false)
|
||||
assert.equal(isStudyDiscussionOpen('done'), true)
|
||||
assert.equal(isStudyDiscussionOpen('auto-done'), true)
|
||||
assert.equal(isStudyDiscussionOpen('soon'), false)
|
||||
assert.equal(isStudyDiscussionOpen('missing'), false)
|
||||
})
|
||||
Reference in new issue
Block a user