feat(tests): search test

This commit is contained in:
Alexey Kasyanchuk
2018-08-09 05:02:11 +03:00
parent ce618f4408
commit ae7b6fe793
5 changed files with 51 additions and 4 deletions

View File

@ -287,6 +287,7 @@ class Search extends Component {
floatingLabelText={__('What to search?')}
fullWidth={true}
ref='searchInput'
id='searchInput'
defaultValue={this.searchValue}
errorText={this.searchError}
onKeyPress={(e) => {
@ -335,7 +336,7 @@ class Search extends Component {
</Tooltip>
</div>
<RaisedButton style={{marginLeft: '10px'}} label={__('Search')} primary={true} onClick={() =>{
<RaisedButton style={{marginLeft: '10px'}} id='search' label={__('Search')} primary={true} onClick={() =>{
this.search()
}} />
</div>

View File

@ -261,7 +261,8 @@ export default class Torrent extends Component {
return (
<div>
<ListItem
<ListItem
className='torrentRow'
innerDivStyle={{paddingRight: 84}}
onClick={(e) => {
const link = '/torrent/' + torrent.hash;
@ -284,7 +285,7 @@ export default class Torrent extends Component {
if(node)
node.onclick = () => { return false }
}}>
<span className='break-word' style={{
<span className='break-word torrentName' style={{
color: torrent.contentCategory != 'xxx' ? (torrent.peer ? '#5643db' : 'black') : (torrent.peer ? '#9083e2' : 'grey')
}}>
{torrent.name}

View File

@ -0,0 +1 @@
module.exports = (time) => new Promise((resolve) => setTimeout(resolve, time))