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

Commit

Permalink
Replaced other test ids in Buttons
Browse files Browse the repository at this point in the history
Also: modified classNames with cx.

Closes #8090

Auditors:

Test Plan:
1. Open the browser
2. Check for update
3. Make sure the buttons work
  • Loading branch information
Suguru Hirahara authored and bridiver committed Apr 6, 2017
1 parent 5dedd3a commit 7a11a8e
Showing 1 changed file with 24 additions and 9 deletions.
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

0 comments on commit 7a11a8e

Please sign in to comment.