Reenable windows test for DataInspector (#1102)

Summary:
Requires https://github.com/facebook/flipper/issues/1101.
Pull Request resolved: https://github.com/facebook/flipper/pull/1102

Test Plan: CI

Reviewed By: nikoant

Differential Revision: D21379837

Pulled By: passy

fbshipit-source-id: 64afbf20eb246487fbccac2f0108996507a353ed
This commit is contained in:
Joao Alves
2020-05-04 08:05:44 -07:00
committed by Facebook GitHub Bot
parent 9658d1468d
commit 5c60b2b94a

View File

@@ -59,16 +59,8 @@ const json = {
}, },
}; };
describe('DataInspector', () => {
if (process.platform === 'win32') {
test('Skipping on Windows due to mocking not working', () => {});
return;
}
test('changing collapsed property works', async () => { test('changing collapsed property works', async () => {
const res = render( const res = render(<ManagedDataInspector data={json} collapsed expandRoot />);
<ManagedDataInspector data={json} collapsed expandRoot />,
);
expect(await res.findByText(/is/)).toBeTruthy(); // from expandRoot expect(await res.findByText(/is/)).toBeTruthy(); // from expandRoot
expect((await res.queryAllByText(/cool/)).length).toBe(0); expect((await res.queryAllByText(/cool/)).length).toBe(0);
@@ -84,9 +76,7 @@ describe('DataInspector', () => {
}); });
test('can manually collapse properties', async () => { test('can manually collapse properties', async () => {
const res = render( const res = render(<ManagedDataInspector data={json} collapsed expandRoot />);
<ManagedDataInspector data={json} collapsed expandRoot />,
);
await res.findByText(/is/); // previewed as key, like: "data: {is, and}" await res.findByText(/is/); // previewed as key, like: "data: {is, and}"
expect((await res.queryAllByText(/awesomely/)).length).toBe(0); expect((await res.queryAllByText(/awesomely/)).length).toBe(0);
@@ -187,4 +177,3 @@ describe('DataInspector', () => {
await res.findByText(/awesomely/); await res.findByText(/awesomely/);
await res.findByText(/json/); await res.findByText(/json/);
}); });
});