@@ -8,8 +8,8 @@ function s:suite.after() abort
8
8
call Cleanup ()
9
9
endfunction
10
10
11
- function ! s: suite .should_prompt_to_enter_url_for_new_connection () abort
12
- let g: test_connection_name = ' /group/connection-file -db'
11
+ function ! s: suite .should_create_groups_and_connections () abort
12
+ let g: test_connection_name = ' /group/connection-first -db'
13
13
runtime autoload/db_ui/ utils.vim
14
14
function ! db_ui#utils#input (name, val)
15
15
if a: name == ? ' Enter connection url: '
@@ -21,19 +21,17 @@ function! s:suite.should_prompt_to_enter_url_for_new_connection() abort
21
21
endif
22
22
endfunction
23
23
24
- call s: expect (&filetype ).not.to_equal (' dbui' )
25
- :DBUIAddConnection
26
24
:DBUI
27
- call s: expect (& filetype ). to_equal ( ' dbui ' )
25
+ norm A
28
26
call s: expect (getline (1 , ' $' )).to_equal ([' ▸ group' ])
29
27
norm o
30
- call s: expect (getline (1 , ' $' )).to_equal ([' ▾ group' , ' ▸ connection-file -db' ])
28
+ call s: expect (getline (1 , ' $' )).to_equal ([' ▾ group' , ' ▸ connection-first -db' ])
31
29
let g: test_connection_name = ' /group/nested-group/connection-second-db'
32
30
norm A
33
- call s: expect (getline (1 , ' $' )).to_equal ([' ▾ group' , ' ▸ connection-file -db' , ' ▸ nested-group' ])
31
+ call s: expect (getline (1 , ' $' )).to_equal ([' ▾ group' , ' ▸ connection-first -db' , ' ▸ nested-group' ])
34
32
endfunction
35
33
36
- function ! s: suite .should_allow_renaming_connection () abort
34
+ function ! s: suite .should_allow_renaming_groups_and_connections () abort
37
35
let g: test_group_name = ' edited-group-name'
38
36
function ! db_ui#utils#input (name, val)
39
37
if a: name == ? ' Edit group name: '
@@ -51,13 +49,13 @@ function! s:suite.should_allow_renaming_connection() abort
51
49
:DBUI
52
50
norm r
53
51
call s: expect (getline (1 , ' $' )).to_equal ([' ▸ edited-group-name' ])
52
+ norm ojr
54
53
let g: test_group_name = ' edited-nested-group-name'
55
- norm ojrA
56
- norm jrA
54
+ norm jr
57
55
call s: expect (getline (1 , ' $' )).to_equal ([' ▾ edited-group-name' , ' ▸ edited-db-name' , ' ▸ edited-nested-group-name' ])
58
56
endfunction
59
57
60
- function ! s: suite .should_delete_connection () abort
58
+ function ! s: suite .should_delete_group_and_connection () abort
61
59
norm d
62
60
call s: expect (getline (1 , ' $' )).to_equal ([' ▾ edited-group-name' , ' ▸ edited-db-name' ])
63
61
norm d
0 commit comments