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

OnAutoInsert Cohosting Tests #10829

Merged
merged 9 commits into from
Sep 6, 2024
Merged

Conversation

alexgav
Copy link
Contributor

@alexgav alexgav commented Sep 3, 2024

Summary of the changes

  • Tests for cohost OnAutoInsert endpoing

@alexgav alexgav requested a review from a team as a code owner September 3, 2024 21:00
@alexgav alexgav marked this pull request as draft September 3, 2024 21:01
All text should already be in the document/buffer when OnAutoInsert is being executed. Tigger character is not being added to the buffer, it should already be in the buffer.
Switching to applying edit instead of verifying edit contents and range. Switching from Theories to separate Facts where input was complex. Other misc cleanup.
@alexgav alexgav marked this pull request as ready for review September 6, 2024 04:59
Copy link
Member

@DustinCampbell DustinCampbell left a comment

Choose a reason for hiding this comment

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

I like this change very much! Good stuff here. I only found a handful of suggestions, mostly just consistency formatting nits.


The end.
""";
await VerifyOnAutoInsertAsync(input, output, triggerCharacter: "=", delegatedResponseText: "\"$0\"");
Copy link
Member

Choose a reason for hiding this comment

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

nit: Consider inserting a blank line above this method call to be consistent with the tests above. (Same feedback for the tests below.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

David suggested just using the string with the parameter name directly in the method call. I tried that and it looks pretty good I think. I'll go with that for now, let me know if you disagree.

Copy link
Contributor

@davidwengier davidwengier left a comment

Choose a reason for hiding this comment

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

Fantastic to see more testing :)

@alexgav alexgav enabled auto-merge (squash) September 6, 2024 21:25
@davidwengier
Copy link
Contributor

Diabled auto merge as there is still pending feedback.

@alexgav
Copy link
Contributor Author

alexgav commented Sep 6, 2024

Diabled auto merge as there is still pending feedback.

I think everything is addressed now.

@alexgav alexgav enabled auto-merge (squash) September 6, 2024 22:18
@alexgav alexgav merged commit e9cd0b2 into main Sep 6, 2024
12 checks passed
@alexgav alexgav deleted the dev/alexgav/OnAutoInsertCohostingTests branch September 6, 2024 22:31
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Sep 6, 2024
Copy link
Contributor

@davidwengier davidwengier left a comment

Choose a reason for hiding this comment

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

I would appreciate a follow up PR.

333fred added a commit to 333fred/razor that referenced this pull request Sep 10, 2024
…enizer

* upstream/main: (270 commits)
  Fix after merge
  PR Feedback
  Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20240905.1
  Fix auto insert service after merge from main
  PR Feedback
  Use ImmutableArray in SourceTextDiffer too
  Create a helper method and revert change to shared code, just in case
  Convert HtmlFormatter to ImmutableArray<TextChange>
  IEnumarable to ImmutableArray
  Remove some more usage of LSP types, and simplify ranges to line numbers
  Use pooled collections in a few more spots
  Extract common code to helper method
  Rename some methods to Try... pattern
  Rename some variables etc.
  Fix broken tests
  Get all consuming code compiling again
  Convert TextEdit to TextChange
  Remove flaky test
  OnAutoInsert Cohosting Tests (dotnet#10829)
  Update GetLanguageKind(...) tests and move to Workspaces.Test
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants