summaryrefslogtreecommitdiff
path: root/lua/tests/automated/pickers
diff options
context:
space:
mode:
authorLuke Kershaw <35707277+l-kershaw@users.noreply.github.com>2021-09-19 09:30:25 +0100
committerGitHub <noreply@github.com>2021-09-19 09:30:25 +0100
commit37c9ab6688eb2cf46a22c70c8d46ca9d4e147e85 (patch)
treeeee6b8e9540a859978ad713b558961ea5b67a84e /lua/tests/automated/pickers
parentca05f8955ce78ce8358734f08a009f11cbdae1ba (diff)
feat: `layout_strategies` refactor (#1039)
* wip: 2021-07-22 15:00 BST * wip: `horizontal` refactored * wip: `center` refactored * wip: `cursor` and `vertical` refactored * wip: `current_buffer` refactor - also changed `layout_config_defaults` as they gave errors when using `current_buffer` * wip: `bottom_pane` refactor * [docgen] Update doc/telescope.txt skip-checks: true * fix: put accidentally remove config option back * [docgen] Update doc/telescope.txt skip-checks: true * wip: standardise `height` calculation for `center` and `bottom_pane` * wip: improve comments * [docgen] Update doc/telescope.txt skip-checks: true * stylua - also fix a merge mistake * [docgen] Update doc/telescope.txt skip-checks: true * fix: attempt to fix bad merge * refactor: remove unused entry in `borderchars` table - also fix some typos * wip: tweak padding for `bottom_pane` * wip: add `tabline` checks to `bottom_pane` - also tweaked position so that `statusline` is not covered when borders are enabled * stylua * refactor: factor out size capping function * [docgen] Update doc/telescope.txt skip-checks: true * fix: adjust tests that relied on height being number of results * fix: forgot variable in calc_size_and_spacing * fix: maybe this fixes these tests? * test: try other plenary branch for ci * test: switch back to main plenary branch for ci * fix: actually define `max_results` in the test * fix: final tweaks for edge cases Co-authored-by: Github Actions <actions@github>
Diffstat (limited to 'lua/tests/automated/pickers')
-rw-r--r--lua/tests/automated/pickers/find_files_spec.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/lua/tests/automated/pickers/find_files_spec.lua b/lua/tests/automated/pickers/find_files_spec.lua
index ba1c21b..b4001cc 100644
--- a/lua/tests/automated/pickers/find_files_spec.lua
+++ b/lua/tests/automated/pickers/find_files_spec.lua
@@ -38,9 +38,10 @@ describe("builtin.find_files", function()
sorter = require('telescope.sorters').get_fzy_sorter(),
layout_strategy = 'center',
layout_config = {
- height = max_results,
+ height = max_results + 1,
width = 0.9,
},
+ border = false,
}, vim.fn.json_decode([==[%s]==])))
]],
vim.fn.json_encode(configuration)
@@ -57,6 +58,8 @@ describe("builtin.find_files", function()
tester.run_string(string.format(
[[
+ local max_results = 5
+
tester.builtin_picker('find_files', 'README.md', {
post_typed = {
{ %s, function() return #GetResults() end },
@@ -66,9 +69,10 @@ describe("builtin.find_files", function()
sorter = require('telescope.sorters').get_fzy_sorter(),
layout_strategy = 'center',
layout_config = {
- height = max_results,
+ height = max_results + 1,
width = 0.9,
},
+ border = false,
}, vim.fn.json_decode([==[%s]==])))
]],
expected,