diff --git a/webapp/src/components/viewHeader/__snapshots__/emptyCardButton.test.tsx.snap b/webapp/src/components/viewHeader/__snapshots__/emptyCardButton.test.tsx.snap
new file mode 100644
index 000000000..f020ecf7e
--- /dev/null
+++ b/webapp/src/components/viewHeader/__snapshots__/emptyCardButton.test.tsx.snap
@@ -0,0 +1,192 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`components/viewHeader/emptyCardButton return EmptyCardButton 1`] = `
+
+
+
+`;
+
+exports[`components/viewHeader/emptyCardButton return EmptyCardButton and Set Template 1`] = `
+
+
+
+`;
+
+exports[`components/viewHeader/emptyCardButton return EmptyCardButton and addCard 1`] = `
+
+
+
+`;
diff --git a/webapp/src/components/viewHeader/emptyCardButton.test.tsx b/webapp/src/components/viewHeader/emptyCardButton.test.tsx
new file mode 100644
index 000000000..c3372c96a
--- /dev/null
+++ b/webapp/src/components/viewHeader/emptyCardButton.test.tsx
@@ -0,0 +1,88 @@
+// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
+// See LICENSE.txt for license information.
+import React from 'react'
+import {render, screen} from '@testing-library/react'
+import {Provider as ReduxProvider} from 'react-redux'
+
+import '@testing-library/jest-dom'
+import userEvent from '@testing-library/user-event'
+
+import {mocked} from 'ts-jest/utils'
+
+import {wrapIntl, mockStateStore} from '../../testUtils'
+
+import {TestBlockFactory} from '../../test/testBlockFactory'
+
+import mutator from '../../mutator'
+
+import EmptyCardButton from './emptyCardButton'
+
+const board = TestBlockFactory.createBoard()
+const activeView = TestBlockFactory.createBoardView(board)
+
+jest.mock('../../mutator')
+const mockedMutator = mocked(mutator, true)
+describe('components/viewHeader/emptyCardButton', () => {
+ const state = {
+ users: {
+ me: {
+ id: 'user-id-1',
+ username: 'username_1'},
+ },
+ views: {
+ current: 0,
+ views: [activeView],
+ },
+ }
+
+ const store = mockStateStore([], state)
+ const mockFunction = jest.fn()
+
+ beforeEach(() => {
+ jest.clearAllMocks()
+ })
+ test('return EmptyCardButton', () => {
+ const {container} = render(
+ wrapIntl(
+
+
+ ,
+ ),
+ )
+ expect(container).toMatchSnapshot()
+ })
+ test('return EmptyCardButton and addCard', () => {
+ const {container} = render(
+ wrapIntl(
+
+
+ ,
+ ),
+ )
+ expect(container).toMatchSnapshot()
+ const buttonEmpty = screen.getByRole('button', {name: 'Empty card'})
+ userEvent.click(buttonEmpty)
+ expect(mockFunction).toBeCalledTimes(1)
+ })
+ test('return EmptyCardButton and Set Template', () => {
+ const {container} = render(
+ wrapIntl(
+
+
+ ,
+ ),
+ )
+ const buttonElement = screen.getByRole('button', {name: 'menuwrapper'})
+ userEvent.click(buttonElement)
+ expect(container).toMatchSnapshot()
+ const buttonDefault = screen.getByRole('button', {name: 'Set as default'})
+ userEvent.click(buttonDefault)
+ expect(mockedMutator.clearDefaultTemplate).toBeCalledTimes(1)
+ })
+})