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

Commit

Permalink
GithubStatusBarTile => GithubTileView
Browse files Browse the repository at this point in the history
  • Loading branch information
Tilde Ann Thurium committed Sep 26, 2018
1 parent 926b033 commit 6a49d36
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions lib/controllers/status-bar-tile-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import BranchView from '../views/branch-view';
import BranchMenuView from '../views/branch-menu-view';
import PushPullView from '../views/push-pull-view';
import ChangedFilesCountView from '../views/changed-files-count-view';
import GithubStatusBarTile from '../views/github-status-bar-tile';
import GithubTileView from '../views/github-tile-view';
import Tooltip from '../atom/tooltip';
import Commands, {Command} from '../atom/commands';
import ObserveModel from '../views/observe-model';
Expand Down Expand Up @@ -94,7 +94,7 @@ export default class StatusBarTileController extends React.Component {
return (
<Fragment>
{this.renderTiles(repoProps)}
<GithubStatusBarTile didClick={this.props.toggleGithubTab} />
<GithubTileView didClick={this.props.toggleGithubTab} />
<ChangedFilesCountView
didClick={this.props.toggleGitTab}
changedFilesCount={repoProps.changedFilesCount}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Octicon from '../atom/octicon';
import {addEvent} from '../reporter-proxy';
import {autobind} from '../helpers';

export default class GithubStatusBarTile extends React.Component {
export default class GithubTileView extends React.Component {
static propTypes = {
didClick: PropTypes.func.isRequired,
}
Expand All @@ -16,7 +16,7 @@ export default class GithubStatusBarTile extends React.Component {
}

handleClick() {
addEvent('click', {package: 'github', component: 'GithubStatusBarTile'});
addEvent('click', {package: 'github', component: 'GithubTileView'});
this.props.didClick();
}

Expand Down
4 changes: 2 additions & 2 deletions test/controllers/status-bar-tile-controller.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Repository from '../../lib/models/repository';
import StatusBarTileController from '../../lib/controllers/status-bar-tile-controller';
import BranchView from '../../lib/views/branch-view';
import ChangedFilesCountView from '../../lib/views/changed-files-count-view';
import GithubStatusBarTile from '../../lib/views/github-status-bar-tile';
import GithubTileView from '../../lib/views/github-tile-view';

describe('StatusBarTileController', function() {
let atomEnvironment;
Expand Down Expand Up @@ -656,7 +656,7 @@ describe('StatusBarTileController', function() {

const wrapper = await mountAndLoad(buildApp({repository, toggleGithubTab}));

wrapper.find(GithubStatusBarTile).simulate('click');
wrapper.find(GithubTileView).simulate('click');
assert(toggleGithubTab.calledOnce);
});
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import React from 'react';
import {shallow} from 'enzyme';

import GithubStatusBarTile from '../../lib/views/github-status-bar-tile';
import GithubTileView from '../../lib/views/github-tile-view';
import * as reporterProxy from '../../lib/reporter-proxy';

describe('GithubStatusBarTile', function() {
describe('GithubTileView', function() {
let wrapper, clickSpy;
beforeEach(function() {
clickSpy = sinon.spy();
wrapper = shallow(<GithubStatusBarTile didClick={clickSpy} />);
wrapper = shallow(<GithubTileView didClick={clickSpy} />);
});

it('renders github icon and text', function() {
Expand All @@ -24,6 +24,6 @@ describe('GithubStatusBarTile', function() {
it('records an event on click', function() {
sinon.stub(reporterProxy, 'addEvent');
wrapper.simulate('click');
assert.isTrue(reporterProxy.addEvent.calledWith('click', {package: 'github', component: 'GithubStatusBarTile'}));
assert.isTrue(reporterProxy.addEvent.calledWith('click', {package: 'github', component: 'GithubTileView'}));
});
});

0 comments on commit 6a49d36

Please sign in to comment.