Skip to content

Port encapsulate field tests to new harness#60162

Merged
sharwell merged 3 commits intodotnet:mainfrom
sharwell:port-more-tests
Mar 15, 2022
Merged

Port encapsulate field tests to new harness#60162
sharwell merged 3 commits intodotnet:mainfrom
sharwell:port-more-tests

Conversation

@sharwell
Copy link
Copy Markdown
Contributor

@sharwell sharwell commented Mar 14, 2022

This test was observed in a recent failing run on roslyn-integration-CI due to use of light bulb in the old integration test harness.

Also update State Reset to automatically dismiss dialogs remaining from a previous test (e.g. the Save File dialog).

Closes #35701

@sharwell sharwell requested a review from a team as a code owner March 14, 2022 16:36
@ghost ghost added the Area-IDE label Mar 14, 2022
}
catch (COMException)
{
// Devenv can throw COMExceptions if it's busy when we make DTE calls.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

📝 This block might not be necessary in the new harness, since all UI Automation calls are to the current process. I didn't have time to run validation passes on this hypothesis because I've been focused on fixing (recovering from) the unexpected File Save dialog.

/// Throws an <see cref="InvalidOperationException"/> if an open dialog with that name cannot be
/// found.
/// </summary>
public static async Task<IUIAutomationElement> GetOpenDialogByIdAsync(JoinableTaskFactory joinableTaskFactory, IntPtr visualStudioHWnd, string dialogAutomationId, CancellationToken cancellationToken)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

📝 We should switch to WPF APIs for dialogs we own, and only use UI Automation for dialogs that might not be in WPF. That can be done later though.

@sharwell sharwell enabled auto-merge March 14, 2022 16:42
@sharwell sharwell requested a review from a team as a code owner March 15, 2022 00:31
Copy link
Copy Markdown
Contributor

@allisonchou allisonchou left a comment

Choose a reason for hiding this comment

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

🎉

@sharwell sharwell merged commit d99a0af into dotnet:main Mar 15, 2022
@ghost ghost added this to the Next milestone Mar 15, 2022
@sharwell sharwell deleted the port-more-tests branch March 16, 2022 22:20
@allisonchou allisonchou modified the milestones: Next, 17.2.P3 Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AccessViolationException in IVsPreviewChangesService.PreviewChanges

2 participants