Skip to content

Commit 8ec8b9b

Browse files
#62 Add timeZone configuration property
1 parent 3cd5e9a commit 8ec8b9b

File tree

4 files changed

+15
-1
lines changed

4 files changed

+15
-1
lines changed
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
{
22
"driver": {
3-
"type": "chrome"
3+
"type": "chrome",
4+
"options": {
5+
"arguments": [ "headless" ]
6+
}
47
},
58
"baseUrl": "https://demo.atata.io/",
69
"artifactsPath": "{basedir}/artifacts/{build-start:yyyy}{test-suite-name-sanitized:/*}{test-name-sanitized:/*}",
10+
"timeZone": "UTC",
711

812
"useAllNUnitFeatures": true
913
}

src/Atata.Configuration.Json.Tests/StandardSettingsTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ public void Regular()
2424
DateTime.Now.Year.ToString(),
2525
nameof(StandardSettingsTests),
2626
TestContext.CurrentContext.Test.Name));
27+
28+
result.ValueOf(x => x.TimeZone.Id).Should.Equal("UTC");
2729
}
2830
}
2931
}

src/Atata.Configuration.Json/JsonConfig`1.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,11 @@ public DriverJsonSection Driver
8686

8787
public string Culture { get; set; }
8888

89+
/// <summary>
90+
/// Gets or sets the time zone identifier.
91+
/// </summary>
92+
public string TimeZone { get; set; }
93+
8994
/// <summary>
9095
/// Gets or sets the Artifacts directory path.
9196
/// </summary>

src/Atata.Configuration.Json/Mapping/JsonConfigMapper.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ public static AtataContextBuilder Map<TConfig>(TConfig config, AtataContextBuild
1515
if (config.Culture != null)
1616
builder.UseCulture(config.Culture);
1717

18+
if (config.TimeZone != null)
19+
builder.UseTimeZone(config.TimeZone);
20+
1821
if (config.ArtifactsPath != null)
1922
builder.UseArtifactsPath(config.ArtifactsPath);
2023

0 commit comments

Comments
 (0)