-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2a8e8d9
commit c12a650
Showing
45 changed files
with
1,642 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export const UNCHECKED = 0; | ||
export const INDETERMINATE = 0.5; | ||
export const CHECKED = 1; | ||
|
||
export default { | ||
UNCHECKED, | ||
INDETERMINATE, | ||
CHECKED | ||
}; | ||
|
||
export type CheckStatus = typeof UNCHECKED | typeof INDETERMINATE | typeof CHECKED; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,69 @@ | ||
'use strict'; | ||
|
||
import React, {Component} from 'react'; | ||
import React from 'react'; | ||
import {bindActionCreators} from 'redux'; | ||
import {connect} from 'react-redux'; | ||
import * as actions from '../../modules/actions'; | ||
import TestNameFilterInput from './test-name-filter-input'; | ||
import StrictMatchFilterInput from './strict-match-filter-input'; | ||
import ShowCheckboxesInput from './show-checkboxes-input'; | ||
import BrowserList from './browser-list'; | ||
import ProgressBar from '../progress-bar'; | ||
import ControlButton from './control-button'; | ||
|
||
class CommonFilters extends Component { | ||
render() { | ||
const {filteredBrowsers, browsers, gui, actions} = this.props; | ||
const CommonFilters = (props) => { | ||
const onCommitChanges = () => { | ||
props.actions.staticAccepterOpenConfirm(); | ||
} | ||
|
||
const renderStaticImageAccepterControls = () => { | ||
const {staticImageAccepter} = props; | ||
|
||
if (!staticImageAccepter.enabled) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<div className="control-container control-filters"> | ||
<BrowserList | ||
available={browsers} | ||
selected={filteredBrowsers} | ||
onChange={actions.selectBrowsers} | ||
<div className='static-image-accepter'> | ||
<ControlButton | ||
label={`Commit ${staticImageAccepter.imagesToCommitCount} images`} | ||
title="Send request with imagesInfo to 'staticImageAccepter.serviceUrl'" | ||
isActive={staticImageAccepter.imagesToCommitCount > 0} | ||
isDisabled={staticImageAccepter.imagesToCommitCount === 0} | ||
isSuiteControl={true} | ||
extendClassNames="static-image-accepter-commit" | ||
handler={onCommitChanges} | ||
/> | ||
<ProgressBar | ||
done={staticImageAccepter.acceptedImagesCount} | ||
total={staticImageAccepter.totalAcceptableImagesCount} | ||
dataTestId="static-image-accepter-progress-bar" | ||
/> | ||
<TestNameFilterInput/> | ||
<StrictMatchFilterInput/> | ||
{gui && <ShowCheckboxesInput/>} | ||
</div> | ||
); | ||
) | ||
} | ||
|
||
return ( | ||
<div className="control-container control-filters"> | ||
<BrowserList | ||
available={props.browsers} | ||
selected={props.filteredBrowsers} | ||
onChange={props.actions.selectBrowsers} | ||
/> | ||
<TestNameFilterInput/> | ||
<StrictMatchFilterInput/> | ||
{props.gui && <ShowCheckboxesInput/>} | ||
{renderStaticImageAccepterControls()} | ||
</div> | ||
); | ||
} | ||
|
||
export default connect( | ||
({view, browsers, gui}) => ({filteredBrowsers: view.filteredBrowsers, browsers, gui}), | ||
({view, browsers, gui, staticImageAccepter}) => ({ | ||
filteredBrowsers: view.filteredBrowsers, | ||
browsers, | ||
gui, | ||
staticImageAccepter, | ||
}), | ||
(dispatch) => ({actions: bindActionCreators(actions, dispatch)}) | ||
)(CommonFilters); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
export const types = { | ||
FIND_SAME_DIFFS: 'FindSameDiffs', | ||
SCREENSHOT_ACCEPTER: 'ScreenshotAccepter' | ||
SCREENSHOT_ACCEPTER: 'ScreenshotAccepter', | ||
STATIC_ACCEPTER_CONFIRM: 'StaticAccepterConfirm' | ||
}; | ||
export {default as FindSameDiffs} from './find-same-diffs'; | ||
export {default as ScreenshotAccepter} from './screenshot-accepter'; | ||
export {default as StaticAccepterConfirm} from './static-accepter-confirm'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.