Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tests): uses testharness in scrolling strategy #2307

Merged
merged 1 commit into from
Jan 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
244 changes: 0 additions & 244 deletions lua/telescope/pickers/_test.lua

This file was deleted.

1 change: 0 additions & 1 deletion lua/tests/automated/layout_strategies_spec.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-- local tester = require('telescope.pickers._test')
local config = require "telescope.config"
local resolve = require "telescope.config.resolve"
local layout_strats = require "telescope.pickers.layout_strategies"
Expand Down
14 changes: 9 additions & 5 deletions lua/tests/automated/pickers/find_files_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ describe("builtin.find_files", function()
tester.run_file "find_files__readme"
end)

it("should handle cycling for full list", function()
tester.run_file "find_files__scrolling_descending_cycle"
end)

for _, configuration in ipairs {
{ sorting_strategy = "descending" },
{ sorting_strategy = "ascending" },
Expand Down Expand Up @@ -107,12 +111,12 @@ describe("builtin.find_files", function()

it("should be able to c-n the items", function()
tester.run_string [[
runner.picker('find_files', 'fixtures/file<c-n>', {
runner.picker('find_files', 'fixtures/find_files/file<c-n>', {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have included added a subdirectory alongside of fixing this test to prepare for other fixtures in my next PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense. thanks :)

post_typed = {
{
{
" lua/tests/fixtures/file_a.txt",
"> lua/tests/fixtures/file_abc.txt",
" lua/tests/fixtures/find_files/file_a.txt",
"> lua/tests/fixtures/find_files/file_abc.txt",
}, GetResults
},
},
Expand All @@ -129,9 +133,9 @@ describe("builtin.find_files", function()

it("should be able to get the current selection", function()
tester.run_string [[
runner.picker('find_files', 'fixtures/file_abc', {
runner.picker('find_files', 'fixtures/find_files/file_abc', {
post_typed = {
{ 'lua/tests/fixtures/file_abc.txt', GetSelectionValue },
{ 'lua/tests/fixtures/find_files/file_abc.txt', GetSelectionValue },
}
})
]]
Expand Down
12 changes: 0 additions & 12 deletions lua/tests/automated/pickers/scrolling_spec.lua

This file was deleted.

File renamed without changes.