mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
all tests passed except ignored message on root node without children (IDEA-184623)
This commit is contained in:
@@ -17,6 +17,7 @@ sm.test.runner.ui.tests.tree.presentation.labels.test.reporter.not.attached=Test
|
||||
sm.test.runner.ui.tests.tree.presentation.labels.no.tests.were.found.with.errors=No tests were found. Errors occurred
|
||||
sm.test.runner.ui.tests.tree.presentation.labels.empty.test.suite=Empty test suite
|
||||
sm.test.runner.ui.tests.tree.presentation.labels.all.tests.passed=All Tests Passed
|
||||
sm.test.runner.ui.tests.tree.presentation.labels.all.but.ignored.passed=All Tests Passed (except ignored)
|
||||
sm.test.runner.ui.tests.tree.presentation.labels.test.noname=<no name>
|
||||
|
||||
sm.test.runner.ui.tabs.statistics.columns.test.title=Test
|
||||
|
||||
+6
@@ -167,6 +167,12 @@ public class TestsPresentationUtil {
|
||||
"sm.test.runner.ui.tests.tree.presentation.labels.all.tests.passed"),
|
||||
SimpleTextAttributes.REGULAR_ATTRIBUTES);
|
||||
}
|
||||
else if (magnitude == TestStateInfo.Magnitude.IGNORED_INDEX && !testProxy.hasErrors()) {
|
||||
renderer.setIcon(PoolOfTestIcons.IGNORED_ICON);
|
||||
renderer.append(SMTestsRunnerBundle.message(
|
||||
"sm.test.runner.ui.tests.tree.presentation.labels.all.but.ignored.passed"),
|
||||
SimpleTextAttributes.REGULAR_ATTRIBUTES );
|
||||
}
|
||||
else {
|
||||
if (!testProxy.getChildren().isEmpty()) {
|
||||
// some times test proxy may be updated faster than tests tree
|
||||
|
||||
+17
@@ -611,6 +611,23 @@ public class TestsPresentationUtilTest extends BaseSMTRunnerTestCase {
|
||||
assertEquals(SimpleTextAttributes.REGULAR_ATTRIBUTES, myFragContainer.getAttribsAt(0));
|
||||
}
|
||||
|
||||
public void testFormatRootNodeIgnored() {
|
||||
mySMRootTestProxy.setTestsReporterAttached();
|
||||
// See [PY-2434] Unittest: Do not show "No test were found" notification before completing test suite
|
||||
mySMRootTestProxy.addChild(mySimpleTest);
|
||||
mySMRootTestProxy.setStarted();
|
||||
mySimpleTest.setStarted();
|
||||
mySimpleTest.setTestIgnored(null, null);
|
||||
mySimpleTest.setFinished();
|
||||
mySMRootTestProxy.setFinished();
|
||||
TestsPresentationUtil.formatRootNodeWithoutChildren(mySMRootTestProxy, myRenderer);
|
||||
|
||||
assertEquals(PoolOfTestIcons.IGNORED_ICON, myRenderer.getIcon());
|
||||
assertOneElement(myFragContainer.getFragments());
|
||||
assertEquals("All Tests Passed (except ignored)", myFragContainer.getTextAt(0));
|
||||
assertEquals(SimpleTextAttributes.REGULAR_ATTRIBUTES, myFragContainer.getAttribsAt(0));
|
||||
}
|
||||
|
||||
|
||||
public void testGetPresentableName() {
|
||||
//Test unit examples
|
||||
|
||||
Reference in New Issue
Block a user