Skip to content
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

C#: Extraction Integration Tests for Blazor #18325

Conversation

egregius313
Copy link
Contributor

@egregius313 egregius313 commented Dec 19, 2024

This PR copies the integration test from #17355 and adds variants for .NET 8, .NET 9, and build-mode: none databases.

I have temporarily removed the dataflow queries from the integration test as I am not ready to merge those pieces yet.

Pull Request checklist

All query authors

  • A change note is added if necessary. See the documentation in this repository.
    - [ ] All new queries have appropriate .qhelp. See the documentation in this repository.
    - [ ] QL tests are added if necessary. See Testing custom queries in the GitHub documentation.
    - [ ] New and changed queries have correct query metadata. See the documentation in this repository.

Internal query authors only

- [ ] Autofixes generated based on these changes are valid, only needed if this PR makes significant changes to .ql, .qll, or .qhelp files. See the documentation (internal access required).
- [ ] Changes are validated at scale (internal access required).
- [ ] Adding a new query? Consider also adding the query to autofix.

@egregius313 egregius313 added the no-change-note-required This PR does not need a change note label Dec 19, 2024
@github-actions github-actions bot added the C# label Dec 19, 2024
@egregius313 egregius313 force-pushed the egregius313/csharp/blazor/basic-integration-tests branch from 9f311b8 to a03b232 Compare December 19, 2024 14:53
@egregius313 egregius313 marked this pull request as ready for review January 8, 2025 03:26
@Copilot Copilot bot review requested due to automatic review settings January 8, 2025 03:26
@egregius313 egregius313 requested a review from a team as a code owner January 8, 2025 03:26
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 60 out of 75 changed files in this pull request and generated 2 comments.

Files not reviewed (15)
  • csharp/ql/integration-tests/all-platforms/blazor/BlazorTest/BlazorTest.csproj: Language not supported
  • csharp/ql/integration-tests/all-platforms/blazor/BlazorTest/Components/Layout/MainLayout.razor.css: Language not supported
  • csharp/ql/integration-tests/all-platforms/blazor/BlazorTest/Components/Layout/NavMenu.razor.css: Language not supported
  • csharp/ql/integration-tests/all-platforms/blazor/BlazorTest/Properties/launchSettings.json: Language not supported
  • csharp/ql/integration-tests/all-platforms/blazor/BlazorTest/appsettings.json: Language not supported
  • csharp/ql/integration-tests/all-platforms/blazor/BlazorTest/global.json: Language not supported
  • csharp/ql/integration-tests/all-platforms/blazor/BlazorTest/wwwroot/app.css: Language not supported
  • csharp/ql/integration-tests/all-platforms/blazor/Files.expected: Language not supported
  • csharp/ql/integration-tests/all-platforms/blazor/Files.ql: Language not supported
  • csharp/ql/integration-tests/all-platforms/blazor/htmlSinks.expected: Language not supported
  • csharp/ql/integration-tests/all-platforms/blazor/BlazorTest/Components/App.razor: Evaluated as low risk
  • csharp/ql/integration-tests/all-platforms/blazor/BlazorTest/Components/Layout/MainLayout.razor: Evaluated as low risk
  • csharp/ql/integration-tests/all-platforms/blazor/BlazorTest/Components/Layout/NavMenu.razor: Evaluated as low risk
  • csharp/ql/integration-tests/all-platforms/blazor/BlazorTest/Components/MyInput.razor: Evaluated as low risk
  • csharp/ql/integration-tests/all-platforms/blazor/BlazorTest/Components/MyOutput.razor: Evaluated as low risk
Comments suppressed due to low confidence (1)

csharp/ql/integration-tests/all-platforms/blazor/BlazorTest/Components/Pages/TestPage.razor:92

  • [nitpick] The constant XssUrl2 is named ambiguously. It should be renamed to something more descriptive like SanitizedXssUrl.
private const string XssUrl2 = "<b>aaaa</b>";

Tip: Copilot code review supports C#, Go, Java, JavaScript, Markdown, Python, Ruby and TypeScript, with more languages coming soon. Learn more

// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
{
app.UseExceptionHandler("/Error", createScopeForErrors: true);
Copy link
Preview

Copilot AI Jan 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The method 'UseExceptionHandler' does not have a parameter 'createScopeForErrors'. This should be removed or corrected.

Suggested change
app.UseExceptionHandler("/Error", createScopeForErrors: true);
app.UseExceptionHandler("/Error");

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
public string? Value { get; set; } = "";
}

private const string XssUrl = "<b>aaaa<%2Fb>";
Copy link
Preview

Copilot AI Jan 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The constant XssUrl contains an invalid HTML tag (<%2Fb>), which might cause rendering issues. Consider correcting the tag.

Suggested change
private const string XssUrl = "<b>aaaa<%2Fb>";
private const string XssUrl = "<b>aaaa</b>";

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
@egregius313 egregius313 force-pushed the egregius313/csharp/blazor/basic-integration-tests branch from b936ffb to ba84896 Compare January 8, 2025 03:58
@egregius313 egregius313 merged commit ba84896 into github:main Jan 8, 2025
12 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C# no-change-note-required This PR does not need a change note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant