Skip to content

Commit 6791d54

Browse files
authored
Merge pull request #439 from gemini-testing/HERMIONE-374
Extend test statuses filter
2 parents d1a0003 + e0b4861 commit 6791d54

File tree

22 files changed

+128
-144
lines changed

22 files changed

+128
-144
lines changed

lib/constants/view-modes.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,8 @@
22

33
module.exports = {
44
ALL: 'all',
5-
FAILED: 'failed'
5+
PASSED: 'passed',
6+
FAILED: 'failed',
7+
RETRIED: 'retried',
8+
SKIPPED: 'skipped'
69
};

lib/static/components/controls/common-controls.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,6 @@ class ControlButtons extends Component {
5151
/>
5252
</div>
5353
<GroupTestsSelect />
54-
<ControlButton
55-
label="Show skipped"
56-
isActive={view.showSkipped}
57-
handler={actions.toggleSkipped}
58-
/>
5954
<ControlSelect
6055
label="Diff mode"
6156
value={view.diffMode}

lib/static/components/gui.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import {bindActionCreators} from 'redux';
77
import {ROOT} from '../../constants/extension-points';
88
import * as actions from '../modules/actions';
99
import ControlButtons from './controls/gui-controls';
10-
import SkippedList from './skipped-list';
1110
import Loading from './loading';
1211
import ModalContainer from '../containers/modal';
1312
import MainTree from './main-tree';
@@ -84,7 +83,6 @@ class Gui extends Component {
8483
<FaviconChanger />
8584
<ControlButtons />
8685
<main className="container">
87-
<SkippedList />
8886
<MainTree />
8987
</main>
9088
<Loading active={loading.active} content={loading.content} />

lib/static/components/header/index.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,24 @@ import Summary from './summary';
88
import './header.css';
99

1010
class Header extends Component {
11-
static propTypes = {
12-
date: PropTypes.string
13-
};
11+
static propTypes = {
12+
date: PropTypes.string
13+
};
1414

15-
render() {
16-
const {date} = this.props;
15+
render() {
16+
const {date} = this.props;
1717

18-
const dateBlock = date ? (
19-
<div className="header__date">created at {date}</div>
20-
) : null;
18+
const dateBlock = date ? (
19+
<div className="header__date">created at {date}</div>
20+
) : null;
2121

22-
return (
23-
<header className="header container">
24-
<Summary />
25-
{dateBlock}
26-
</header>
27-
);
28-
}
22+
return (
23+
<header className="header container">
24+
<Summary />
25+
{dateBlock}
26+
</header>
27+
);
28+
}
2929
}
3030

3131
export default connect((state) => {

lib/static/components/report.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import * as actions from '../modules/actions';
99
import Loading from './loading';
1010
import Header from './header';
1111
import ControlButtons from './controls/report-controls';
12-
import SkippedList from './skipped-list';
1312
import MainTree from './main-tree';
1413
import CustomScripts from './custom-scripts';
1514
import FaviconChanger from './favicon-changer';
@@ -55,7 +54,6 @@ class Report extends Component {
5554
<Header/>
5655
<ControlButtons/>
5756
<main className="container">
58-
<SkippedList />
5957
<MainTree />
6058
</main>
6159
<BottomProgressBar />

lib/static/components/skipped-list.js

Lines changed: 0 additions & 46 deletions
This file was deleted.

lib/static/components/suites.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ class Suites extends Component {
8989
msgs.push(`test name should match to "${testNameFilter}" ${strictMatchFilter ? '' : 'not '}strictly;`);
9090
}
9191

92-
if (viewMode === viewModes.FAILED) {
93-
msgs.push(`test should be failed due to selected view mode: "Show only ${viewMode}";`);
92+
if (viewMode !== viewModes.ALL) {
93+
msgs.push(`test should be ${viewMode} due to selected view mode;`);
9494
}
9595

9696
if (filteredBrowsers) {

lib/static/modules/action-names.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ export default {
2626
VIEW_EXPAND_ERRORS: 'VIEW_EXPAND_ERRORS',
2727
VIEW_EXPAND_RETRIES: 'VIEW_EXPAND_RETRIES',
2828
VIEW_COLLAPSE_ALL: 'VIEW_COLLAPSE_ALL',
29-
VIEW_SHOW_ALL: 'VIEW_SHOW_ALL',
30-
VIEW_SHOW_FAILED: 'VIEW_SHOW_FAILED',
31-
VIEW_TOGGLE_SKIPPED: 'VIEW_TOGGLE_SKIPPED',
29+
CHANGE_VIEW_MODE: 'CHANGE_VIEW_MODE',
3230
VIEW_UPDATE_BASE_HOST: 'VIEW_UPDATE_BASE_HOST',
3331
VIEW_UPDATE_FILTER_BY_NAME: 'VIEW_UPDATE_FILTER_BY_NAME',
3432
VIEW_SET_STRICT_MATCH_FILTER: 'VIEW_SET_STRICT_MATCH_FILTER',

lib/static/modules/actions.js

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import StaticTestsTreeBuilder from '../../tests-tree-builder/static';
55
import actionNames from './action-names';
66
import {types as modalTypes} from '../components/modals';
77
import {QUEUED} from '../../constants/test-statuses';
8-
import viewModes from '../../constants/view-modes';
98
import diffModes from '../../constants/diff-modes';
109
import {getHttpErrorMessage} from './utils';
1110
import {fetchDataFromDatabases, mergeDatabases, connectToDatabase, getMainDatabaseUrl, getSuitesTableRows} from '../../db-utils/client';
@@ -188,7 +187,6 @@ export const expandAll = () => ({type: actionNames.VIEW_EXPAND_ALL});
188187
export const expandErrors = () => ({type: actionNames.VIEW_EXPAND_ERRORS});
189188
export const expandRetries = () => ({type: actionNames.VIEW_EXPAND_RETRIES});
190189
export const collapseAll = () => ({type: actionNames.VIEW_COLLAPSE_ALL});
191-
export const toggleSkipped = () => ({type: actionNames.VIEW_TOGGLE_SKIPPED});
192190
export const processBegin = () => ({type: actionNames.PROCESS_BEGIN});
193191
export const processEnd = () => ({type: actionNames.PROCESS_END});
194192
export const updateBaseHost = (host) => ({type: actionNames.VIEW_UPDATE_BASE_HOST, host});
@@ -202,6 +200,7 @@ export const togglePageScreenshot = () => ({type: actionNames.TOGGLE_PAGE_SCREEN
202200
export const updateBottomProgressBar = (payload) => ({type: actionNames.UPDATE_BOTTOM_PROGRESS_BAR, payload});
203201
export const toggleTestsGroup = (payload) => ({type: actionNames.TOGGLE_TESTS_GROUP, payload});
204202
export const groupTestsByKey = (payload) => ({type: actionNames.GROUP_TESTS_BY_KEY, payload});
203+
export const changeViewMode = (payload) => ({type: actionNames.CHANGE_VIEW_MODE, payload});
205204

206205
export const runCustomGuiAction = (payload) => {
207206
return async (dispatch) => {
@@ -225,16 +224,6 @@ export const setStrictMatchFilter = (strictMatchFilter) => {
225224
return {type: actionNames.VIEW_SET_STRICT_MATCH_FILTER, strictMatchFilter};
226225
};
227226

228-
export function changeViewMode(mode) {
229-
switch (mode) {
230-
case viewModes.FAILED:
231-
return {type: actionNames.VIEW_SHOW_FAILED};
232-
case viewModes.ALL:
233-
default:
234-
return {type: actionNames.VIEW_SHOW_ALL};
235-
}
236-
}
237-
238227
export function changeDiffMode(mode) {
239228
switch (mode) {
240229
case diffModes.ONLY_DIFF.id:

lib/static/modules/default-state.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ export default Object.assign(defaults, {
6969
viewMode: viewModes.ALL,
7070
diffMode: diffModes.THREE_UP.id,
7171
expand: EXPAND_ERRORS,
72-
showSkipped: false,
7372
baseHost: '',
7473
testNameFilter: '',
7574
strictMatchFilter: false,

0 commit comments

Comments
 (0)