[PR #3833] [MERGED] Fix the TabTests! #25519

Open
opened 2026-01-31 09:10:02 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/3833
Author: @zadjii-msft
Created: 12/4/2019
Status: Merged
Merged: 12/6/2019
Merged by: @undefined

Base: masterHead: dev/migrie/b/fix-tab-tests-harder-better-faster-stronger


📝 Commits (10+)

  • 3be37fd I this restores the functionality of the local winrt objects, not XAML
  • 8a0bb8d Fix the unit tests, add comments
  • 119f325 Make the LT a proper cppwinrt project ; add a RunOnUIThread helper
  • 51bc3e7 Holy crap did this work?
  • 80e9e73 This is actually horrifying
  • 206482e Revert "This is actually horrifying"
  • 85c54f2 Revert "Holy crap did this work?"
  • 3638cd7 Hoo boy this is SO close
  • 5c1bb06 hoolpah.mp4
  • 1326645 If this builds/runs in CI too I'd be so happy

📊 Changes

16 files changed (+210 additions, -68 deletions)

View changed files

📝 src/cascadia/LocalTests_TerminalApp/ColorSchemeTests.cpp (+5 -3)
src/cascadia/LocalTests_TerminalApp/CppWinrtTailored.h (+103 -0)
📝 src/cascadia/LocalTests_TerminalApp/KeyBindingsTests.cpp (+7 -5)
src/cascadia/LocalTests_TerminalApp/LocalTests_TerminalApp.def (+3 -0)
📝 src/cascadia/LocalTests_TerminalApp/ProfileTests.cpp (+5 -3)
📝 src/cascadia/LocalTests_TerminalApp/SettingsTests.cpp (+5 -3)
📝 src/cascadia/LocalTests_TerminalApp/TabTests.cpp (+55 -28)
📝 src/cascadia/LocalTests_TerminalApp/TerminalApp.LocalTests.AppxManifest.prototype.xml (+1 -1)
📝 src/cascadia/LocalTests_TerminalApp/TerminalApp.LocalTests.vcxproj (+8 -6)
📝 src/cascadia/LocalTests_TerminalApp/pch.cpp (+1 -1)
📝 src/cascadia/LocalTests_TerminalApp/pch.h (+11 -6)
📝 src/cascadia/TerminalApp/Pane.cpp (+1 -3)
📝 src/cascadia/TerminalApp/Tab.h (+0 -1)
📝 src/cascadia/TerminalApp/TerminalPage.h (+0 -5)
📝 src/cascadia/TerminalApp/lib/pch.h (+5 -0)
📝 src/cascadia/TerminalConnection/EchoConnection.cpp (+0 -3)

📄 Description

Summary of the Pull Request

Fix the TabTests, and enable testing of types with XAML content. The TabTests were written many, many moons ago. they were intended to be our tests of XAML-like content within the Terminal app, so we could have unittests of Tabs, Panes, etc. Between their initial authoring and the day they were checked in, we had a bunch of build changes come in and break them irreperably.

We've gotten them fixed now with one weird trick doctors hate me. As long as there isn't an App.xbf in the test's output directory, then the tests will deploy just fine.

We also needed a bit of magic, cribbed straight from TAEF, to enable running test code synchronously on the UI thread. Hence, CppwinrtTailored.h.

References

PR Checklist

Validation Steps Performed

image


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/3833 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 12/4/2019 **Status:** ✅ Merged **Merged:** 12/6/2019 **Merged by:** [@undefined](undefined) **Base:** `master` ← **Head:** `dev/migrie/b/fix-tab-tests-harder-better-faster-stronger` --- ### 📝 Commits (10+) - [`3be37fd`](https://github.com/microsoft/terminal/commit/3be37fd89a54ac858a9f44d297a55d9e9b5af562) I this restores the functionality of the local winrt objects, not XAML - [`8a0bb8d`](https://github.com/microsoft/terminal/commit/8a0bb8d003afbf746907209ff3db333318336814) Fix the unit tests, add comments - [`119f325`](https://github.com/microsoft/terminal/commit/119f3254f83cfbfaabda041827894982e2a7ebee) Make the LT a proper cppwinrt project ; add a RunOnUIThread helper - [`51bc3e7`](https://github.com/microsoft/terminal/commit/51bc3e7a735674c63490931414eee480b3870b15) Holy crap did this work? - [`80e9e73`](https://github.com/microsoft/terminal/commit/80e9e73a1701eefb8a26b87c0d844ef54487c745) This is actually horrifying - [`206482e`](https://github.com/microsoft/terminal/commit/206482edb2d3474c89657e29d30dcbd3f8c82c7c) Revert "This is actually horrifying" - [`85c54f2`](https://github.com/microsoft/terminal/commit/85c54f26e5bb96c73d06b2ccf70fc3e85ad1e857) Revert "Holy crap did this work?" - [`3638cd7`](https://github.com/microsoft/terminal/commit/3638cd7e92881518a2f464064350d72e38abd728) Hoo boy this is SO close - [`5c1bb06`](https://github.com/microsoft/terminal/commit/5c1bb06e879d7f3e6660496a3f8fbf9e26166eeb) hoolpah.mp4 - [`1326645`](https://github.com/microsoft/terminal/commit/1326645b548cc5823f4a64fcabb51fee97212bd5) If this builds/runs in CI too I'd be so happy ### 📊 Changes **16 files changed** (+210 additions, -68 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/LocalTests_TerminalApp/ColorSchemeTests.cpp` (+5 -3) ➕ `src/cascadia/LocalTests_TerminalApp/CppWinrtTailored.h` (+103 -0) 📝 `src/cascadia/LocalTests_TerminalApp/KeyBindingsTests.cpp` (+7 -5) ➕ `src/cascadia/LocalTests_TerminalApp/LocalTests_TerminalApp.def` (+3 -0) 📝 `src/cascadia/LocalTests_TerminalApp/ProfileTests.cpp` (+5 -3) 📝 `src/cascadia/LocalTests_TerminalApp/SettingsTests.cpp` (+5 -3) 📝 `src/cascadia/LocalTests_TerminalApp/TabTests.cpp` (+55 -28) 📝 `src/cascadia/LocalTests_TerminalApp/TerminalApp.LocalTests.AppxManifest.prototype.xml` (+1 -1) 📝 `src/cascadia/LocalTests_TerminalApp/TerminalApp.LocalTests.vcxproj` (+8 -6) 📝 `src/cascadia/LocalTests_TerminalApp/pch.cpp` (+1 -1) 📝 `src/cascadia/LocalTests_TerminalApp/pch.h` (+11 -6) 📝 `src/cascadia/TerminalApp/Pane.cpp` (+1 -3) 📝 `src/cascadia/TerminalApp/Tab.h` (+0 -1) 📝 `src/cascadia/TerminalApp/TerminalPage.h` (+0 -5) 📝 `src/cascadia/TerminalApp/lib/pch.h` (+5 -0) 📝 `src/cascadia/TerminalConnection/EchoConnection.cpp` (+0 -3) </details> ### 📄 Description ## Summary of the Pull Request Fix the `TabTests`, and enable testing of types with XAML content. The `TabTests` were written many, many moons ago. they were intended to be our tests of XAML-like content within the Terminal app, so we could have unittests of Tabs, Panes, etc. Between their initial authoring and the day they were checked in, we had a bunch of build changes come in and break them irreperably. We've gotten them fixed now with _one weird trick_ <sup>doctors hate me</sup>. As long as there isn't an `App.xbf` in the test's output directory, then the tests will deploy just fine. We also needed a bit of magic, cribbed straight from TAEF, to enable running test code synchronously on the UI thread. Hence, `CppwinrtTailored.h`. ## References ## PR Checklist * [x] Closes #2472 * [x] I work here * [x] Tests added/passed - you better believe it * [n/a] Requires documentation to be updated ## Validation Steps Performed ![image](https://user-images.githubusercontent.com/18356694/70185192-ef1d0b00-16ae-11ea-8799-b77061e3cdb0.png) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:10:02 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#25519