Integration test: torrent list
This commit is contained in:
@@ -9,12 +9,12 @@ module.exports = class ModalOKCancel extends React.Component {
|
||||
return (
|
||||
<div className='float-right'>
|
||||
<FlatButton
|
||||
className='control'
|
||||
className='control cancel'
|
||||
style={cancelStyle}
|
||||
label={cancelText}
|
||||
onClick={onCancel} />
|
||||
<RaisedButton
|
||||
className='control'
|
||||
className='control ok'
|
||||
primary
|
||||
label={okText}
|
||||
onClick={onOK} />
|
||||
|
||||
@@ -151,7 +151,8 @@ function setupSavedState (cb) {
|
||||
torrentFileName: parsedTorrent.infoHash + '.torrent',
|
||||
magnetURI: parseTorrent.toMagnetURI(parsedTorrent),
|
||||
files: parsedTorrent.files,
|
||||
selections: parsedTorrent.files.map((x) => true)
|
||||
selections: parsedTorrent.files.map((x) => true),
|
||||
testID: t.testID
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,6 +58,7 @@ State.load(onState)
|
||||
function onState (err, _state) {
|
||||
if (err) return onError(err)
|
||||
state = window.state = _state // Make available for easier debugging
|
||||
window.dispatch = dispatch
|
||||
|
||||
telemetry.init(state)
|
||||
|
||||
|
||||
@@ -62,6 +62,7 @@ module.exports = class TorrentList extends React.Component {
|
||||
if (!torrentSummary.torrentKey) throw new InvalidTorrentError('Missing torrentKey')
|
||||
return (
|
||||
<div
|
||||
id={torrentSummary.testID && ('torrent-' + torrentSummary.testID)}
|
||||
key={torrentSummary.torrentKey}
|
||||
style={style}
|
||||
className={classes.join(' ')}
|
||||
@@ -346,7 +347,7 @@ module.exports = class TorrentList extends React.Component {
|
||||
</td>
|
||||
<td className='col-select'
|
||||
onClick={dispatcher('toggleTorrentFile', infoHash, index)}>
|
||||
<i className='icon'>{isSelected ? 'close' : 'add'}</i>
|
||||
<i className='icon deselect-file'>{isSelected ? 'close' : 'add'}</i>
|
||||
</td>
|
||||
</tr>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user