@@ -14,9 +14,7 @@ describe('ApprovalModeIndicator', () => {
1414 const { lastFrame } = render (
1515 < ApprovalModeIndicator approvalMode = { ApprovalMode . AUTO_EDIT } /> ,
1616 ) ;
17- const output = lastFrame ( ) ;
18- expect ( output ) . toContain ( 'auto-accept edits' ) ;
19- expect ( output ) . toContain ( 'shift+tab to manual' ) ;
17+ expect ( lastFrame ( ) ) . toMatchSnapshot ( ) ;
2018 } ) ;
2119
2220 it ( 'renders correctly for AUTO_EDIT mode with plan enabled' , ( ) => {
@@ -26,35 +24,28 @@ describe('ApprovalModeIndicator', () => {
2624 isPlanEnabled = { true }
2725 /> ,
2826 ) ;
29- const output = lastFrame ( ) ;
30- expect ( output ) . toContain ( 'auto-accept edits' ) ;
31- expect ( output ) . toContain ( 'shift+tab to manual' ) ;
27+ expect ( lastFrame ( ) ) . toMatchSnapshot ( ) ;
3228 } ) ;
3329
3430 it ( 'renders correctly for PLAN mode' , ( ) => {
3531 const { lastFrame } = render (
3632 < ApprovalModeIndicator approvalMode = { ApprovalMode . PLAN } /> ,
3733 ) ;
38- const output = lastFrame ( ) ;
39- expect ( output ) . toContain ( 'plan' ) ;
40- expect ( output ) . toContain ( 'shift+tab to accept edits' ) ;
34+ expect ( lastFrame ( ) ) . toMatchSnapshot ( ) ;
4135 } ) ;
4236
4337 it ( 'renders correctly for YOLO mode' , ( ) => {
4438 const { lastFrame } = render (
4539 < ApprovalModeIndicator approvalMode = { ApprovalMode . YOLO } /> ,
4640 ) ;
47- const output = lastFrame ( ) ;
48- expect ( output ) . toContain ( 'YOLO' ) ;
49- expect ( output ) . toContain ( 'ctrl+y' ) ;
41+ expect ( lastFrame ( ) ) . toMatchSnapshot ( ) ;
5042 } ) ;
5143
5244 it ( 'renders correctly for DEFAULT mode' , ( ) => {
5345 const { lastFrame } = render (
5446 < ApprovalModeIndicator approvalMode = { ApprovalMode . DEFAULT } /> ,
5547 ) ;
56- const output = lastFrame ( ) ;
57- expect ( output ) . toContain ( 'shift+tab to accept edits' ) ;
48+ expect ( lastFrame ( ) ) . toMatchSnapshot ( ) ;
5849 } ) ;
5950
6051 it ( 'renders correctly for DEFAULT mode with plan enabled' , ( ) => {
@@ -64,7 +55,6 @@ describe('ApprovalModeIndicator', () => {
6455 isPlanEnabled = { true }
6556 /> ,
6657 ) ;
67- const output = lastFrame ( ) ;
68- expect ( output ) . toContain ( 'shift+tab to plan' ) ;
58+ expect ( lastFrame ( ) ) . toMatchSnapshot ( ) ;
6959 } ) ;
7060} ) ;
0 commit comments