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

[Test Explorer] Cannot see the added test item in the explorer when it's overflow the explorer height #126163

Closed
jdneo opened this issue Jun 13, 2021 · 5 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders testing Built-in testing support verified Verification succeeded
Milestone

Comments

@jdneo
Copy link
Member

jdneo commented Jun 13, 2021

Does this issue occur when all extensions are disabled?: Yes/No

Version: 1.58.0-insider (user setup)
Commit: 012b146
Date: 2021-06-11T05:14:11.473Z
Electron: 12.0.9
Chrome: 89.0.4389.128
Node.js: 14.16.0
V8: 8.9.255.25-electron.0
OS: Windows_NT x64 10.0.19043

Steps to Reproduce:

  1. In the project test-provider-sample add a test child in the run() method of TestCase
if (actual === this.expected) {
   ...
} else {
    const child1 = vscode.test.createTestItem<TestCase>({
        id: `mktests/${this.item.uri!.toString()}/${this.item.label}#1`,
        label: this.item.label,
        uri: this.item.uri!,
    });
    child1.range = this.item.range;
    this.item.addChild(child1);
    const message = vscode.TestMessage.diff(`Expected ${this.item.label}`, String(this.expected), String(actual));
    ...
}
  1. Add some more tests in the markdown file and shrink the height of the vs code window
  2. Run a markdown file
  3. The newly added test case will be overflow and cannot be seen in the test explorer
  4. The scroll bar will get updated when the height of vs code is changed
2.mp4

//cc @connor4312 for awareness, but this might be an issue of explorer view

@connor4312
Copy link
Member

cc @joaomoreno it seems that adding a child via setChildren doesn't trigger the tree ti check scroll height. Resizing the window by 1px fixes it. Is there guidance on what should happen here?

@connor4312 connor4312 added the tree-views Extension tree view issues label Jun 14, 2021
@connor4312 connor4312 added testing Built-in testing support tree-widget Tree widget issues and removed tree-views Extension tree view issues labels Jun 14, 2021
@joaomoreno
Copy link
Member

Resizing the window by 1px fixes it.

This usually means we haven't called tree.layout() every time we should've.

This looks very suspicious: https://github.com/microsoft/vscode/blob/274cbd8e0541b02a71ddcd3a7f043e9291a47a69/src/vs/workbench/contrib/testing/browser/testingExplorerView.ts/#L432-L437

We should be forwarding those dimensions down to the tree here instead: https://github.com/microsoft/vscode/blob/274cbd8e0541b02a71ddcd3a7f043e9291a47a69/src/vs/workbench/contrib/testing/browser/testingExplorerView.ts/#L205-L212

@connor4312
Copy link
Member

Ah, nevermind, I found the issue 🙂 It's this message. Initially it's hidden, but then when we show it later we don't adjust the height of the tree to compensate for it.

@connor4312 connor4312 added bug Issue identified by VS Code Team member as probable bug and removed tree-widget Tree widget issues labels Jun 15, 2021
@connor4312 connor4312 added this to the June 2021 milestone Jun 15, 2021
@TylerLeonhardt TylerLeonhardt added the author-verification-requested Issues potentially verifiable by issue author label Jul 1, 2021
@jdneo
Copy link
Member Author

jdneo commented Jul 2, 2021

/verified

@joaomoreno joaomoreno removed their assignment Jul 6, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Jul 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders testing Built-in testing support verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants
@joaomoreno @connor4312 @TylerLeonhardt @jdneo and others