Bug 1077332: fix tests to always show the contacts tab. r=paolo

This commit is contained in:
Mike de Boer 2014-10-06 16:35:48 +02:00
Родитель 6921158765
Коммит eda7128f11
3 изменённых файлов: 6 добавлений и 3 удалений

Просмотреть файл

@ -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] =