Skip to content

Commit

Permalink
feat: Support statusBarOverrideTime for XCUITest Sim (#847)
Browse files Browse the repository at this point in the history
  • Loading branch information
tianfeng92 authored Oct 30, 2023
1 parent abbff11 commit 5121075
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions api/saucectl.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2219,6 +2219,10 @@
"defaultTestExecutionTimeAllowance": {
"description": "The default execution time, in seconds, an individual test is given to execute if test timeouts are enabled. Supported on Simulators only.",
"type": "number"
},
"statusBarOverrideTime": {
"description": "Modify the time displayed on the status bar. Supported on Simulators only.",
"type": "string"
}
},
"additionalProperties": false
Expand Down
4 changes: 4 additions & 0 deletions api/v1alpha/framework/xcuitest.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@
"defaultTestExecutionTimeAllowance": {
"description": "The default execution time, in seconds, an individual test is given to execute if test timeouts are enabled. Supported on Simulators only.",
"type": "number"
},
"statusBarOverrideTime": {
"description": "Modify the time displayed on the status bar. Supported on Simulators only.",
"type": "string"
}
},
"additionalProperties": false
Expand Down
1 change: 1 addition & 0 deletions internal/xcuitest/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ type TestOptions struct {
TestTimeoutsEnabled string `yaml:"testTimeoutsEnabled,omitempty" json:"testTimeoutsEnabled"`
MaximumTestExecutionTimeAllowance int `yaml:"maximumTestExecutionTimeAllowance,omitempty" json:"maximumTestExecutionTimeAllowance"`
DefaultTestExecutionTimeAllowance int `yaml:"defaultTestExecutionTimeAllowance,omitempty" json:"defaultTestExecutionTimeAllowance"`
StatusBarOverrideTime string `yaml:"statusBarOverrideTime,omitempty" json:"statusBarOverrideTime"`
}

// ToMap converts the TestOptions to a map where the keys are derived from json struct tags.
Expand Down
3 changes: 2 additions & 1 deletion internal/xcuitest/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ func TestTestOptions_ToMap(t *testing.T) {
TestTimeoutsEnabled: "",
MaximumTestExecutionTimeAllowance: 20,
DefaultTestExecutionTimeAllowance: 0,
StatusBarOverrideTime: "",
}
wantLength := 7
wantLength := 8

m := opts.ToMap()

Expand Down

0 comments on commit 5121075

Please sign in to comment.