Skip to content
Merged
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
8 changes: 8 additions & 0 deletions .changeset/calm-tests-settle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@fluentui-react-native/components': patch
'@fluentui-react-native/desktop-driver': patch
'@fluentui-react-native/storybook-desktop': patch
'@fluentui-react-native/storybook-desktop-runtime': patch
---

Make JavaScript test fixtures more reliable under CI load and document deterministic test authoring. No runtime API or behavior changes.
15 changes: 14 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,20 @@ jobs:
run: yarn test:agent-permissions

- name: Build CI
run: yarn lage buildci
env:
FURN_JEST_MAX_WORKERS: '1'
FURN_TEST_TIMEOUT_SCALE: '2'
FURN_JEST_TIMINGS_DIR: ${{ runner.temp }}/js-pr-jest
run: yarn lage buildci --concurrency 2

- name: Upload JS test timings
if: ${{ always() }}
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: JS_PR_Jest_${{ github.run_id }}_${{ github.run_attempt }}
path: ${{ runner.temp }}/js-pr-jest
if-no-files-found: ignore
retention-days: 14

bundle-size:
name: Bundle Size PR
Expand Down
3 changes: 2 additions & 1 deletion packages/agentic/components/jest.config.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const config = require('@fluentui-react-native/scripts/jest-config');
const { testBudget } = require('@fluentui-react-native/scripts/test-budget');

module.exports = {
...config,
testTimeout: 10000,
testTimeout: testBudget(10_000),
};
8 changes: 8 additions & 0 deletions packages/agentic/components/references/tests-and-stories.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ Button coverage demonstrates:
Use table-driven tests for complete finite axes. When fixing one state regression, add a focused assertion even if a
snapshot also changes.

Await `render`, `rerender`, and `fireEvent` and then assert the observable
state. Drive native adapter readiness through the explicit fixture event,
not a sleep. Keep representative themed render tests for accessibility and
interaction wiring; test pure selection rules separately when it avoids
repeating a costly popup render without reducing contract coverage.
For slow repository integration fixtures, use the shared `testBudget(ms)` helper
rather than increasing individual wall-clock limits ad hoc.

## Type tests and primitives

Add committed `*.types.test.ts` coverage for compile-time slot acceptance, mutually exclusive props, and public type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import * as React from 'react';
import { StyleSheet } from 'react-native';
import type { View } from 'react-native';
import { act, fireEvent, screen } from '@testing-library/react-native';
import { testBudget } from '@fluentui-react-native/scripts/test-budget';

import { render } from '../../common/renderWithTheme';
import { ListboxItem } from '../listbox-item/listbox-item';
Expand Down Expand Up @@ -164,7 +165,7 @@ describe('Dropdown', () => {
expect(onAccessibilityAction).toHaveBeenCalledTimes(1);
expect(onOpenChange).not.toHaveBeenCalled();
},
30_000,
testBudget(30_000),
);

it('renders an inaccessible root around a collapsed combobox trigger showing the placeholder', async () => {
Expand Down
7 changes: 7 additions & 0 deletions packages/agentic/desktop-driver/references/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,13 @@ instructions.

## Validation order

For fake-host recovery or session races, gate the actual dispatch, storage write,
or settlement with deferred promises. Release the gate in `finally` and drain
the operation before closing the harness. Test deadline math with fake timers
as in `src/protocol/timeouts.test.ts`, and scope intentional short real deadlines
so release and application cleanup keep their normal budgets. Include nested
cleanup causes in failures.

During iteration, run the smallest affected test. Before completing a package
change:

Expand Down
Loading
Loading