-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #228 from hmcts/testfix/Update_Nswag
Updated NSwag config for video api and upgraded NuGet
- Loading branch information
Showing
6 changed files
with
288 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 2 additions & 24 deletions
26
AdminWebsite/AdminWebsite.AcceptanceTests/Data/DateFormats.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,10 @@ | ||
using AcceptanceTests.Common.Driver.Support; | ||
using System.Globalization; | ||
|
||
namespace AdminWebsite.AcceptanceTests.Data | ||
{ | ||
public static class DateFormats | ||
{ | ||
private static string _chromeHearingDateFormat = System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern; | ||
private const string FirefoxHearingDateFormat = "yyyy-MM-dd"; | ||
public static string LocalDateFormat = CultureInfo.CurrentUICulture.DateTimeFormat.ShortDatePattern; | ||
public static string HearingSummaryDate = "dddd dd MMMM yyyy, h:mmtt"; | ||
|
||
public static string FormatDateToLocalDateFormat(TargetBrowser browser) | ||
{ | ||
if (browser != TargetBrowser.Chrome) | ||
return browser == TargetBrowser.Firefox ? FirefoxHearingDateFormat : _chromeHearingDateFormat; | ||
AddZerosToShortDateFormat(); | ||
return _chromeHearingDateFormat; | ||
} | ||
|
||
private static void AddZerosToShortDateFormat() | ||
{ | ||
var splitDate = _chromeHearingDateFormat.Split("/"); | ||
foreach (var portion in splitDate) | ||
{ | ||
if (portion.Equals("d")) | ||
_chromeHearingDateFormat = _chromeHearingDateFormat.Replace("d", "dd"); | ||
|
||
if (portion.Equals("M")) | ||
_chromeHearingDateFormat = _chromeHearingDateFormat.Replace("M", "MM"); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.