([]);
@@ -79,6 +115,10 @@ export const LaunchEmulatorDialog = withTrackingScope(
});
}, [androidEnabled]);
+ if (!iosEnabled && !androidEnabled) {
+ return ;
+ }
+
const items = [
...(androidEmulators.length > 0
? []
diff --git a/desktop/flipper-ui-core/src/sandy-chrome/appinspect/__tests__/LaunchEmulator.spec.tsx b/desktop/flipper-ui-core/src/sandy-chrome/appinspect/__tests__/LaunchEmulator.spec.tsx
index 8aa5d77c3..9ac1f833f 100644
--- a/desktop/flipper-ui-core/src/sandy-chrome/appinspect/__tests__/LaunchEmulator.spec.tsx
+++ b/desktop/flipper-ui-core/src/sandy-chrome/appinspect/__tests__/LaunchEmulator.spec.tsx
@@ -17,8 +17,16 @@ import {createRootReducer} from '../../../reducers';
import {sleep} from 'flipper-plugin';
import {getRenderHostInstance} from '../../../RenderHost';
-test('Can render and launch android apps - empty', async () => {
+test('Can render and launch android apps - no emulators', async () => {
const store = createStore(createRootReducer());
+ store.dispatch({
+ type: 'UPDATE_SETTINGS',
+ payload: {
+ ...store.getState().settingsState,
+ enableAndroid: true,
+ enableIOS: true,
+ },
+ });
const responses: any = {
'ios-get-simulators': [],
@@ -44,6 +52,43 @@ test('Can render and launch android apps - empty', async () => {
`);
});
+test('Can render and launch android apps - no SDKs', async () => {
+ const store = createStore(createRootReducer());
+ store.dispatch({
+ type: 'UPDATE_SETTINGS',
+ payload: {
+ ...store.getState().settingsState,
+ enableAndroid: false,
+ enableIOS: false,
+ },
+ });
+
+ const responses: any = {
+ 'ios-get-simulators': [],
+ 'android-get-emulators': [],
+ };
+ getRenderHostInstance().flipperServer.exec = async function (cmd: any) {
+ return responses[cmd];
+ } as any;
+ const onClose = jest.fn();
+
+ const renderer = render(
+
+
+ ,
+ );
+
+ expect(await renderer.findByText(/No Mobile SDKs Enabled/))
+ .toMatchInlineSnapshot(`
+
+ No Mobile SDKs Enabled
+
+ `);
+});
+
test('Can render and launch android apps', async () => {
const store = createStore(createRootReducer());