fix z-index
Summary: z-index for titlebar was not high enough to cover the modal sheet Reviewed By: jknoxville Differential Revision: D17165223 fbshipit-source-id: 5ae30b6e55a1f69d653db509a08a8aa80a6f10fd
This commit is contained in:
committed by
Facebook Github Bot
parent
c18ea6bf52
commit
89f20e4f02
@@ -1,37 +0,0 @@
|
||||
/**
|
||||
* Copyright 2018-present Facebook.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
* @format
|
||||
*/
|
||||
import React from 'react';
|
||||
import {App} from '../App';
|
||||
import {Provider} from 'react-redux';
|
||||
import renderer from 'react-test-renderer';
|
||||
import reducers from '../reducers/index';
|
||||
import configureStore from 'redux-mock-store';
|
||||
import {init as initLogger} from '../fb-stubs/Logger';
|
||||
import BugReporter from '../fb-stubs/BugReporter';
|
||||
|
||||
// create redux store with initial state
|
||||
const mockStore = configureStore([])(reducers(undefined, {type: 'INIT'}));
|
||||
|
||||
test('Empty app state matches snapshot', () => {
|
||||
const logger = initLogger(mockStore);
|
||||
const bugReporter = new BugReporter(logger, mockStore);
|
||||
|
||||
const component = renderer.create(
|
||||
<Provider store={mockStore}>
|
||||
<App
|
||||
logger={logger}
|
||||
bugReporter={bugReporter}
|
||||
leftSidebarVisible={false}
|
||||
staticView={null}
|
||||
error={null}
|
||||
activeSheet={null}
|
||||
share={null}
|
||||
/>
|
||||
</Provider>,
|
||||
);
|
||||
expect(component.toJSON()).toMatchSnapshot();
|
||||
});
|
||||
@@ -57,7 +57,7 @@ const AppTitleBar = styled(FlexRow)(({focused}: {focused?: boolean}) => ({
|
||||
paddingRight: 10,
|
||||
justifyContent: 'space-between',
|
||||
WebkitAppRegion: 'drag',
|
||||
zIndex: 4,
|
||||
zIndex: 6,
|
||||
}));
|
||||
|
||||
type OwnProps = {
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
/**
|
||||
* Copyright 2018-present Facebook.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
* @format
|
||||
*/
|
||||
|
||||
import TitleBar from '../TitleBar.tsx';
|
||||
import renderer from 'react-test-renderer';
|
||||
import reducers from '../../reducers/index.tsx';
|
||||
import configureStore from 'redux-mock-store';
|
||||
import {Provider} from 'react-redux';
|
||||
|
||||
const mockStore = configureStore([])(reducers(undefined, {type: 'INIT'}));
|
||||
|
||||
test('TitleBar is rendered', () => {
|
||||
const component = renderer.create(
|
||||
<Provider store={mockStore}>
|
||||
<TitleBar
|
||||
windowIsFocused={true}
|
||||
leftSidebarVisible={false}
|
||||
rightSidebarVisible={false}
|
||||
rightSidebarAvailable={false}
|
||||
downloadingImportData={false}
|
||||
toggleLeftSidebarVisible={() => {}}
|
||||
toggleRightSidebarVisible={() => {}}
|
||||
setActiveSheet={_sheet => {}}
|
||||
version="1.0.0"
|
||||
launcherMsg={{message: 'Hello world', severity: 'warning'}}
|
||||
/>
|
||||
</Provider>,
|
||||
);
|
||||
expect(component.toJSON()).toMatchSnapshot();
|
||||
});
|
||||
@@ -1,112 +0,0 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`TitleBar is rendered 1`] = `
|
||||
<div
|
||||
className="toolbar css-78eqwq"
|
||||
>
|
||||
<div
|
||||
className="css-q7gju5"
|
||||
onClick={[Function]}
|
||||
onMouseDown={[Function]}
|
||||
onMouseUp={[Function]}
|
||||
>
|
||||
<div
|
||||
className="css-1h9aj9a"
|
||||
color="#acacac"
|
||||
size={12}
|
||||
src="https://external.xx.fbcdn.net/assets/?name=minus-circle&variant=filled&size=12&set=facebook_icons&density=1x"
|
||||
/>
|
||||
No device selected
|
||||
</div>
|
||||
<div
|
||||
className="css-1ayt83l"
|
||||
>
|
||||
<div
|
||||
className="css-z34oxs"
|
||||
disabled={true}
|
||||
onClick={[Function]}
|
||||
onMouseDown={[Function]}
|
||||
onMouseUp={[Function]}
|
||||
title="Take Screenshot"
|
||||
>
|
||||
<div
|
||||
className="css-1dg3xuk"
|
||||
color="#acacac"
|
||||
size={12}
|
||||
src="https://external.xx.fbcdn.net/assets/?name=camera&variant=filled&size=12&set=facebook_icons&density=1x"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="css-z34oxs"
|
||||
disabled={true}
|
||||
onClick={[Function]}
|
||||
onMouseDown={[Function]}
|
||||
onMouseUp={[Function]}
|
||||
title="Make Screen Recording"
|
||||
>
|
||||
<div
|
||||
className="css-wvm62d"
|
||||
color="#acacac"
|
||||
size={12}
|
||||
src="https://external.xx.fbcdn.net/assets/?name=camcorder&variant=filled&size=12&set=facebook_icons&density=1x"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="css-12zzrdt"
|
||||
/>
|
||||
<span
|
||||
className="css-1swhxtd"
|
||||
onClick={[Function]}
|
||||
>
|
||||
1.0.0-dev
|
||||
</span>
|
||||
<div
|
||||
className="css-1cecbfb"
|
||||
onClick={[Function]}
|
||||
onMouseDown={[Function]}
|
||||
onMouseUp={[Function]}
|
||||
title="Report Bug"
|
||||
>
|
||||
<div
|
||||
className="css-1idwz0j"
|
||||
color="#acacac"
|
||||
size={12}
|
||||
src="https://external.xx.fbcdn.net/assets/?name=bug&variant=filled&size=12&set=facebook_icons&density=1x"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="css-1ayt83l"
|
||||
>
|
||||
<div
|
||||
className="css-u1e6jr"
|
||||
onClick={[Function]}
|
||||
onMouseDown={[Function]}
|
||||
onMouseUp={[Function]}
|
||||
title="Toggle Plugins"
|
||||
>
|
||||
<div
|
||||
className="css-2bfl92"
|
||||
color="#80a6f5"
|
||||
size={20}
|
||||
src="icons/sidebar_left.svg"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="css-z34oxs"
|
||||
disabled={true}
|
||||
onClick={[Function]}
|
||||
onMouseDown={[Function]}
|
||||
onMouseUp={[Function]}
|
||||
title="Toggle Details"
|
||||
>
|
||||
<div
|
||||
className="css-j5i4pm"
|
||||
color="#acacac"
|
||||
size={20}
|
||||
src="icons/sidebar_right.svg"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
Reference in New Issue
Block a user