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

Fixed jumping to failed tests in summary #113

Merged
merged 1 commit into from
May 5, 2022
Merged

Fixed jumping to failed tests in summary #113

merged 1 commit into from
May 5, 2022

Conversation

mkonig
Copy link
Contributor

@mkonig mkonig commented Apr 29, 2022

No description provided.

@rcarriga
Copy link
Owner

rcarriga commented May 1, 2022

Hi thanks for the PR, but I'm not sure I'm seeing the issue. Can you describe what problem you're having?

@mkonig
Copy link
Contributor Author

mkonig commented May 2, 2022

Hi.
User problem: I can not navigate to the next failing test case inside of the summary if test cases of multiple files are displayed and the next failing test case is in the last displayed file.

Code issue:
The issue is that the while loop uses len(s:test_line_map) and uses index like an index of a list.
But test_line_map is a dictionary.
If you have test cases in the summary from multiple files (separated by empty lines) the keys of test_line_map represent the actual line number in the summary where the test is printed.
let s:test_line_map[len(a:group_state.lines)] = [a:test.file, a:test.id]
But because of the empty lines the last keys of the dict are not accessible if one uses len(s:test_line_map) as the max index.

My idea was to go through the summary buffer line by line and check each line for a failing test case.

@rcarriga
Copy link
Owner

rcarriga commented May 5, 2022

Ah that makes sense thanks for the PR!

@rcarriga rcarriga merged commit 6978fd3 into rcarriga:master May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants