Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: incorrect espresso and xcuitest flags #999

Merged
merged 7 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 42 additions & 13 deletions api/saucectl.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1124,14 +1124,6 @@
"description": "Overwrite app settings for real device to enable screenshot restriction.",
"type": "boolean"
},
"groupFolderRedirect": {
"description": "Overwrite app settings for real device to redirect group folder.",
"type": "boolean"
},
"sysAlertsDelay": {
"description": "Overwrite app settings for real device to delay system alerts.",
"type": "boolean"
},
"vitals": {
"description": "Overwrite app settings for real device to enable vitals.",
"type": "boolean"
Expand All @@ -1143,10 +1135,6 @@
"biometrics": {
"description": "Overwrite app settings for real device to intercept biometric authentication.",
"type": "boolean"
},
"groupDirectory": {
"description": "Overwrite app settings for real device to enable group directory access.",
"type": "boolean"
}
}
}
Expand Down Expand Up @@ -2160,7 +2148,48 @@
"additionalProperties": false
},
"appSettings": {
"$ref": "#/allOf/1/then/properties/suites/items/properties/appSettings"
"description": "Overwrite real device settings.",
"type": "object",
"properties": {
"resigningEnabled": {
"description": "Overwrite app settings for real device to enable app resigning.",
"type": "boolean"
},
"audioCapture": {
"description": "Overwrite app settings for real device to capture audio.",
"type": "boolean"
},
"instrumentation": {
"description": "Overwrite app settings for real device instrumentation.",
"type": "object",
"properties": {
"imageInjection": {
"description": "Overwrite app settings for real device to inject provided images in the user app.",
"type": "boolean"
},
"sysAlertsDelay": {
"description": "Overwrite app settings for real device to delay system alerts.",
"type": "boolean"
},
"vitals": {
"description": "Overwrite app settings for real device to enable vitals.",
"type": "boolean"
},
"networkCapture": {
"description": "Overwrite app settings for real device to capture network.",
"type": "boolean"
},
"biometrics": {
"description": "Overwrite app settings for real device to intercept biometric authentication.",
"type": "boolean"
},
"groupDirectory": {
"description": "Overwrite app settings for real device to enable group directory access.",
"type": "boolean"
}
}
}
}
},
"simulators": {
"description": "Defines details for running this suite on virtual devices using a simulator.",
Expand Down
52 changes: 0 additions & 52 deletions api/v1/subschema/common.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,58 +58,6 @@
"description": "Exclude test files to skip the tests.",
"type": "array"
},
"appSettings": {
"description": "Overwrite real device settings.",
"type": "object",
"properties": {
"resigningEnabled": {
"description": "Overwrite app settings for real device to enable app resigning.",
"type": "boolean"
},
"audioCapture": {
"description": "Overwrite app settings for real device to capture audio.",
"type": "boolean"
},
"instrumentation": {
"description": "Overwrite app settings for real device instrumentation.",
"type": "object",
"properties": {
"imageInjection": {
"description": "Overwrite app settings for real device to inject provided images in the user app.",
"type": "boolean"
},
"bypassScreenshotRestriction": {
"description": "Overwrite app settings for real device to enable screenshot restriction.",
"type": "boolean"
},
"groupFolderRedirect": {
"description": "Overwrite app settings for real device to redirect group folder.",
"type": "boolean"
},
"sysAlertsDelay": {
"description": "Overwrite app settings for real device to delay system alerts.",
"type": "boolean"
},
"vitals": {
"description": "Overwrite app settings for real device to enable vitals.",
"type": "boolean"
},
"networkCapture": {
"description": "Overwrite app settings for real device to capture network.",
"type": "boolean"
},
"biometrics": {
"description": "Overwrite app settings for real device to intercept biometric authentication.",
"type": "boolean"
},
"groupDirectory": {
"description": "Overwrite app settings for real device to enable group directory access.",
"type": "boolean"
}
}
}
}
},
"timeZone": {
"description": "Specifies the timeZone for the suite.",
"type": "string"
Expand Down
40 changes: 38 additions & 2 deletions api/v1alpha/framework/espresso.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,44 @@
"$ref": "../subschema/common.schema.json#/definitions/timeout"
},
"appSettings": {
"$ref": "../subschema/common.schema.json#/definitions/appSettings"
"description": "Overwrite real device settings.",
"type": "object",
"properties": {
"resigningEnabled": {
"description": "Overwrite app settings for real device to enable app resigning.",
"type": "boolean"
},
"audioCapture": {
"description": "Overwrite app settings for real device to capture audio.",
"type": "boolean"
},
"instrumentation": {
"description": "Overwrite app settings for real device instrumentation.",
"type": "object",
"properties": {
"imageInjection": {
"description": "Overwrite app settings for real device to inject provided images in the user app.",
"type": "boolean"
},
"bypassScreenshotRestriction": {
"description": "Overwrite app settings for real device to enable screenshot restriction.",
"type": "boolean"
},
"vitals": {
"description": "Overwrite app settings for real device to enable vitals.",
"type": "boolean"
},
"networkCapture": {
"description": "Overwrite app settings for real device to capture network.",
"type": "boolean"
},
"biometrics": {
"description": "Overwrite app settings for real device to intercept biometric authentication.",
"type": "boolean"
}
}
}
}
},
"passThreshold": {
"$ref": "../subschema/common.schema.json#/definitions/passThreshold"
Expand Down Expand Up @@ -315,4 +352,3 @@
],
"additionalProperties": true
}

43 changes: 42 additions & 1 deletion api/v1alpha/framework/xcuitest.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,48 @@
"additionalProperties": false
},
"appSettings": {
"$ref": "../subschema/common.schema.json#/definitions/appSettings"
"description": "Overwrite real device settings.",
"type": "object",
"properties": {
"resigningEnabled": {
"description": "Overwrite app settings for real device to enable app resigning.",
"type": "boolean"
},
"audioCapture": {
"description": "Overwrite app settings for real device to capture audio.",
"type": "boolean"
},
"instrumentation": {
"description": "Overwrite app settings for real device instrumentation.",
"type": "object",
"properties": {
"imageInjection": {
"description": "Overwrite app settings for real device to inject provided images in the user app.",
"type": "boolean"
},
"sysAlertsDelay": {
"description": "Overwrite app settings for real device to delay system alerts.",
"type": "boolean"
},
"vitals": {
"description": "Overwrite app settings for real device to enable vitals.",
"type": "boolean"
},
"networkCapture": {
"description": "Overwrite app settings for real device to capture network.",
"type": "boolean"
},
"biometrics": {
"description": "Overwrite app settings for real device to intercept biometric authentication.",
"type": "boolean"
},
"groupDirectory": {
"description": "Overwrite app settings for real device to enable group directory access.",
"type": "boolean"
}
}
}
}
},
"simulators": {
"description": "Defines details for running this suite on virtual devices using a simulator.",
Expand Down
52 changes: 0 additions & 52 deletions api/v1alpha/subschema/common.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,58 +58,6 @@
"description": "Exclude test files to skip the tests.",
"type": "array"
},
"appSettings": {
"description": "Overwrite real device settings.",
"type": "object",
"properties": {
"resigningEnabled": {
"description": "Overwrite app settings for real device to enable app resigning.",
"type": "boolean"
},
"audioCapture": {
"description": "Overwrite app settings for real device to capture audio.",
"type": "boolean"
},
"instrumentation": {
"description": "Overwrite app settings for real device instrumentation.",
"type": "object",
"properties": {
"imageInjection": {
"description": "Overwrite app settings for real device to inject provided images in the user app.",
"type": "boolean"
},
"bypassScreenshotRestriction": {
"description": "Overwrite app settings for real device to enable screenshot restriction.",
"type": "boolean"
},
"groupFolderRedirect": {
"description": "Overwrite app settings for real device to redirect group folder.",
"type": "boolean"
},
"sysAlertsDelay": {
"description": "Overwrite app settings for real device to delay system alerts.",
"type": "boolean"
},
"vitals": {
"description": "Overwrite app settings for real device to enable vitals.",
"type": "boolean"
},
"networkCapture": {
"description": "Overwrite app settings for real device to capture network.",
"type": "boolean"
},
"biometrics": {
"description": "Overwrite app settings for real device to intercept biometric authentication.",
"type": "boolean"
},
"groupDirectory": {
"description": "Overwrite app settings for real device to enable group directory access.",
"type": "boolean"
}
}
}
}
},
"timeZone": {
"description": "Specifies the timeZone for the suite.",
"type": "string"
Expand Down
3 changes: 0 additions & 3 deletions internal/cmd/run/espresso.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,9 @@ func NewEspressoCmd() *cobra.Command {
sc.Bool("audioCapture", "suite::appSettings::audioCapture", false, "Overwrite app settings for real device to capture audio.")
sc.Bool("imageInjection", "suite::appSettings::instrumentation::imageInjection", false, "Overwrite app settings for real device to inject provided images in the user app.")
sc.Bool("bypassScreenshotRestriction", "suite::appSettings::instrumentation::bypassScreenshotRestriction", false, "Overwrite app settings for real device to enable screenshot restriction.")
sc.Bool("groupFolderRedirect", "suite::appSettings::instrumentation::groupFolderRedirect", false, "Overwrite app settings for real device to redirect group folder.")
sc.Bool("sysAlertsDelay", "suite::appSettings::instrumentation::sysAlertsDelay", false, "Overwrite app settings for real device to delay system alerts.")
sc.Bool("vitals", "suite::appSettings::instrumentation::vitals", false, "Overwrite app settings for real device to enable vitals.")
sc.Bool("networkCapture", "suite::appSettings::instrumentation::networkCapture", false, "Overwrite app settings for real device to capture network.")
sc.Bool("biometrics", "suite::appSettings::instrumentation::biometrics", false, "Overwrite app settings for real device to intercept biometric authentication.")
sc.Bool("groupDirectory", "suite::appSettings::instrumentation::groupDirectory", false, "Overwrite app settings for real device to enable group directory access.")

return cmd
}
Expand Down
2 changes: 0 additions & 2 deletions internal/cmd/run/xcuitest.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ func NewXCUITestCmd() *cobra.Command {
sc.Bool("resigningEnabled", "suite::appSettings::resigningEnabled", false, "Overwrite app settings for real device to enable app resigning.")
sc.Bool("audioCapture", "suite::appSettings::audioCapture", false, "Overwrite app settings for real device to capture audio.")
sc.Bool("imageInjection", "suite::appSettings::instrumentation::imageInjection", false, "Overwrite app settings for real device to inject provided images in the user app.")
sc.Bool("bypassScreenshotRestriction", "suite::appSettings::instrumentation::bypassScreenshotRestriction", false, "Overwrite app settings for real device to enable screenshot restriction.")
sc.Bool("groupFolderRedirect", "suite::appSettings::instrumentation::groupFolderRedirect", false, "Overwrite app settings for real device to redirect group folder.")
sc.Bool("sysAlertsDelay", "suite::appSettings::instrumentation::sysAlertsDelay", false, "Overwrite app settings for real device to delay system alerts.")
sc.Bool("vitals", "suite::appSettings::instrumentation::vitals", false, "Overwrite app settings for real device to enable vitals.")
sc.Bool("networkCapture", "suite::appSettings::instrumentation::networkCapture", false, "Overwrite app settings for real device to capture network.")
Expand Down
2 changes: 1 addition & 1 deletion internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ type AppSettings struct {
type Instrumentation struct {
ImageInjection bool `yaml:"imageInjection,omitempty" json:"imageInjection"`
BypassScreenshotRestriction bool `yaml:"bypassScreenshotRestriction,omitempty" json:"bypassScreenshotRestriction"`
GroupFolderRedirect bool `yaml:"groupDirectory,omitempty" json:"groupDirectory"`
GroupDirectory bool `yaml:"groupDirectory,omitempty" json:"groupDirectory"`
SysAlertsDelay bool `yaml:"sysAlertsDelay,omitempty" json:"sysAlertsDelay"`
Biometrics bool `yaml:"biometrics,omitempty" json:"biometrics"`
Vitals bool `yaml:"vitals,omitempty" json:"vitals"`
Expand Down
2 changes: 1 addition & 1 deletion internal/job/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ type Instrumentation struct {
type Resigning struct {
ImageInjection bool `json:"image_injection,omitempty"`
SystemAlertsDelay bool `json:"sys_alerts_delay,omitempty"`
GroupFolderRedirect bool `json:"group_directory,omitempty"`
GroupDirectory bool `json:"group_directory,omitempty"`
BiometricsInterception bool `json:"biometrics,omitempty"`
Vitals bool `json:"vitals,omitempty"`
NetworkCapture bool `json:"network_capture,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion internal/saucecloud/xcuitest.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ func (r *XcuitestRunner) startJob(jobOpts chan<- job.StartOptions, appFileID, te
AudioCapture: s.AppSettings.AudioCapture,
Resigning: job.Resigning{
ImageInjection: s.AppSettings.Instrumentation.ImageInjection,
GroupFolderRedirect: s.AppSettings.Instrumentation.GroupFolderRedirect,
GroupDirectory: s.AppSettings.Instrumentation.GroupDirectory,
SystemAlertsDelay: s.AppSettings.Instrumentation.SysAlertsDelay,
BiometricsInterception: s.AppSettings.Instrumentation.Biometrics,
Vitals: s.AppSettings.Instrumentation.Vitals,
Expand Down
Loading