From ade9a95a1853bc588917291661cf95ccf886f468 Mon Sep 17 00:00:00 2001 From: Devon Govett Date: Mon, 20 Jul 2026 13:30:40 -0700 Subject: [PATCH 1/2] fix: use import type in starter (#10344) --- starters/docs/src/TokenField.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/starters/docs/src/TokenField.tsx b/starters/docs/src/TokenField.tsx index ed6bbb90bcc..e390e6f1a06 100644 --- a/starters/docs/src/TokenField.tsx +++ b/starters/docs/src/TokenField.tsx @@ -3,10 +3,10 @@ import { TokenField as AriaTokenField, TokenInput as AriaTokenInput, Token as AriaToken, - TokenFieldProps as AriaTokenFieldProps, - TokenInputProps, - TokenProps, - TokenFieldValue + type TokenFieldProps as AriaTokenFieldProps, + type TokenInputProps, + type TokenProps, + type TokenFieldValue } from 'react-aria-components/TokenField'; import {Label, Description} from './Form'; import './TokenField.css'; From cce1ec97af8ae9e86bd7a0d766b7cec9fab85d6b Mon Sep 17 00:00:00 2001 From: Robert Snow Date: Tue, 21 Jul 2026 10:17:17 +1000 Subject: [PATCH 2/2] fix: S2 Toast props (#10342) * fix: S2 Toast props * update copyright year --------- Co-authored-by: Danni --- packages/@react-spectrum/s2/src/Toast.tsx | 3 +- .../@react-spectrum/s2/test/Toast.test.tsx | 60 +++++++++++++++++++ 2 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 packages/@react-spectrum/s2/test/Toast.test.tsx diff --git a/packages/@react-spectrum/s2/src/Toast.tsx b/packages/@react-spectrum/s2/src/Toast.tsx index ff945fd7ce0..5323c91f745 100644 --- a/packages/@react-spectrum/s2/src/Toast.tsx +++ b/packages/@react-spectrum/s2/src/Toast.tsx @@ -579,7 +579,8 @@ export function SpectrumToast(props: SpectrumToastProps): ReactNode { index, isExpanded }) - }> + } + {...filterDOMProps(toast.content)}>
diff --git a/packages/@react-spectrum/s2/test/Toast.test.tsx b/packages/@react-spectrum/s2/test/Toast.test.tsx new file mode 100644 index 00000000000..ddf9391015c --- /dev/null +++ b/packages/@react-spectrum/s2/test/Toast.test.tsx @@ -0,0 +1,60 @@ +/* + * Copyright 2026 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +import {act, installPointerEvent, pointerMap, render} from '@react-spectrum/test-utils-internal'; +import {Button} from '../src/Button'; +import {ToastContainer, ToastOptions, ToastQueue} from '../src/Toast'; +import userEvent from '@testing-library/user-event'; + +function Example(options: ToastOptions = {}) { + return ( + <> + + + + ); +} + +describe('Toast', () => { + installPointerEvent(); + + let user; + beforeAll(() => { + user = userEvent.setup({delay: null, pointerMap}); + }); + + beforeEach(() => { + jest.useFakeTimers(); + }); + + afterEach(() => { + act(() => jest.runAllTimers()); + }); + + it('passes an id and data attribute through to the rendered toast', async () => { + let {getByRole, getByTestId} = render( + // @ts-ignore + + ); + + let button = getByRole('button'); + await user.click(button); + + let toast = getByRole('alertdialog'); + expect(toast).toBeVisible(); + expect(toast).toHaveAttribute('id', 'toast-1'); + expect(toast).toHaveAttribute('data-testid', 'toast-1'); + expect(getByTestId('toast-1')).toBe(toast); + }); +});