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

Aberta
#67 0 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
5/5
Tempo estimado
Mais de uma semana
Facilidade para iniciantes
35/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Estagnada
Stack de tecnologia
csharp
Domínio
desktop, testing, tooling

Direção de pesquisa

Comece lendo o grupo de itens App.Head.props vinculado na issue e, em seguida, acompanhe a indexação de exemplos existente e a implementação de TabbedPage. Revise como as classes Log e VisualUITestBase são incluídas e como o source generator expõe as páginas de exemplo. O trabalho estará concluído quando as páginas de teste aparecerem como abas no single-component head mode, forem carregadas quando selecionadas e não tiverem efeito no all-up mode.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
C#
Estrelas
57
Forks
20
Métricas de merge de PRs
Nenhum PR com merge em 30d

Preparar o ambiente

Abrir no Codespaces

Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de CommunityToolkit/Tooling-Windows-Submodule

Todas as issues de CommunityToolkit/Tooling-Windows-Submodule

Issues semelhantes

Mais issues de C#

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.