Refactor (unify) TUI and CLI conftest
Small changes, but in the future this will allow us to have a shared fixtures betwen CLI and TUI conftest. However this will require package moving so this won't be done for now as there is a lot of ongoing work in TUI tests