From 7ba23e0232986d185ba051e45ed1f230b1c55f0f Mon Sep 17 00:00:00 2001 From: Srividya Ramaswamy Date: Mon, 2 Nov 2026 14:03:56 -0800 Subject: [PATCH] CI: pilot Win32 Storybook physical input in a separate pass Preserve the masked accessibility smoke run, select Checkbox click and Button keyboard/focus callbacks in a serial unmasked pass, and reject skipped or missing required results. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4b66f3ef-85ac-4405-bd35-dcc167a077b1 --- .github/workflows/pr.yml | 33 +++++++++++++++++++++++++++++++ apps/storybook/agent-map.yaml | 1 + apps/storybook/desktop.config.mts | 1 + 3 files changed, 35 insertions(+) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 3117b5b6eb..f2a9a4aa29 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -540,6 +540,39 @@ jobs: run: yarn storybook smoke --win32 --mode stories-and-tests working-directory: apps/storybook + - name: Test Win32 Storybook physical input pilot + shell: pwsh + working-directory: apps/storybook + env: + FURN_DESKTOP_DRIVER_DISABLED_INPUT_FEATURES: '' + run: | + $ErrorActionPreference = 'Stop' + $requiredTests = [ordered]@{ + 'components-checkbox--default' = 'toggles native checked state in both directions' + 'components-button--focus-management' = 'honors pointer focus policy and invokes exactly once per Enter and Space' + } + $env:STORYBOOK_SMOKE_STORY = "{$($requiredTests.Keys -join ',')}" + $env:STORYBOOK_SMOKE_TEST = "{$($requiredTests.Values -join ',')}" + $previousRuns = @(Get-ChildItem artifacts\desktop -Directory | Select-Object -ExpandProperty FullName) + + yarn storybook smoke --win32 --mode stories-and-tests + if ($LASTEXITCODE -ne 0) { throw 'Win32 physical input smoke failed.' } + + $runs = @(Get-ChildItem artifacts\desktop -Directory | Where-Object { $_.FullName -notin $previousRuns }) + if ($runs.Count -ne 1) { throw "Expected one new physical input report; found $($runs.Count)." } + $report = Get-Content (Join-Path $runs[0].FullName 'run.json') -Raw | ConvertFrom-Json + if ($report.schemaVersion -ne 1 -or $report.status -cne 'passed') { + throw 'The physical input run did not produce a successful canonical report.' + } + foreach ($entry in $requiredTests.GetEnumerator()) { + $title = "$($entry.Key) / $($entry.Value)" + $test = @($report.tests | Where-Object { $_.title -ceq $title }) + if ($test.Count -ne 1 -or $test[0].status -cne 'passed') { + throw "Required physical input test did not execute and pass: $title" + } + Write-Host "Verified physical input test: $title" + } + - name: Upload Win32 Storybook artifacts if: ${{ always() }} uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 diff --git a/apps/storybook/agent-map.yaml b/apps/storybook/agent-map.yaml index b90f1bd39f..92402aab97 100644 --- a/apps/storybook/agent-map.yaml +++ b/apps/storybook/agent-map.yaml @@ -36,6 +36,7 @@ services: lifecycle: attached-session-per-test-with-isolated-node-worker context_platform: macos-or-windows-or-win32-target-endpoint test_filter: --test + smoke_test_filter_env: STORYBOOK_SMOKE_TEST smoke_mode: stories-and-tests execution: navigate-and-remount-then-run-tests-grouped-by-story diff --git a/apps/storybook/desktop.config.mts b/apps/storybook/desktop.config.mts index 673ea7ac2b..26be927dfa 100644 --- a/apps/storybook/desktop.config.mts +++ b/apps/storybook/desktop.config.mts @@ -24,6 +24,7 @@ export default defineDesktopConfig({ reporting: { artifactsRoot: './artifacts/desktop' }, suites: { stories: { kind: 'csf-wdio' } }, integration: storybook({ + wdio: { test: process.env.STORYBOOK_SMOKE_TEST }, storyPackages: [ [ '@fluentui-react-native/components',