mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-21 14:36:31 +00:00
test(journey): the entry picker takes clips, so the test may not insist on stills
FE-PAGE-JOURNEYDETAIL-105 still looked for accept="image/*" on the editor's file input after it learned to take video (#2341), which is the one red test on dev. The camera input beside it stays image-only and the test says why.
This commit is contained in:
@@ -2367,15 +2367,15 @@ describe('JourneyDetailPage', () => {
|
||||
|
||||
// ── FE-PAGE-JOURNEYDETAIL-105 ──────────────────────────────────────────
|
||||
describe('FE-PAGE-JOURNEYDETAIL-105: EntryEditor has hidden file input', () => {
|
||||
it('has a hidden file input with accept="image/*" and multiple attribute', async () => {
|
||||
it('takes pictures and clips, several at a time', async () => {
|
||||
const user = userEvent.setup({ advanceTimers: vi.advanceTimersByTime });
|
||||
await renderAndWait();
|
||||
await openEntryEditor(user);
|
||||
|
||||
// The editor has a hidden file input
|
||||
const fileInputs = document.querySelectorAll('input[type="file"][accept="image/*"]');
|
||||
// The picker takes video as well as stills (#2341). The camera input beside
|
||||
// it stays image-only: `capture` is for taking a photo, not filming one.
|
||||
const fileInputs = document.querySelectorAll('input[type="file"][accept="image/*,video/*"]');
|
||||
expect(fileInputs.length).toBeGreaterThanOrEqual(1);
|
||||
// Should have the multiple attribute
|
||||
const editorFileInput = Array.from(fileInputs).find(input => {
|
||||
return input.closest('[class*="fixed"]') !== null;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user