protractor: clear out '.' and 'F' characters emitted by default protractor reporter for single capabilities

This commit is contained in:
Sergey Simonchik
2016-11-03 12:25:09 +03:00
parent b41a6e5cba
commit dcf7a81743
2 changed files with 16 additions and 1 deletions
@@ -52,9 +52,13 @@ public class OutputToGeneralTestEventsConverter implements ProcessOutputConsumer
private boolean myPendingLineBreakFlag;
public OutputToGeneralTestEventsConverter(@NotNull String testFrameworkName, @NotNull TestConsoleProperties consoleProperties) {
this(testFrameworkName, consoleProperties.isEditable());
}
public OutputToGeneralTestEventsConverter(@NotNull String testFrameworkName, boolean stdinEnabled) {
myTestFrameworkName = testFrameworkName;
myServiceMessageVisitor = new MyServiceMessageVisitor();
mySplitter = new OutputLineSplitter(consoleProperties.isEditable()) {
mySplitter = new OutputLineSplitter(stdinEnabled) {
@Override
protected void onLineAvailable(@NotNull String text, @NotNull Key outputType, boolean tcLikeFakeOutput) {
processConsistentText(text, outputType, tcLikeFakeOutput);
@@ -18,14 +18,19 @@ package com.intellij.execution.testframework.sm.runner;
import com.intellij.execution.testframework.sm.runner.events.*;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Key;
import com.intellij.openapi.util.Pair;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.ArrayList;
import java.util.List;
/**
* @author Roman.Chernyatchik
*/
public class MockGeneralTestEventsProcessorAdapter extends GeneralTestEventsProcessor {
private final StringBuilder myOutputBuffer = new StringBuilder();
private final List<Pair<String, Key>> myOutputChunks = new ArrayList<>();
public MockGeneralTestEventsProcessorAdapter(Project project, String testFrameworkName) {
super(project, testFrameworkName);
@@ -70,6 +75,7 @@ public class MockGeneralTestEventsProcessorAdapter extends GeneralTestEventsProc
@Override
public void onUncapturedOutput(@NotNull String text, Key outputType) {
myOutputBuffer.append("[").append(outputType.toString()).append("]").append(text);
myOutputChunks.add(Pair.create(text, outputType));
}
@Override
@@ -121,4 +127,9 @@ public class MockGeneralTestEventsProcessorAdapter extends GeneralTestEventsProc
public String getOutput() {
return myOutputBuffer.toString();
}
@NotNull
public List<Pair<String, Key>> getUncapturedOutputChunks() {
return myOutputChunks;
}
}