Skip to content

Commit

Permalink
testing: make ui more clear for discovery errors
Browse files Browse the repository at this point in the history
Fixes #196546
  • Loading branch information
connor4312 committed Oct 31, 2023
1 parent db16afc commit 96511b7
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .vscode-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ module.exports = defineConfig(extensions.map(extension => {
}

return config;
}));
})
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,11 @@ export const getChildrenForParent = (serialized: ISerializedTestTreeCollapseStat
: {
element,
collapsible: element.test.expand !== TestItemExpandState.NotExpandable,
collapsed: isCollapsedInSerializedTestTree(serialized, element.test.item.extId) ?? element.depth > 0
? ObjectTreeElementCollapseState.PreserveOrCollapsed
: ObjectTreeElementCollapseState.PreserveOrExpanded,
collapsed: element.test.item.error
? ObjectTreeElementCollapseState.Expanded
: (isCollapsedInSerializedTestTree(serialized, element.test.item.extId) ?? element.depth > 0
? ObjectTreeElementCollapseState.PreserveOrCollapsed
: ObjectTreeElementCollapseState.PreserveOrExpanded),
children: getChildrenForParent(serialized, rootsWithChildren, element),
}
));
Expand Down
10 changes: 10 additions & 0 deletions src/vs/workbench/contrib/testing/browser/media/testing.css
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,16 @@
display: none;
}

.test-explorer .monaco-list-row .error {
outline: 1px solid var(--vscode-inputValidation-errorBorder);
background: var(--vscode-inputValidation-errorBackground);
padding: 2px 4px;
border-radius: 2px;
margin: 3px 12px 3px 3px;
line-height: 17px;
font-size: 12px;
}

.test-explorer .monaco-list-row .error p {
margin: 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1280,8 +1280,8 @@ class TreeKeyboardNavigationLabelProvider implements IKeyboardNavigationLabelPro
}

class ListDelegate implements IListVirtualDelegate<TestExplorerTreeElement> {
getHeight(_element: TestExplorerTreeElement) {
return 22;
getHeight(element: TestExplorerTreeElement) {
return element instanceof TestTreeErrorMessage ? 17 + 10 : 22;
}

getTemplateId(element: TestExplorerTreeElement) {
Expand Down

0 comments on commit 96511b7

Please sign in to comment.