1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-17 00:18:05 +02:00

30 Commits

Author SHA1 Message Date
8c716184c1 Set working directory in lazygit test command
We need to fetch our list of tests both outside of our test binary and within. We need
to get the list from within so that we can run the code that drives the test and runs
assertions. To get the list of tests we need to know where the root of the lazygit repo
is, given that the tests live in files under that root.

So far, we've used this GetLazyRootDirectory() function for that, but it assumes that
we're not in a test directory (it just looks for the first .git dir it can find). Because
we didn't want to properly fix this before, we've been setting the working directory of
the test command to the lazygit root, and using the --path CLI arg to override it when
the test itself ran. This was a terrible hack.

Now, we're passing the lazygit root directory as an env var to the integration test, so
that we can set the working directory to the actual path of the test repo; removing the
need to use the --path arg.
2024-01-12 19:59:31 +11:00
c465b0f2ff Rename test/results to test/_results
This prevents commands like "go test ./..." from looking into it, and it
prevents VS Code's Problems panel from showing errors about the go files in that
folder.
2023-09-15 18:04:20 +02:00
b6c892a08a Provide a simple way to debug an integration test 2023-09-11 08:17:58 +02:00
ed1547e0cb Add a Click() primitive to the integration test library 2023-08-07 15:10:28 +01:00
a77d24fdc6 Add section in integration readme about testing against old git versions 2023-07-30 18:35:24 +10:00
f7e8b2dd71 cleanup integration test code 2023-02-26 12:54:13 +11:00
8b5d59c238 remove legacy integration tests 2023-02-26 11:34:18 +11:00
b0383ba73a update readme 2023-02-19 12:42:48 +11:00
0300bfdec2 update readme 2022-12-28 15:35:12 +11:00
47de61b57c update integration test readme 2022-12-28 10:23:59 +11:00
78b495f50a rename input to t 2022-12-27 21:35:36 +11:00
b166b8f776 combine assert and input structs, clean up interface 2022-12-27 21:26:18 +11:00
8c89069965 update readme 2022-12-26 17:51:19 +11:00
b623ecf898 add helper functions for popups in tests 2022-12-24 19:15:59 +11:00
186b7197e4 clean up some integration test stuff 2022-12-20 22:54:00 +11:00
e3c6738535 remove snapshot approach for new integration tests 2022-12-20 22:45:03 +11:00
fbac05fff7 Update README.md 2022-11-13 11:54:37 +11:00
fc0b14edef Update README.md 2022-10-11 08:40:35 -07:00
7b757d1cfe add branch rebase integration test 2022-09-09 20:55:47 -07:00
6d7a7afbbc update test readme 2022-08-15 19:24:36 +10:00
6abcfd5cba missed a spot 2022-08-14 21:39:07 +10:00
b2ae651686 add slow flag to integration tests 2022-08-14 20:49:20 +10:00
e875d6b448 ensuring you can't accidentally forget to add a test to the tests list 2022-08-14 20:49:20 +10:00
5173d7f5e1 better CLI interface 2022-08-14 17:20:52 +10:00
349a7d2453 even better structure 2022-08-14 11:24:07 +10:00
5e475355bf add tests for my tests 2022-08-13 13:56:50 +10:00
304d74370e refactor to ensure code doesn't depend on integration code 2022-08-13 13:56:50 +10:00
ae798157d2 update comments 2022-08-13 13:55:08 +10:00
a45b22e12f re-name Input and improve documentation 2022-08-13 13:55:08 +10:00
ba96baee32 move code from main into app package to allow test to be injected 2022-08-13 13:55:08 +10:00