-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Tests we should maybe write one day #7001
Labels
Area-CodeHealth
Issues related to code cleanliness, linting, rules, warnings, errors, static analysis, etc.
Help Wanted
We encourage anyone to jump in on these.
Issue-Scenario
Product-Meta
The product is the management of the products.
Milestone
Comments
ghost
added
Needs-Triage
It's a new issue that the core contributor team needs to triage at the next triage meeting
Needs-Tag-Fix
Doesn't match tag requirements
labels
Jul 22, 2020
zadjii-msft
added
⛺ Reserved
For future use
and removed
Needs-Triage
It's a new issue that the core contributor team needs to triage at the next triage meeting
labels
Jul 22, 2020
zadjii-msft
changed the title
[Reserved for future use]
Tests we should maybe write one day
Dec 1, 2020
zadjii-msft
added
Area-CodeHealth
Issues related to code cleanliness, linting, rules, warnings, errors, static analysis, etc.
Issue-Scenario
Product-Meta
The product is the management of the products.
and removed
⛺ Reserved
For future use
labels
Dec 1, 2020
80 tasks
24 tasks
5 tasks
zadjii-msft
added a commit
that referenced
this issue
Apr 21, 2021
ghost
pushed a commit
that referenced
this issue
Apr 27, 2021
) ## Summary of the Pull Request Brace yourselves, it's finally here. This PR does the dirty work of splitting the monolithic `TermControl` into three components. These components are: * `ControlCore`: This encapsulates the `Terminal` instance, the `DxEngine` and `Renderer`, and the `Connection`. This is intended to everything that someone might need to stand up a terminal instance in a control, but without any regard for how the UX works. * `ControlInteractivity`: This is a wrapper for the `ControlCore`, which holds the logic for things like double-click, right click copy/paste, selection, etc. This is intended to be a UI framework-independent abstraction. The methods this layer exposes can be called the same from both the WinUI TermControl and the WPF control. * `TermControl`: This is the UWP control. It's got a Core and Interactivity inside it, which it uses for the actual logic of the terminal itself. TermControl's main responsibility is now By splitting into smaller pieces, it will enable us to * write unit tests for the `Core` and `Interactivity` bits, which we desparately need * Combine `ControlCore` and `ControlInteractivity` in an out-of-proc core process in the future, to enable tab tearout. However, we're not doing that work quite yet. There's still lots of work to be done to enable that, thought this is likely the biggest portion. Ideally, this would just be methods moved wholesale from one file to another. Unfortunately, there are a bunch of cases where that didn't work as well as expected. Especially when trying to better enforce the boundary between the classes. We've got a couple tests here that I've added. These are partially examples, and partially things I ran into while implementing this. A bunch of things from #7001 can go in now that we have this. This PR is gonna be a huge pain to review - 38 files with 3,730 additions and 1,661 deletions is nothing to scoff at. It will also conflict 100% with anything that's targeting `TermControl`. I'm hoping we can review this over the course of the next week and just be done with it, and leave plenty of runway for 1.9 bugs in post. ## References * In pursuit of #1256 * Proc Model: #5000 * https://github.com/microsoft/terminal/projects/5 ## PR Checklist * [x] Closes #6842 * [x] Closes https://github.com/microsoft/terminal/projects/5#card-50760249 * [x] Closes https://github.com/microsoft/terminal/projects/5#card-50760258 * [x] I work here * [x] Tests added/passed * [n/a] Requires documentation to be updated ## Detailed Description of the Pull Request / Additional comments * I don't love the names `ControlCore` and `ControlInteractivity`. Open to other names. * I added a `ICoreState` interface for "properties that come from the `ControlCore`, but consumers of the `TermControl` need to know". In the future, these will all need to be handled specially, because they might involve an RPC call to retrieve the info from the core (or cache it) in the window process. * I've added more `EventArgs` to make more events proper `TypedEvent`s. * I've changed how the TerminalApp layer requests updated TaskbarProgress state. It doesn't need to pump TermControl to raise a new event anymore. * ~~Something that snuck into this branch in the very long history is the switch to `DCompositionCreateSurfaceHandle` for the `DxEngine`. @miniksa wrote this originally in 30b8335, I'm just finally committing it here. We'll need that in the future for the out-of-proc stuff.~~ * I reverted this in c113b65. We can revert _that_ commit when we want to come back to it. * I've changed the acrylic handler a decent amount. But added tests! * All the `ThrottledFunc` things are left in `TermControl`. Some might be able to move down into core/interactivity, but once we figure out how to use a different kind of Dispatcher (because a UI thread won't necessarily exist for those components). * I've undoubtably messed up the merging of the locking around the appearance config stuff recently ## Validation Steps Performed I've got a rolling list in #6842 (comment) that I'm updating as I go.
zadjii-msft
modified the milestones:
Engineering Improvements 2021,
Engineering Improvements
Jan 3, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area-CodeHealth
Issues related to code cleanliness, linting, rules, warnings, errors, static analysis, etc.
Help Wanted
We encourage anyone to jump in on these.
Issue-Scenario
Product-Meta
The product is the management of the products.
I'm gonna use this thread to track things that I think of that probably should be tested, but didn't get a test during the PR for one reason or another. Usually those reasons are
I'll add more to this list as I think of them.
Unit Tests
DefaultProfile
, then serialize the settings, it should be serialized as the value we set it to.OSC 9 ; 9
, Implement ConEmu's OSC 9;9 to set the CWD #8330TermControl
--suppressApplicationTitle
(or in theNewTerminalArgs
) works as expectedControlInteractivity
(which wraps the UI-like logic around theControlCore
). We could do just unit tests for ControlInteractivity, since that would be UI-independent. Oh but if it's in the same lib as TermControl, then do we have the problem that the TermControl is going to want to link with Resources, and load them at runtime (even if the test doesn't have a TermControl in it?) yikes.ControlInteractivity::CopySelectionToClipboard
returns false if there's no selectionControlInteractivityTests::TestPanWithTouch
- does what it says on the label. Never got around to writing it.Monarch::SignalClose
,Monarch::GetNumberOfPeasants
, creating and closing window events;
#13706Feature / UI Tests
exit
ing the "last" pane, then trying to MRU to it does the right thing (by going to the pane before it)closeTab
should accept anindex
param #7180 interacts with Teach terminal page to go to the last used tab in MRU mode #8610AppLogic::_warnings
Public
folder, so it ended up being null, right around March 12th 2021The text was updated successfully, but these errors were encountered: