File tree Expand file tree Collapse file tree
src/components/ai-edition Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -394,6 +394,26 @@ describe("EditClipModal rotation", () => {
394394 expect ( screen . getByRole ( "button" , { name : "Apply" } ) ) . toBeDisabled ( ) ;
395395 } ) ;
396396
397+ // The tip explains turning the picture, so it belongs on 180° alone: on 0° it described
398+ // the opposite of what the button does.
399+ it ( "explains the turn on 180° and leaves 0° without a tip" , ( ) => {
400+ renderTurned ( ) ;
401+ const tooltipOf = ( name : string ) => {
402+ const button = rotationButton ( name ) ;
403+ // A keyboard focus: one the mouse gave opens no tooltip.
404+ fireEvent . keyDown ( window , { key : "Tab" } ) ;
405+ act ( ( ) => button . focus ( ) ) ;
406+ const shown = screen . queryByRole ( "tooltip" ) ?. textContent ?? null ;
407+ act ( ( ) => button . blur ( ) ) ;
408+ return shown ;
409+ } ;
410+
411+ expect ( tooltipOf ( "180°" ) ) . toBe (
412+ "Turn the picture upside down, e.g. for a camera mounted overhead" ,
413+ ) ;
414+ expect ( tooltipOf ( "0°" ) ) . toBeNull ( ) ;
415+ } ) ;
416+
397417 it ( "keeps the stored crop when the rotation is toggled" , ( ) => {
398418 const { onApply } = renderTurned ( ) ;
399419
Original file line number Diff line number Diff line change @@ -1277,11 +1277,8 @@ export function EditClipModal({
12771277 < ChoiceRow < ClipRotation >
12781278 label = { t ( "editClipDialog.rotation" ) }
12791279 options = { [
1280- {
1281- value : 0 ,
1282- label : t ( "editClipDialog.rotationUpright" ) ,
1283- title : t ( "editClipDialog.rotationTip" ) ,
1284- } ,
1280+ // The tip explains the turn, so 0° carries none: its label says all of it.
1281+ { value : 0 , label : t ( "editClipDialog.rotationUpright" ) } ,
12851282 {
12861283 value : 180 ,
12871284 label : t ( "editClipDialog.rotationTurned" ) ,
You can’t perform that action at this time.
0 commit comments