From bef657394de96a69ea6916989d4eb59259043e7c Mon Sep 17 00:00:00 2001 From: Frederic Collonval Date: Sun, 4 Oct 2020 16:46:32 +0200 Subject: [PATCH] Fix unit test --- src/components/Toolbar.tsx | 7 +------ src/style/Toolbar.ts | 2 +- tests/test-components/Toolbar.spec.tsx | 4 +--- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/components/Toolbar.tsx b/src/components/Toolbar.tsx index 14b4b1bb0..2d0290b6e 100644 --- a/src/components/Toolbar.tsx +++ b/src/components/Toolbar.tsx @@ -30,7 +30,7 @@ import { toolbarMenuWrapperClass, toolbarNavClass } from '../style/Toolbar'; -import { IGitExtension, Level } from '../tokens'; +import { Git, IGitExtension, Level } from '../tokens'; import { ActionButton } from './ActionButton'; import { BranchMenu } from './BranchMenu'; import { TagMenu } from './TagMenu'; @@ -86,11 +86,6 @@ export interface IToolbarProps { * Interface describing component state. */ export interface IToolbarState { - /** - * Current branch name. - */ - branch: string; - /** * Boolean indicating whether a branch menu is shown. */ diff --git a/src/style/Toolbar.ts b/src/style/Toolbar.ts index 93120d736..f41c6af00 100644 --- a/src/style/Toolbar.ts +++ b/src/style/Toolbar.ts @@ -41,7 +41,7 @@ export const toolbarMenuButtonClass = style({ color: 'var(--jp-ui-font-color1)', textAlign: 'left', - border: 'none', + border: 'none', borderBottom: 'var(--jp-border-width) solid var(--jp-border-color2)', borderRadius: 0, diff --git a/tests/test-components/Toolbar.spec.tsx b/tests/test-components/Toolbar.spec.tsx index 57d2e5d00..31dec2f34 100644 --- a/tests/test-components/Toolbar.spec.tsx +++ b/tests/test-components/Toolbar.spec.tsx @@ -278,9 +278,7 @@ describe('Toolbar', () => { const node = shallow(); const button = node.find(`.${toolbarMenuButtonClass}`).at(1); - expect(button.prop('title')).toEqual( - `Change the current branch: ${currentBranch}` - ); + expect(button.prop('title')).toEqual('Manage branches and tags'); }); });