-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
V6/contrib #336
V6/contrib #336
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Code Health Quality Gates: OK
Change in average Code Health of affected files: +0.07 (9.93 -> 10.00)
- Improving Code Health: 2 findings(s) ✅
public async Task<TrackErrorStatusCodeResponse> TrackErrorStatusCodeAsync( | ||
IResolverContext resolverContext, | ||
[GraphQLDescription("Status code of the client error.")] int statusCode, | ||
[GraphQLDescription("The URL that generated the client error.")] string url, | ||
[GraphQLDescription("The time and date at which the client error was generated")] DateTime timestamp, | ||
[GraphQLDescription("The URL from which the current URL is requested")] string? referrer) | ||
{ | ||
ArgumentNullException.ThrowIfNull(resolverContext); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ No longer an issue: Excess Number of Function Arguments
TrackErrorStatusCodeAsync is no longer above the threshold for number of arguments
[InlineData("test-3", "https://example-site.com/not-found", "2024-05-30T14:10:20+01:00", "https://site-example.com/not-found", 404, true)] | ||
public async Task UrlTrackerExampleQuery_TrackErrorStatusCode_Async( | ||
string testCase, | ||
string url, | ||
string timeStamp, | ||
string? referrer, | ||
int statusCode, | ||
bool expectSuccess) | ||
{ | ||
var snapshotProvider = new SnapshotProvider($"{_urlTrackerExampleSnapshotPath}/TrackErrorStatusCode"); | ||
HttpClient client = _factory.CreateClient(); | ||
|
||
using var request = JsonContent.Create(new | ||
{ | ||
query = UrlTrackerExampleQueries.TrackErrorStatusCode, | ||
variables = new | ||
{ | ||
url, | ||
timeStamp, | ||
referrer, | ||
statusCode | ||
} | ||
}); | ||
|
||
HttpResponseMessage response = await client.PostAsync("/graphql", request).ConfigureAwait(true); | ||
|
||
string responseContent = await response.Content.ReadAsStringAsync().ConfigureAwait(true); | ||
|
||
string snapshotName = $"UrlTrackerExample_TrackErrorStatusCode_{testCase}.snap"; | ||
|
||
await snapshotProvider.AssertIsSnapshotEqualAsync(snapshotName, responseContent).ConfigureAwait(true); | ||
Assert.Equal(expectSuccess, response.IsSuccessStatusCode); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ No longer an issue: Excess Number of Function Arguments
UrlTrackerExampleQuery_TrackErrorStatusCode_Async is no longer above the threshold for number of arguments
Quality Gate passedIssues Measures |
No description provided.