File tree Expand file tree Collapse file tree 2 files changed +35
-6
lines changed
spring-boot-admin-server-ui/src/main/frontend/views/instances/logfile Expand file tree Collapse file tree 2 files changed +35
-6
lines changed Original file line number Diff line number Diff line change 1+ import { screen , waitFor } from '@testing-library/vue' ;
2+ import { beforeEach , describe , expect , it } from 'vitest' ;
3+
4+ import { applications } from '@/mocks/applications/data' ;
5+ import Application from '@/services/application' ;
6+ import { render } from '@/test-utils' ;
7+ import LogFile from '@/views/instances/logfile/index.vue' ;
8+
9+ describe ( 'LogFile' , ( ) => {
10+ beforeEach ( async ( ) => {
11+ const application = new Application ( applications [ 0 ] ) ;
12+ const instance = application . instances [ 0 ] ;
13+
14+ render ( LogFile , {
15+ props : {
16+ instance,
17+ } ,
18+ } ) ;
19+ } ) ;
20+
21+ it ( 'disables the wrap lines by default' , async ( ) => {
22+ const checkbox = await screen . findByRole ( 'checkbox' , {
23+ name : 'instances.logfile.wrap_lines' ,
24+ } ) ;
25+ await waitFor ( ( ) => {
26+ expect ( checkbox ) . not . toBeChecked ( ) ;
27+ } ) ;
28+ } ) ;
29+ } ) ;
Original file line number Diff line number Diff line change @@ -130,8 +130,8 @@ export default {
130130 atBottom: false ,
131131 atTop: true ,
132132 skippedBytes: null ,
133- wrapLines: true ,
134- scrollSubcription : null ,
133+ wrapLines: false ,
134+ scrollSubscription : null ,
135135 }),
136136 computed: {
137137 skippedBytesString () {
@@ -143,7 +143,7 @@ export default {
143143 },
144144 created () {
145145 this .ansiUp = new AnsiUp ();
146- this .scrollSubcription = fromEvent (window , ' scroll' )
146+ this .scrollSubscription = fromEvent (window , ' scroll' )
147147 .pipe (
148148 debounceTime (25 ),
149149 map ((event ) => event .target .scrollingElement .scrollTop ),
@@ -157,11 +157,11 @@ export default {
157157 });
158158 },
159159 beforeUnmount () {
160- if (this .scrollSubcription && ! this .scrollSubcription .closed ) {
160+ if (this .scrollSubscription && ! this .scrollSubscription .closed ) {
161161 try {
162- this .scrollSubcription .unsubscribe ();
162+ this .scrollSubscription .unsubscribe ();
163163 } finally {
164- this .scrollSubcription = null ;
164+ this .scrollSubscription = null ;
165165 }
166166 }
167167 },
You can’t perform that action at this time.
0 commit comments