Skip to content

Commit ef6a407

Browse files
committed
test: update deprecating options
1 parent 14bf786 commit ef6a407

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

tests/test_suggestion.lua

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ T["suggestion()"]["suggestion works"] = function()
2222
child.type_keys("i123", "<Esc>", "o456", "<Esc>", "o7")
2323
child.wait_for_suggestion()
2424

25-
reference_screenshot(child.get_screenshot(), nil, { ignore_lines = { 9, 10 } })
25+
reference_screenshot(child.get_screenshot(), nil, { ignore_text = { 9, 10 }, ignore_attr = { 9, 10 } })
2626
end
2727

2828
T["suggestion()"]["auto_trigger is false, will not show ghost test"] = function()
@@ -32,7 +32,7 @@ T["suggestion()"]["auto_trigger is false, will not show ghost test"] = function(
3232
vim.loop.sleep(3000)
3333
child.lua("vim.wait(0)")
3434

35-
reference_screenshot(child.get_screenshot(), nil, { ignore_lines = { 9, 10 } })
35+
reference_screenshot(child.get_screenshot(), nil, { ignore_text = { 9, 10 }, ignore_attr = { 9, 10 } })
3636
end
3737

3838
T["suggestion()"]["accept keymap to trigger sugestion"] = function()
@@ -42,7 +42,7 @@ T["suggestion()"]["accept keymap to trigger sugestion"] = function()
4242
child.type_keys("i123", "<Esc>", "o456", "<Esc>", "o7", "<Tab>")
4343
child.wait_for_suggestion()
4444

45-
reference_screenshot(child.get_screenshot(), nil, { ignore_lines = { 9, 10 } })
45+
reference_screenshot(child.get_screenshot(), nil, { ignore_text = { 9, 10 }, ignore_attr = { 9, 10 } })
4646
end
4747

4848
T["suggestion()"]["accept keymap, no suggestion, execute normal keystroke"] = function()
@@ -53,7 +53,7 @@ T["suggestion()"]["accept keymap, no suggestion, execute normal keystroke"] = fu
5353
child.configure_copilot()
5454
child.type_keys("i123", "<Esc>", "o456", "<Esc>", "o7", "<Tab>")
5555

56-
reference_screenshot(child.get_screenshot(), nil, { ignore_lines = { 9, 10 } })
56+
reference_screenshot(child.get_screenshot(), nil, { ignore_text = { 9, 10 }, ignore_attr = { 9, 10 } })
5757
end
5858

5959
T["suggestion()"]["accept_word, 1 word, works"] = function()
@@ -64,7 +64,7 @@ T["suggestion()"]["accept_word, 1 word, works"] = function()
6464
child.wait_for_suggestion()
6565
child.type_keys("<C-e>", "<Esc>")
6666

67-
reference_screenshot(child.get_screenshot(), nil, { ignore_lines = { 9, 10 } })
67+
reference_screenshot(child.get_screenshot(), nil, { ignore_text = { 9, 10 }, ignore_attr = { 9, 10 } })
6868
end
6969

7070
T["suggestion()"]["accept_word, 3 words, works"] = function()
@@ -75,7 +75,7 @@ T["suggestion()"]["accept_word, 3 words, works"] = function()
7575
child.wait_for_suggestion()
7676
child.type_keys("<C-e>", "<C-e>", "<C-e>", "<Esc>")
7777

78-
reference_screenshot(child.get_screenshot(), nil, { ignore_lines = { 9, 10 } })
78+
reference_screenshot(child.get_screenshot(), nil, { ignore_text = { 9, 10 }, ignore_attr = { 9, 10 } })
7979
end
8080

8181
-- - accept_word, 1 word then next
@@ -91,7 +91,7 @@ T["suggestion()"]["accept_word, 1 word, then dismiss"] = function()
9191
child.wait_for_suggestion()
9292
child.type_keys("<C-e>", "<Tab>")
9393

94-
reference_screenshot(child.get_screenshot(), nil, { ignore_lines = { 9, 10 } })
94+
reference_screenshot(child.get_screenshot(), nil, { ignore_text = { 9, 10 }, ignore_attr = { 9, 10 } })
9595
end
9696

9797
T["suggestion()"]["accept_word, 1 word, then accept"] = function()
@@ -104,7 +104,7 @@ T["suggestion()"]["accept_word, 1 word, then accept"] = function()
104104
child.wait_for_suggestion()
105105
child.type_keys("<C-e>", "<Tab>")
106106

107-
reference_screenshot(child.get_screenshot(), nil, { ignore_lines = { 9, 10 } })
107+
reference_screenshot(child.get_screenshot(), nil, { ignore_text = { 9, 10 }, ignore_attr = { 9, 10 } })
108108
end
109109

110110
T["suggestion()"]["accept_line, 1 line, works"] = function()
@@ -117,7 +117,7 @@ T["suggestion()"]["accept_line, 1 line, works"] = function()
117117
child.wait_for_suggestion()
118118
child.type_keys("<C-e>", "<Esc>")
119119

120-
reference_screenshot(child.get_screenshot(), nil, { ignore_lines = { 29, 30 } })
120+
reference_screenshot(child.get_screenshot(), nil, { ignore_text = { 29, 30 }, ignore_attr = { 29, 30 } })
121121
end
122122

123123
T["suggestion()"]["accept_line, 3 lines, works"] = function()
@@ -130,7 +130,7 @@ T["suggestion()"]["accept_line, 3 lines, works"] = function()
130130
child.wait_for_suggestion()
131131
child.type_keys("<C-e>", "<C-e>", "<C-e>", "<Esc>")
132132

133-
reference_screenshot(child.get_screenshot(), nil, { ignore_lines = { 49, 50 } })
133+
reference_screenshot(child.get_screenshot(), nil, { ignore_text = { 49, 50 }, ignore_attr = { 49, 50 } })
134134
end
135135

136136
-- - accept_line, 1 line then next
@@ -148,7 +148,7 @@ T["suggestion()"]["accept_line, 1 line, then dismiss"] = function()
148148
child.wait_for_suggestion()
149149
child.type_keys("<C-e>", "<Tab>")
150150

151-
reference_screenshot(child.get_screenshot(), nil, { ignore_lines = { 29, 30 } })
151+
reference_screenshot(child.get_screenshot(), nil, { ignore_text = { 29, 30 }, ignore_attr = { 29, 30 } })
152152
end
153153

154154
T["suggestion()"]["accept_line, 1 line, then accept"] = function()
@@ -164,7 +164,7 @@ T["suggestion()"]["accept_line, 1 line, then accept"] = function()
164164
child.wait_for_suggestion()
165165
child.type_keys("<C-e>", "<Tab>")
166166

167-
reference_screenshot(child.get_screenshot(), nil, { ignore_lines = { 49, 50 } })
167+
reference_screenshot(child.get_screenshot(), nil, { ignore_text = { 49, 50 }, ignore_attr = { 49, 50 } })
168168
end
169169

170170
return T

0 commit comments

Comments
 (0)