|
@@ -24,6 +24,7 @@ class ViewController : NSViewController, SettingViewControllerDelegate, AutoTest
|
|
|
@IBOutlet var replaceAllBtn : NSButton!
|
|
|
@IBOutlet var exportReportBtn : NSButton!
|
|
|
@IBOutlet var advanceBtn : NSButton!
|
|
|
+ @IBOutlet var latestResultBtn : NSButton!
|
|
|
|
|
|
var operateQueue = OperationQueue()
|
|
|
var _isProcessing : Bool!
|
|
@@ -323,9 +324,11 @@ class ViewController : NSViewController, SettingViewControllerDelegate, AutoTest
|
|
|
let type = ti["Type"] as! NSString
|
|
|
|
|
|
let testObject = AutoTest.autoTestFor(fileType as NSString, type: type)
|
|
|
- let tFiles = testObject?.compareFiles();
|
|
|
- if (tFiles != nil && tFiles?.count != 0) {
|
|
|
- files.addObjects(from: tFiles as! [Any])
|
|
|
+ if (testObject?.selectedKeys().count != 0) {
|
|
|
+ let tFiles = testObject?.compareFiles();
|
|
|
+ if (tFiles != nil && tFiles?.count != 0) {
|
|
|
+ files.addObjects(from: tFiles as! [Any])
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -338,7 +341,25 @@ class ViewController : NSViewController, SettingViewControllerDelegate, AutoTest
|
|
|
compareVC.showIn(self.view.window?.contentView ?? self.view, rect: NSRect.init(origin: point, size: sender.frame.size))
|
|
|
}
|
|
|
return
|
|
|
+ }
|
|
|
+
|
|
|
+ @IBAction func showLatestReportAction(_ sender:NSButton) {
|
|
|
+ latestResultBtn.isHidden = true;
|
|
|
|
|
|
+ for fileType in testFileTypes {
|
|
|
+ let types = testTypeInfo[fileType] as! NSArray
|
|
|
+ for typeInfo in types {
|
|
|
+ let ti = typeInfo as! NSDictionary
|
|
|
+ let type = ti["Type"] as! NSString
|
|
|
+
|
|
|
+ let testObject = AutoTest.autoTestFor(fileType as NSString, type: type)
|
|
|
+
|
|
|
+ if (testObject?.selectedKeys().count ?? 0 > 0) {
|
|
|
+ testObject?.setStatus(.Finished)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ self.reloadListData()
|
|
|
}
|
|
|
|
|
|
|