Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions apps/storybook/agent-map.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <name-glob>
smoke_test_filter_env: STORYBOOK_SMOKE_TEST
smoke_mode: stories-and-tests
execution: navigate-and-remount-then-run-tests-grouped-by-story

Expand Down
1 change: 1 addition & 0 deletions apps/storybook/desktop.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Loading