промежуточный. немного изменил отображение задач сапфора. сравнение в процессе
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
package TestingSystem.SAPFOR.SapforTask;
|
||||
import Common.Constants;
|
||||
import Common.Current;
|
||||
import Common.Database.DBObject;
|
||||
import Common.Utils.Utils;
|
||||
import GlobalData.Tasks.TaskState;
|
||||
@@ -58,7 +57,7 @@ public class SapforTask extends DBObject {
|
||||
// MatchState.Unknown;
|
||||
//-----------
|
||||
public String getUniqueKey() {
|
||||
return sapfor_configuration_id + "_" + group_description + "_" + test_description;
|
||||
return group_description + "_" + test_description + "_" +sapfor_configuration_id;
|
||||
}
|
||||
public String getSummary() {
|
||||
Vector<String> lines = new Vector<>();
|
||||
@@ -85,19 +84,19 @@ public class SapforTask extends DBObject {
|
||||
root = child;
|
||||
parent = child;
|
||||
} else {
|
||||
if (!child.state.equals(SapforVersionState.Empty)) {
|
||||
// if (!child.state.equals(SapforVersionState.Empty)) {
|
||||
parent.add(child);
|
||||
parent = child;
|
||||
}
|
||||
// }
|
||||
}
|
||||
//-
|
||||
}
|
||||
if (parent != null) {
|
||||
for (SapforVersion_json version_json : variants) {
|
||||
version_json.task = this;
|
||||
if (!child.state.equals(SapforVersionState.Empty)) {
|
||||
// if (!child.state.equals(SapforVersionState.Empty)) {
|
||||
parent.add(new VersionSummary(version_json, version_json.init(configurationRoot)));
|
||||
}
|
||||
// }
|
||||
}
|
||||
}
|
||||
//--
|
||||
@@ -196,4 +195,35 @@ public class SapforTask extends DBObject {
|
||||
public Date getChangeDate() {
|
||||
return new Date(ChangeDate);
|
||||
}
|
||||
@Override
|
||||
public String toString() {
|
||||
return
|
||||
"группа "+Utils.Brackets(group_description)+" тест "+Utils.Brackets(test_description)+" конфигурация "+Utils.Brackets(sapfor_configuration_id);
|
||||
// getUniqueKey();
|
||||
}
|
||||
public String getPassesInfo(){
|
||||
String res = "";
|
||||
String [] data = codes.split(" ");
|
||||
Vector<String> strings = new Vector<>();
|
||||
for (String code_s: data){
|
||||
PassCode_2021 code = PassCode_2021.valueOf(code_s);
|
||||
strings.add(Utils.Brackets(code.getDescription()));
|
||||
}
|
||||
return String.join("→", strings);
|
||||
}
|
||||
//---
|
||||
public DefaultMutableTreeNode getNode(File configurationRoot) {
|
||||
DefaultMutableTreeNode res = new DefaultMutableTreeNode(this);
|
||||
DefaultMutableTreeNode flags_info = new DefaultMutableTreeNode("флаги: "+this.flags);
|
||||
DefaultMutableTreeNode passes_info = new DefaultMutableTreeNode("проходы: "+getPassesInfo());
|
||||
//-
|
||||
int total_versions_count = versions.size()+variants.size();
|
||||
DefaultMutableTreeNode versions_info = new DefaultMutableTreeNode("версии: "+total_versions_count);
|
||||
versions_info.add(getVersionsTree(configurationRoot));
|
||||
//--
|
||||
res.add(flags_info);
|
||||
res.add(passes_info);
|
||||
res.add(versions_info);
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user