-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Add more end2end tests for tree tabs feature #8102
Add more end2end tests for tree tabs feature #8102
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for more tests! And sorry for the long delay for such a straightforward PR, I'll try to be more prompt in the future.
I can see that the new tests all cover new functionality and they all pass. But might I suggest that some of them are too trusting? Specifically:
- the
tab-next
andtab-prev
tests have the same setup and assertion. If I can swap one command out for the other, how do I know that the two commands actually have different functionality, they must just be aliases! - the
tab-focus parent
test would pass withtab-focus prev
as well right? Oh we don't support that. Anyhow, if it actually skipped a sibling to go up to the parent I think it would demonstrate what it is doing better.
I don't think the :tab-focus parent
one is working correctly. I think it should only focus the immediate parent, not the grandparent or root like the test says. I think the problem here is that since tab 3 is already focused tab-focus 3
ends up switching away from the active tab to the previous tab, tab 2. Who's parent then (correctly) gets focused by tab-focus parent
.
@toofar, thanks for your thorough review! ..and apologies for letting it just sit there for the past couple of days. |
de2e201
to
18a14bd
Compare
@toofar, I updated the
After inspecting the session, it seems that the order of tabs is off. The children of Full session data
I would expect the session to reflect the same order in which tabs are opened in the end2end test:
With this change the test passes: diff --git a/tests/end2end/features/treetabs.feature b/tests/end2end/features/treetabs.feature
index 56f744fc4..da6c8b118 100644
--- a/tests/end2end/features/treetabs.feature
+++ b/tests/end2end/features/treetabs.feature
@@ -54,8 +54,8 @@ Feature: Tree tab management
And I run :tab-focus parent
Then the following tabs should be open:
- data/numbers/1.txt (active)
- - data/numbers/2.txt
- data/numbers/3.txt
+ - data/numbers/2.txt
Scenario: :tab-close --recursive
When I open data/numbers/1.txt Any idea why that is? P.S. |
gasp how could you! My code is always perfect! What I find useful as the first step in these situations is to run through the steps manually and to see if the test results are accurate, or if I need to add a bunch more debugging. Eg:
And I'm seeing: There is the setting |
Forgive me, master. Never shall I place your code in doubt again. 🙏
Thanks for that insight. This confirms my findings from checking the raw session data.
I don't want to add behavioral changes to the mix in this PR, as it's about adding characterization tests; and since it's not a bug, I would move the discussion about ergonomics to a separate issue (e.g. #8075). |
380c13b
to
0dff117
Compare
It still amazes me how I could have missed that symmetry. |
0dff117
to
3424ec3
Compare
Now the |
3424ec3
to
138b023
Compare
Debugging was easier than expected.
This exact thing bit me again! Moving forward with adding tests for:
|
This suffix will reduce some boilerplate of setting up a tree tab structure in end2end tests.
fc9a102
to
dad5482
Compare
I played around with
I will need to sit down and document my findings with a fresh mind. |
dad5482
to
089cdbe
Compare
089cdbe
to
30845ce
Compare
@toofar, whenever you get a chance, this is ready to be reviewed. As usual your feedback is very much appreciated and valued! Even though I wanted to add more tests, I would like to get this merged now as I find myself lacking motivation to keep digging for more tests. Better to get at least these tests in than to let this PR go stale. |
@pylbrecht sorry I managed to miss your message somehow! Will have a look tomorrow. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, we've got twice as many tests now and they all look good to me!
Would have been nice to have more coverage for tab-move but we can add more later.. I opened #8167 for the issue you found with :tab-move end
.
I'll try merging the main branch into the tree-tabs-integration branch too to improve flaky tests.
7ab4346
into
qutebrowser:tree-tabs-integration
Thanks for opening the issue. |
I simply translated parts of @toofar's superb documentation into end2end tests.
Covering
:tab-close
without--recursive
:tab-next --sibling
:tab-prev --sibling
:tab-focus parent
:tab-move <index>
Fixes part of #8072