Selaa lähdekoodia

UI - 自动化测试 UI 界面调整;

zhudongyong 1 vuosi sitten
vanhempi
commit
472e477ced

BIN
KdanAutoTest/KdanAuto.xcodeproj/project.xcworkspace/xcuserdata/zhudongyong.xcuserdatad/UserInterfaceState.xcuserstate


+ 17 - 2
KdanAutoTest/KdanAuto.xcodeproj/xcuserdata/zhudongyong.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -318,8 +318,8 @@
             filePath = "KdanAuto/Class/AutoTestCase/StringAutoTest.swift"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "502"
-            endingLineNumber = "502"
+            startingLineNumber = "504"
+            endingLineNumber = "504"
             landmarkName = "readTextFile(_:)"
             landmarkType = "7">
             <Locations>
@@ -368,6 +368,21 @@
                   endingLineNumber = "502"
                   offsetFromSymbolStart = "445">
                </Location>
+               <Location
+                  uuid = "EB2A18C8-13D9-4B4E-B281-F5C3CA9A8E13 - 487ef373f16bc278"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "function signature specialization &lt;Arg[1] = Dead&gt; of KdanAuto.StringAutoTest.readTextFile(__C.NSString) -&gt; Swift.Optional&lt;Swift.String&gt;"
+                  moduleName = "KdanAuto"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Volumes/MacintoshHD/WorkSpace_zdy/Work/Git/AutoTest/KdanAutoTest/KdanAuto/Class/AutoTestCase/StringAutoTest.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "504"
+                  endingLineNumber = "504"
+                  offsetFromSymbolStart = "80">
+               </Location>
             </Locations>
          </BreakpointContent>
       </BreakpointProxy>

+ 6 - 4
KdanAutoTest/KdanAuto/Class/AutoTestCase/StringAutoTest.swift

@@ -280,8 +280,10 @@ class StringAutoTest : AutoTest {
              (A0 = B0)
              - A-1 & B-1
              (A0 != B0) & (A0 in B) & (B0 in A)
-             - 取 A0,B0最小 Range 值
+             - 取 A0,B0最小 Range 值(裁剪区域比较小时)
              - 字符串裁剪对齐
+             - 取 A0,B0最小 Range 值中字符顺序出现大的值(裁剪区域比较大时,先找出顺序最大序列,删除最小序列首字符)
+             - 字符串裁剪首字符
              (A0 != B0) & (A0 in B)
              - 存储B0到识别错误缓存
              (A0 != B0) & (B0 in A)
@@ -347,7 +349,7 @@ class StringAutoTest : AutoTest {
                                 failString = failString.appending(subr as String) as NSString
                                 resultStr = resultStr.substring(from:1) as NSString
                             }else if (rdegree > 0.2) {
-                                //‘subc' 字符串有在‘resultStr’中,但'subr'不在’checkString‘中,resultStr 往后推一
+                                //‘subr' 字符串有在‘checkString’中,但'subc'不在’checkString‘中,checkString 往后推一
                                 skipString = skipString.appending(subc as String) as NSString
                                 checkString = checkString.substring(from:1) as NSString
                             } else if (cdegree > rdegree * 2.0) {
@@ -355,7 +357,7 @@ class StringAutoTest : AutoTest {
                                 failString = failString.appending(subr as String) as NSString
                                 resultStr = resultStr.substring(from:1) as NSString
                             }else if (cdegree * 2.0 < rdegree) {
-                                //‘subc' 字符串有在‘resultStr’中,但'subr'不在’checkString‘中,resultStr 往后推一
+                                //‘subr' 字符串有在‘checkString’中,但'subc'不在’checkString‘中,checkString 往后推一
                                 skipString = skipString.appending(subc as String) as NSString
                                 checkString = checkString.substring(from:1) as NSString
                             }else if (cCount < rCount) {
@@ -363,7 +365,7 @@ class StringAutoTest : AutoTest {
                                 failString = failString.appending(subr as String) as NSString
                                 resultStr = resultStr.substring(from:1) as NSString
                             }else {
-                                //‘subc' 字符串有在‘resultStr’中,但'subr'不在’checkString‘中,resultStr 往后推一
+                                //‘subr' 字符串有在‘checkString’中,但'subc'不在’checkString‘中,checkString 往后推一
                                 skipString = skipString.appending(subc as String) as NSString
                                 checkString = checkString.substring(from:1) as NSString
                             }

+ 3 - 1
KdanAutoTest/KdanAuto/Class/CompareViewController/ImageCompareView/CompareViewController.swift

@@ -182,7 +182,9 @@ class CompareViewController: NSViewController, NSTableViewDataSource, NSTableVie
         }
         _popover.contentSize = self.view.frame.size
         
-        _popover.show(relativeTo: rect, of: view, preferredEdge: NSRectEdge.minY)
+        _popover.show(relativeTo: CGRectMake(rect.origin.x,
+                                             rect.origin.y - rect.size.height, rect.size.width, rect.size.height/2),
+                      of: view, preferredEdge: NSRectEdge.minY)
     }
     
     

+ 2 - 2
KdanAutoTest/KdanAuto/Class/CompareViewController/ImageCompareView/ImageCompareCellView.xib

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21701"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>

+ 3 - 1
KdanAutoTest/KdanAuto/Class/CompareViewController/StringCompareView/StringCompareViewController.swift

@@ -175,7 +175,9 @@ class StringCompareViewController: NSViewController, NSTableViewDataSource, NSTa
         }
         _popover.contentSize = self.view.frame.size
         
-        _popover.show(relativeTo: rect, of: view, preferredEdge: NSRectEdge.minY)
+        _popover.show(relativeTo: CGRectMake(rect.origin.x,
+                                             rect.origin.y - rect.size.height, rect.size.width, rect.size.height/2),
+                      of: view, preferredEdge: NSRectEdge.minY)
     }