Skip to content

Commit

Permalink
fix: unittest
Browse files Browse the repository at this point in the history
  • Loading branch information
xucong053 committed Dec 19, 2022
1 parent 909fb4c commit dfa31f0
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion hrp/pkg/uixt/algorithm.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func (i *ImageTemplate) read() (imageBuffer *bytes.Buffer, err error) {
// extendCV 获得扩展后的 Driver,
// 并指定匹配阀值,
// 获取当前设备的 Scale,
func extendCV(driver WebDriver, options ...CVOption) (dExt *DriverExt, err error) {
func (dExt *DriverExt) extendCV(options ...CVOption) (err error) {
for _, option := range options {
option(&dExt.CVArgs)
}
Expand Down
2 changes: 1 addition & 1 deletion hrp/pkg/uixt/cp_vedem.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func (s *veDEMCPService) getCPResult(sourceImage []byte) ([]CPResult, error) {
}

func (s *veDEMCPService) FindPopupCloseButton(byteSource []byte, options ...DataOption) (rect image.Rectangle, err error) {
data := NewData(map[string]interface{}{}, options...)
data := NewDataOptions(options...)

cpResults, err := s.getCPResult(byteSource)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion hrp/pkg/uixt/im_vedem.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func (s *veDEMIMService) getIMResult(searchImage []byte, sourceImage []byte) ([]
}

func (s *veDEMIMService) FindImage(byteSearch []byte, byteSource []byte, options ...DataOption) (rect image.Rectangle, err error) {
data := NewData(map[string]interface{}{}, options...)
data := NewDataOptions(options...)

cvResults, err := s.getIMResult(byteSearch, byteSource)
if err != nil {
Expand Down
2 changes: 0 additions & 2 deletions hrp/step_mobile_ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@ var (
WithUDID = uixt.WithUDID
WithWDAPort = uixt.WithWDAPort
WithWDAMjpegPort = uixt.WithWDAMjpegPort
WithLogOn = uixt.WithLogOn
WithResetHomeOnStartup = uixt.WithResetHomeOnStartup
WithSnapshotMaxDepth = uixt.WithSnapshotMaxDepth
WithAcceptAlertButtonSelector = uixt.WithAcceptAlertButtonSelector
WithDismissAlertButtonSelector = uixt.WithDismissAlertButtonSelector
WithClosePopup = uixt.WithClosePopup
WithPerfOptions = uixt.WithPerfOptions
)

// android setting options
Expand Down

0 comments on commit dfa31f0

Please sign in to comment.