зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1077332: fix tests to always show the contacts tab. r=paolo
This commit is contained in:
Родитель
6921158765
Коммит
eda7128f11
|
@ -441,6 +441,7 @@ loop.panel = (function(_, mozL10n) {
|
|||
// Mostly used for UI components showcase and unit tests
|
||||
callUrl: React.PropTypes.string,
|
||||
userProfile: React.PropTypes.object,
|
||||
showTabButtons: React.PropTypes.bool,
|
||||
},
|
||||
|
||||
getInitialState: function() {
|
||||
|
@ -515,7 +516,7 @@ loop.panel = (function(_, mozL10n) {
|
|||
React.DOM.div(null,
|
||||
NotificationListView({notifications: this.props.notifications,
|
||||
clearOnDocumentHidden: true}),
|
||||
TabView({ref: "tabView", buttonsHidden: !this.state.userProfile},
|
||||
TabView({ref: "tabView", buttonsHidden: !this.state.userProfile && !this.props.showTabButtons},
|
||||
Tab({name: "call"},
|
||||
React.DOM.div({className: "content-area"},
|
||||
CallUrlResult({client: this.props.client,
|
||||
|
|
|
@ -441,6 +441,7 @@ loop.panel = (function(_, mozL10n) {
|
|||
// Mostly used for UI components showcase and unit tests
|
||||
callUrl: React.PropTypes.string,
|
||||
userProfile: React.PropTypes.object,
|
||||
showTabButtons: React.PropTypes.bool,
|
||||
},
|
||||
|
||||
getInitialState: function() {
|
||||
|
@ -515,7 +516,7 @@ loop.panel = (function(_, mozL10n) {
|
|||
<div>
|
||||
<NotificationListView notifications={this.props.notifications}
|
||||
clearOnDocumentHidden={true} />
|
||||
<TabView ref="tabView" buttonsHidden={!this.state.userProfile}>
|
||||
<TabView ref="tabView" buttonsHidden={!this.state.userProfile && !this.props.showTabButtons}>
|
||||
<Tab name="call">
|
||||
<div className="content-area">
|
||||
<CallUrlResult client={this.props.client}
|
||||
|
|
|
@ -140,7 +140,8 @@ describe("loop.panel", function() {
|
|||
|
||||
view = TestUtils.renderIntoDocument(loop.panel.PanelView({
|
||||
notifications: notifications,
|
||||
client: fakeClient
|
||||
client: fakeClient,
|
||||
showTabButtons: true,
|
||||
}));
|
||||
|
||||
[callTab, contactsTab] =
|
||||
|
|
Загрузка…
Ссылка в новой задаче