diff options
| author | Adam Tajti <adam.tajti@gmail.com> | 2023-01-06 19:46:10 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-06 19:46:10 +0100 |
| commit | cd67e819e453643b818363e6b573484c8e2e41b0 (patch) | |
| tree | 18beb0fa61a793b251ce4f7b325124f4a4d955f9 /lua/tests/automated | |
| parent | 18fc02b499b368287e3aa267ec0b0d22afc0f19b (diff) | |
fix(tests): uses testharness in scrolling strategy (#2307)
Diffstat (limited to 'lua/tests/automated')
| -rw-r--r-- | lua/tests/automated/layout_strategies_spec.lua | 1 | ||||
| -rw-r--r-- | lua/tests/automated/pickers/find_files_spec.lua | 14 | ||||
| -rw-r--r-- | lua/tests/automated/pickers/scrolling_spec.lua | 12 |
3 files changed, 9 insertions, 18 deletions
diff --git a/lua/tests/automated/layout_strategies_spec.lua b/lua/tests/automated/layout_strategies_spec.lua index 8b5af48..3315f63 100644 --- a/lua/tests/automated/layout_strategies_spec.lua +++ b/lua/tests/automated/layout_strategies_spec.lua @@ -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" diff --git a/lua/tests/automated/pickers/find_files_spec.lua b/lua/tests/automated/pickers/find_files_spec.lua index 7e1c027..f285d4f 100644 --- a/lua/tests/automated/pickers/find_files_spec.lua +++ b/lua/tests/automated/pickers/find_files_spec.lua @@ -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" }, @@ -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>', { 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 }, }, @@ -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 }, } }) ]] diff --git a/lua/tests/automated/pickers/scrolling_spec.lua b/lua/tests/automated/pickers/scrolling_spec.lua deleted file mode 100644 index 760d2b9..0000000 --- a/lua/tests/automated/pickers/scrolling_spec.lua +++ /dev/null @@ -1,12 +0,0 @@ -require("plenary.reload").reload_module "telescope" - -local tester = require "telescope.pickers._test" - -local log = require "telescope.log" -log.use_console = false - -describe("scrolling strategies", function() - it("should handle cycling for full list", function() - tester.run_file [[find_files__scrolling_descending_cycle]] - end) -end) |
