Feature: Display test pages in testing app for single experiment head

未關閉
#67 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
5/5
預估耗時
一週以上
新手友好度
35/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
csharp

研究方向

先閱讀 issue 中連結的 App.Head.props 項目群組,然後追蹤現有的範例索引與 TabbedPage 實作。檢查 Log 與 VisualUITestBase 類別如何被納入,以及 source generator 如何公開範例頁面。完成的標準是:測試頁面會在 single-component head mode 中以分頁顯示,在選取時載入,並且在 all-up mode 中不產生任何影響。

由索引模型根據 Issue 內容生成。

描述

build :fire: dev loop ➰ enhancement testing 🏗
Describe the feature

When developing tests, it can be beneficial to see the test page to develop it, just like any other sample.

May also make debugging tests easier if a failure is happening and you want to see what the page looks like for the setup of a test.

The feature would be about adding additional tabs to the TabbedPage interface when running a component in the single-head mode for that component alone (wouldn't be included or do anything when run all-up as the all component mode).

Desired behavior

When running the single component head, you'd be able to open each test page like you do samples. (Eventually we may need better organization of the tabs here as components get more complex or add many samples/tests.)

When clicking on the tab, it'd just load the test page.

We wouldn't necessarily need to connect the driving test code to this, though it may be required to include the whole test project if more than just code for a page is used for testing, we wouldn't know the full implementation details.

Basically in the App.Head.props file we should include the component's test shared project code in this item group:

https://github.com/CommunityToolkit/Tooling-Windows-Submodule/blob/35c03dff2df6a1423860710e6633faf65cf3e788/ProjectHeads/App.Head.props#L46-L58

We'd also need to include the Log and VisualUITestBase classes that the test code may reference (we can't just include the test shared project as it has the App.xaml test head which would conflict with our app head code).

Ideally, we'd use a source generator again here to detect and index these test pages like we do for samples, then the TabbedPage would just get another bucket of pages and a template in order to show them. (We should probably define a class/record for passing info to the TabbedPage over the tuple we have now.)

Screenshots

No response

Code Platform
  • UWP
  • WinAppSDK / WinUI 3
  • Web Assembly (WASM)
  • Android
  • iOS
  • MacOS
  • Linux / GTK
Windows Build Number
  • Windows 10 1809 (Build 17763)
  • Windows 10 1903 (Build 18362)
  • Windows 10 1909 (Build 18363)
  • Windows 10 2004 (Build 19041)
  • Windows 10 20H2 (Build 19042)
  • Windows 10 21H1 (Build 19043)
  • Windows 11 21H2 (Build 22000)
  • Other (specify)
Other Windows Build number

No response

App minimum and target SDK version
  • Windows 10, version 1809 (Build 17763)
  • Windows 10, version 1903 (Build 18362)
  • Windows 10, version 1909 (Build 18363)
  • Windows 10, version 2004 (Build 19041)
  • Other (specify)
Other SDK version

No response

Visual Studio Version

No response

Visual Studio Build Number

No response

Device form factor

No response

Additional context

In the future, we could investigate a way to trigger running a test method against the page that it has been linked to in order to facilitate reproducing tests while being able to watch them or better interact with visual tree tools, etc... (this would probably require more information from a source generator to generate a look-up that's easier/faster to reference)

Help us help you

Yes, but only if others can assist.

主要語言
C#
星號
57
分支
20
PR 合併指標
30 天內沒有已合併 PR

環境準備

在 Codespaces 中開啟

在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

CommunityToolkit/Tooling-Windows-Submodule 的其他 Issue

查看 CommunityToolkit/Tooling-Windows-Submodule 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。