@@ -164,6 +164,7 @@ describe("OverlayEditor", () => {
164164 [ "name" , "INPUT" , "text" , "タスク名" ] ,
165165 [ "start" , "INPUT" , "date" , "2026-01-01" ] ,
166166 [ "plannedEffort" , "INPUT" , "number" , 8 ] ,
167+ [ "progress" , "INPUT" , "number" , 45 ] ,
167168 [ "process" , "SELECT" , "" , "レビュー" ] ,
168169 [ "status" , "SELECT" , "" , "完了" ] ,
169170 ] ) (
@@ -211,6 +212,47 @@ describe("OverlayEditor", () => {
211212 }
212213 ) ;
213214
215+ it ( "sets progress input constraints" , async ( ) => {
216+ const rectSpy = jest
217+ . spyOn ( HTMLElement . prototype , "getBoundingClientRect" )
218+ . mockReturnValue ( rect as DOMRect ) ;
219+ const rafSpy = jest
220+ . spyOn ( window , "requestAnimationFrame" )
221+ . mockImplementation ( callback => {
222+ callback ( 0 ) ;
223+ return 1 ;
224+ } ) ;
225+ const { taskListRef, headerRef, bodyRef } = createRefs ( ) ;
226+
227+ render (
228+ < div ref = { taskListRef } >
229+ < div ref = { headerRef } />
230+ < div ref = { bodyRef } >
231+ < div data-row-id = "task-1" data-column-id = "progress" >
232+ 45
233+ </ div >
234+ </ div >
235+ < OverlayEditor
236+ editingState = { createEditingState ( "progress" , false ) }
237+ taskListRef = { taskListRef }
238+ headerContainerRef = { headerRef }
239+ bodyContainerRef = { bodyRef }
240+ onCommit = { jest . fn ( ) . mockResolvedValue ( undefined ) }
241+ onCancel = { jest . fn ( ) }
242+ />
243+ </ div >
244+ ) ;
245+
246+ const overlayInput = await screen . findByTestId ( "overlay-editor-input" ) ;
247+
248+ expect ( overlayInput ) . toHaveAttribute ( "min" , "0" ) ;
249+ expect ( overlayInput ) . toHaveAttribute ( "max" , "100" ) ;
250+ expect ( overlayInput ) . toHaveAttribute ( "step" , "5" ) ;
251+
252+ rectSpy . mockRestore ( ) ;
253+ rafSpy . mockRestore ( ) ;
254+ } ) ;
255+
214256 it ( "focuses the input when editing starts" , async ( ) => {
215257 const rectSpy = jest
216258 . spyOn ( HTMLElement . prototype , "getBoundingClientRect" )
0 commit comments