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

Commit

Permalink
replace yes/no to allow/deny for notifcation bar
Browse files Browse the repository at this point in the history
Auditors: @luixxiul, @srirambv
close #9750
  • Loading branch information
cezaraugusto committed Aug 3, 2017
1 parent 0d584b9 commit cecd56f
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions app/browser/reducers/autoplayReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ const showAutoplayMessageBox = (state, tabId) => {

appActions.showNotification({
buttons: [
{text: locale.translation('yes')},
{text: locale.translation('no')}
{text: locale.translation('allow')},
{text: locale.translation('deny')}
],
message,
frameOrigin: origin,
Expand Down
8 changes: 4 additions & 4 deletions app/browser/reducers/passwordManagerReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ const savePassword = (username, origin, tabId) => {
// Notification not shown already
appActions.showNotification({
buttons: [
{text: locale.translation('yes')},
{text: locale.translation('no')},
{text: locale.translation('allow')},
{text: locale.translation('deny')},
{text: locale.translation('neverForThisSite')}
],
options: {
Expand Down Expand Up @@ -149,8 +149,8 @@ const updatePassword = (username, origin, tabId) => {
// Notification not shown already
appActions.showNotification({
buttons: [
{text: locale.translation('yes')},
{text: locale.translation('no')}
{text: locale.translation('allow')},
{text: locale.translation('deny')}
],
options: {
persist: false,
Expand Down
4 changes: 2 additions & 2 deletions app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ app.on('ready', () => {
} else {
appActions.showNotification({
buttons: [
{text: locale.translation('yes')},
{text: locale.translation('no')}
{text: locale.translation('allow')},
{text: locale.translation('deny')}
],
options: {
persist: false
Expand Down
4 changes: 2 additions & 2 deletions js/about/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,8 @@ class AboutStyle extends ImmutableComponent {
<BrowserButton groupedItem secondaryColor notificationItem l10nId='notificationItem' onClick={this.onEnableAutoplay} />
<BrowserButton groupedItem secondaryColor notificationItem l10nId='notificationItem' onClick={this.onEnableAutoplay} />
<Pre><Code>
&lt;BrowserButton groupedItem secondaryColor notificationItem l10nId='Yes' onClick={'{this.onEnableAutoplay}'} />{'\n'}
&lt;BrowserButton groupedItem secondaryColor notificationItem l10nId='No' onClick={'{this.onEnableAutoplay}'} />
&lt;BrowserButton groupedItem secondaryColor notificationItem l10nId='Allow' onClick={'{this.onEnableAutoplay}'} />{'\n'}
&lt;BrowserButton groupedItem secondaryColor notificationItem l10nId='Deny' onClick={'{this.onEnableAutoplay}'} />
</Code></Pre>

<BrowserButton iconOnly iconClass={globalStyles.appIcons.moreInfo} size='30px' color='rebeccapurple' />
Expand Down
26 changes: 13 additions & 13 deletions test/bravery-components/notificationBarTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ describe('notificationBar passwords', function () {
return this.getText(notificationBar).then((val) => {
return val.includes('brave') && val.includes('brave_user')
})
}).click('button=No')
}).click('button=Deny')
})

it('does not include a password in the notification bar', function * () {
Expand All @@ -144,7 +144,7 @@ describe('notificationBar passwords', function () {
return this.getText(notificationBar).then((val) => {
return val.includes('your password') && !val.includes('secret')
})
}).click('button=No')
}).click('button=Deny')
})

it('autofills remembered password on login form', function * () {
Expand All @@ -159,7 +159,7 @@ describe('notificationBar passwords', function () {
.waitForExist(notificationBar)
.waitUntil(function () {
return this.getText(notificationBar).then((val) => val.includes('brave') && val.includes('brave_user'))
}).click('button=Yes')
}).click('button=Allow')
.tabByIndex(0)
.loadUrl('about:passwords')
.waitForExist('[data-test-id="passwordItem"]')
Expand Down Expand Up @@ -189,7 +189,7 @@ describe('notificationBar passwords', function () {
.waitForExist(notificationBar)
.waitUntil(function () {
return this.getText(notificationBar).then((val) => val.includes('brave') && val.includes('brave_user'))
}).click('button=Yes')
}).click('button=Allow')
.tabByIndex(0)
.loadUrl('about:passwords')
.waitForExist('[data-test-id="passwordItem"]')
Expand All @@ -206,7 +206,7 @@ describe('notificationBar passwords', function () {
.waitForExist(notificationBar)
.waitUntil(function () {
return this.getText(notificationBar).then((val) => val.includes('brave') && val.includes('brave_user') && val.includes('update'))
}).click('button=Yes')
}).click('button=Allow')
.tabByIndex(0)
.url(this.loginUrl1)
.waitForExist('#acctmgr_loginform')
Expand Down Expand Up @@ -334,7 +334,7 @@ describe('Autoplay test', function () {
.waitUntil(function () {
return this.getText(notificationBar).then((val) => val.includes('autoplay media'))
})
.click('button=Yes')
.click('button=Allow')
.tabByUrl(url)
.waitUntil(function () {
return this.getText('div[id="status"]')
Expand Down Expand Up @@ -368,7 +368,7 @@ describe('Autoplay test', function () {
return this.getText(notificationBar).then((val) => val.includes('autoplay media'))
})
.click('[data-l10n-id=rememberDecision]')
.click('button=Yes')
.click('button=Allow')
.tabByUrl(url)
.waitUntil(function () {
return this.getText('div[id="status"]')
Expand Down Expand Up @@ -426,7 +426,7 @@ describe('Autoplay test', function () {
.waitUntil(function () {
return this.getText(notificationBar).then((val) => val.includes('autoplay media'))
})
.click('button=No')
.click('button=Deny')
.windowByUrl(Brave.browserWindowUrl)
.activateURLMode()
.click(reloadButton)
Expand Down Expand Up @@ -458,7 +458,7 @@ describe('Autoplay test', function () {
return this.getText(notificationBar).then((val) => val.includes('autoplay media'))
})
.click('[data-l10n-id=rememberDecision]')
.click('button=No')
.click('button=Deny')
.windowByUrl(Brave.browserWindowUrl)
.click(reloadButton)
.tabByUrl(url)
Expand Down Expand Up @@ -522,7 +522,7 @@ describe('Autoplay test', function () {
.waitUntil(function () {
return this.getText(notificationBar).then((val) => val.includes('autoplay media'))
})
.click('button=Yes')
.click('button=Allow')
.tabByUrl(url)
.waitUntil(function () {
return this.getText('div[id="status"]')
Expand Down Expand Up @@ -556,7 +556,7 @@ describe('Autoplay test', function () {
return this.getText(notificationBar).then((val) => val.includes('autoplay media'))
})
.click('[data-l10n-id=rememberDecision]')
.click('button=Yes')
.click('button=Allow')
.tabByUrl(url)
.waitUntil(function () {
return this.getText('div[id="status"]')
Expand Down Expand Up @@ -614,7 +614,7 @@ describe('Autoplay test', function () {
.waitUntil(function () {
return this.getText(notificationBar).then((val) => val.includes('autoplay media'))
})
.click('button=No')
.click('button=Deny')
.windowByUrl(Brave.browserWindowUrl)
.activateURLMode()
.click(reloadButton)
Expand Down Expand Up @@ -646,7 +646,7 @@ describe('Autoplay test', function () {
return this.getText(notificationBar).then((val) => val.includes('autoplay media'))
})
.click('[data-l10n-id=rememberDecision]')
.click('button=No')
.click('button=Deny')
.windowByUrl(Brave.browserWindowUrl)
.click(reloadButton)
.tabByUrl(url)
Expand Down

0 comments on commit cecd56f

Please sign in to comment.