mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-26 10:55:27 +00:00
feat(comments): add printable comments page with frame thumbnails and markup overlays (#550)
* feat(comments): add printable comments page with frame thumbnails and markup overlays * fix(comments): guarantee frame-accurate ffmpeg seeking for printable comment thumbnails * fix(comments): address printable comments review findings
This commit is contained in:
@@ -80,6 +80,7 @@ apps/web/e2e/
|
||||
| Owner creates a share link from a file context menu, edits it in the quick dialog, and opens advanced settings | `tests/project/create-share-link.spec.ts` |
|
||||
| Owner creates a share link and adds to an existing share link from media view | `tests/project/create-share-link.spec.ts` |
|
||||
| Owner protects a share with a password; guests must enter it to view | `tests/project/share-password.spec.ts` |
|
||||
| Guests can unlock a protected printable comments link directly | `tests/project/share-password.spec.ts` |
|
||||
| Public page views and share activity appear in both management sidebars | `tests/project/share-activity.spec.ts` |
|
||||
| Opening a direct historical version link records the selected version | `tests/project/share-activity.spec.ts` |
|
||||
| Concurrent public opens count every view and deduplicate matching activity | `tests/project/share-activity.spec.ts` |
|
||||
|
||||
@@ -49,3 +49,33 @@ test('owner protects a share with a password and guests must enter it to view',
|
||||
await guestContext.close()
|
||||
}
|
||||
})
|
||||
|
||||
test('a guest can unlock a protected printable comments link directly', async ({
|
||||
file,
|
||||
browser,
|
||||
}) => {
|
||||
const { context, projectId, fileName, fileId } = file
|
||||
const share = await apiCreateShare(context.request, projectId, 'Shared Print')
|
||||
await apiAddAssetsToShare(context.request, share.id, [fileId])
|
||||
const res = await context.request.put(`/api/shares/${share.id}`, {
|
||||
data: { password: 'secret123' },
|
||||
})
|
||||
expect(res.ok()).toBe(true)
|
||||
|
||||
const guestContext = await browser.newContext()
|
||||
const page = await guestContext.newPage()
|
||||
try {
|
||||
await page.goto(`/print/comments/${fileId}?shareId=${share.id}`)
|
||||
const passwordInput = page.getByPlaceholder('Enter password')
|
||||
await expect(passwordInput).toBeVisible()
|
||||
await passwordInput.fill('wrong-password')
|
||||
await page.getByRole('button', { name: 'Confirm' }).click()
|
||||
await expect(page.getByText('Incorrect password. Please try again.')).toBeVisible()
|
||||
await passwordInput.fill('secret123')
|
||||
await page.getByRole('button', { name: 'Confirm' }).click()
|
||||
await expect(page.getByTitle(fileName)).toBeVisible()
|
||||
await expect(page).toHaveURL(`/print/comments/${fileId}?shareId=${share.id}`)
|
||||
} finally {
|
||||
await guestContext.close()
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user