Feature Show status tab by default when no actions are present
MODIFY
FrontEnd/Sailfish-JS-report/src/components/LeftPanel.tsx
FrontEnd/Sailfish-JS-report/src/components/LeftPanel.tsx
@@ -56,11 +56,6 @@ class LeftPanelBase extends React.Component<Props> {
render() {
const { panel, isCheckpointsEnabled, statusEnabled, currentCheckpointHandler } = this.props;
- const cpRootClass = createStyleSelector(
- "layout-control",
- isCheckpointsEnabled ? null : "disabled"
- );
-
return (
<div className="layout-panel">
<div className="layout-panel__controls">
@@ -133,12 +128,16 @@ class LeftPanelBase extends React.Component<Props> {
}
export const LeftPanel = connect(
- (state: AppState) => ({
- panel: state.view.leftPanel,
+ (state: AppState) => {
+ const isActionsEmpty = !(state.selected.testCase.actions && state.selected.testCase.actions.length > 0)
+ return ({
selectedCheckpointId: state.selected.checkpointActionId,
checkpointActions: getCheckpointActions(state),
- statusEnabled: !!state.selected.testCase.status.cause
- }),
+ statusEnabled: !!state.selected.testCase.status.cause,
+ isActionsEmpty: isActionsEmpty,
+ panel: state.view.leftPanel == Panel.Actions && isActionsEmpty? Panel.Status: state.view.leftPanel
+ })
+ },
dispatch => ({
panelSelectHandler: (panel: Panel) => dispatch(setLeftPane(panel)),
setSelectedCheckpoint: (checkpointAciton: Action) => dispatch(selectCheckpointAction(checkpointAciton))

Feature #63304. Show status tab by default when no actions are present

Change-Id: Iad4981fbf94547562ea4202bef8acd25e6a4fda8