Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Replaced other test ids in Buttons #8091

Merged
merged 1 commit into from
Apr 6, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 24 additions & 9 deletions js/components/updateBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,11 @@ class UpdateHello extends ImmutableComponent {

class UpdateHide extends ImmutableComponent {
render () {
return <Button className={css(commonStyles.notificationItem__button) + ' ' + 'whiteButton'}
data-test-id='updateHide'
return <Button className={cx({
[css(commonStyles.notificationItem__button)]: true,
whiteButton: true
})}
testId='updateHide'
l10nId='updateHide'
onClick={appActions.setUpdateStatus.bind(null, this.props.reset ? UpdateStatus.UPDATE_NONE : undefined, false, undefined)} />
}
Expand All @@ -74,7 +77,10 @@ class UpdateLog extends ImmutableComponent {
remote.shell.openItem(path.join(remote.app.getPath('userData'), 'updateLog.log'))
}
render () {
return <Button className={css(commonStyles.notificationItem__button) + ' ' + 'whiteButton'}
return <Button className={cx({
[css(commonStyles.notificationItem__button)]: true,
whiteButton: true
})}
testId='updateViewLogButton'
l10nId='updateViewLog'
onClick={this.onViewLog.bind(this)} />
Expand All @@ -92,18 +98,27 @@ class UpdateAvailable extends ImmutableComponent {
<span className={css(styles.flexAlignCenter)} data-test-id='notificationOptions'>
{
this.props.metadata && this.props.metadata.get('notes')
? <Button className={css(commonStyles.notificationItem__button) + ' ' + 'whiteButton'}
data-test-id='updateDetails'
? <Button className={cx({
[css(commonStyles.notificationItem__button)]: true,
whiteButton: true
})}
testId='updateDetails'
l10nId='updateDetails'
onClick={windowActions.setReleaseNotesVisible.bind(null, true)} />
: null
}
<Button className={css(commonStyles.notificationItem__button) + ' ' + 'whiteButton'}
data-test-id='updateLater'
<Button className={cx({
[css(commonStyles.notificationItem__button)]: true,
whiteButton: true
})}
testId='updateLater'
l10nId='updateLater'
onClick={appActions.setUpdateStatus.bind(null, UpdateStatus.UPDATE_AVAILABLE_DEFERRED, false, undefined)} />
<Button className={css(commonStyles.notificationItem__button) + ' ' + 'primaryButton'}
data-test-id='updateNow'
<Button className={cx({
[css(commonStyles.notificationItem__button)]: true,
primaryButton: true
})}
testId='updateNow'
l10nId='updateNow'
onClick={appActions.setUpdateStatus.bind(null, UpdateStatus.UPDATE_APPLYING_RESTART, false, undefined)} />
</span>
Expand Down