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 () => {
const res = render(
<ManagedDataInspector data={json} collapsed expandRoot />,
);
test('changing collapsed property works', async () => {
const res = render(<ManagedDataInspector data={json} collapsed expandRoot />);
expect(await res.findByText(/is/)).toBeTruthy(); // from expandRoot
expect((await res.queryAllByText(/cool/)).length).toBe(0);
@@ -81,12 +73,10 @@ describe('DataInspector', () => {
<ManagedDataInspector data={json} collapsed={true} expandRoot />,
);
expect((await res.queryAllByText(/cool/)).length).toBe(0);
});
});
test('can manually collapse properties', async () => {
const res = render(
<ManagedDataInspector data={json} collapsed expandRoot />,
);
test('can manually collapse properties', async () => {
const res = render(<ManagedDataInspector data={json} collapsed expandRoot />);
await res.findByText(/is/); // previewed as key, like: "data: {is, and}"
expect((await res.queryAllByText(/awesomely/)).length).toBe(0);
@@ -113,9 +103,9 @@ describe('DataInspector', () => {
await waitFor(() => {
expect(res.queryByText(/json/)).toBeNull();
});
});
});
test('can filter for data', async () => {
test('can filter for data', async () => {
const res = render(
<ManagedDataInspector data={json} collapsed={false} expandRoot />,
);
@@ -186,5 +176,4 @@ describe('DataInspector', () => {
// everything visible again
await res.findByText(/awesomely/);
await res.findByText(/json/);
});
});