Skip to content

Commit 8915341

Browse files
emily8rownmeta-codesync[bot]
authored andcommitted
migrate ProgressBarAndroid from Jest to Fantom (#56302)
Summary: Pull Request resolved: #56302 Changelog: [Internal] migrate `ProgressBarAndroid` from Jest to Fantom Note: AndroidProgressBar does not expose props in the Fantom rendered output, so the test only verifies that the component renders. The old Jest snapshot verified JS-level props via the shallow renderer, but those aren't available through Fantom's native rendering pipeline for this component. Reviewed By: sammy-SC Differential Revision: D98998943 fbshipit-source-id: 6c570eaed1639e18cb54e29920c22aa9b9397615
1 parent 0e65df9 commit 8915341

3 files changed

Lines changed: 31 additions & 48 deletions

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/**
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*
7+
* @flow strict-local
8+
* @format
9+
*/
10+
11+
'use strict';
12+
13+
import '@react-native/fantom/src/setUpDefaultReactNativeEnvironment';
14+
15+
import * as Fantom from '@react-native/fantom';
16+
import * as React from 'react';
17+
import {ProgressBarAndroid} from 'react-native';
18+
19+
describe('<ProgressBarAndroid>', () => {
20+
it('should render as expected', () => {
21+
const root = Fantom.createRoot();
22+
23+
Fantom.runTask(() => {
24+
root.render(
25+
<ProgressBarAndroid styleAttr="Horizontal" indeterminate={true} />,
26+
);
27+
});
28+
29+
expect(root.getRenderedOutput().toJSX()).toEqual(<rn-androidProgressBar />);
30+
});
31+
});

packages/react-native/Libraries/Components/ProgressBarAndroid/__tests__/ProgressBarAndroid-test.js

Lines changed: 0 additions & 31 deletions
This file was deleted.

packages/react-native/Libraries/Components/ProgressBarAndroid/__tests__/__snapshots__/ProgressBarAndroid-test.js.snap

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)