From 5121075db892fd72a9e10256f9e3159f60b534e2 Mon Sep 17 00:00:00 2001 From: Tian Feng Date: Mon, 30 Oct 2023 13:18:49 -0700 Subject: [PATCH] feat: Support statusBarOverrideTime for XCUITest Sim (#847) --- api/saucectl.schema.json | 4 ++++ api/v1alpha/framework/xcuitest.schema.json | 4 ++++ internal/xcuitest/config.go | 1 + internal/xcuitest/config_test.go | 3 ++- 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/api/saucectl.schema.json b/api/saucectl.schema.json index 00d64d608..7ea6e9722 100644 --- a/api/saucectl.schema.json +++ b/api/saucectl.schema.json @@ -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 diff --git a/api/v1alpha/framework/xcuitest.schema.json b/api/v1alpha/framework/xcuitest.schema.json index 1e463a797..73351cf1d 100644 --- a/api/v1alpha/framework/xcuitest.schema.json +++ b/api/v1alpha/framework/xcuitest.schema.json @@ -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 diff --git a/internal/xcuitest/config.go b/internal/xcuitest/config.go index 3cfc5facc..b13501ba2 100644 --- a/internal/xcuitest/config.go +++ b/internal/xcuitest/config.go @@ -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. diff --git a/internal/xcuitest/config_test.go b/internal/xcuitest/config_test.go index 38c858058..ee5c4ecdc 100644 --- a/internal/xcuitest/config_test.go +++ b/internal/xcuitest/config_test.go @@ -24,8 +24,9 @@ func TestTestOptions_ToMap(t *testing.T) { TestTimeoutsEnabled: "", MaximumTestExecutionTimeAllowance: 20, DefaultTestExecutionTimeAllowance: 0, + StatusBarOverrideTime: "", } - wantLength := 7 + wantLength := 8 m := opts.ToMap()