diff --git a/webapp/src/components/viewHeader/__snapshots__/newCardButtonTemplateItem.test.tsx.snap b/webapp/src/components/viewHeader/__snapshots__/newCardButtonTemplateItem.test.tsx.snap
new file mode 100644
index 000000000..6b7de34cd
--- /dev/null
+++ b/webapp/src/components/viewHeader/__snapshots__/newCardButtonTemplateItem.test.tsx.snap
@@ -0,0 +1,628 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`components/viewHeader/newCardButtonTemplateItem return NewCardButtonTemplateItem 1`] = `
+
+
+
+`;
+
+exports[`components/viewHeader/newCardButtonTemplateItem return NewCardButtonTemplateItem and Set as default 1`] = `
+
+
+
+`;
+
+exports[`components/viewHeader/newCardButtonTemplateItem return NewCardButtonTemplateItem and add Card from template 1`] = `
+
+
+
+`;
+
+exports[`components/viewHeader/newCardButtonTemplateItem return NewCardButtonTemplateItem and delete 1`] = `
+
+
+
+`;
+
+exports[`components/viewHeader/newCardButtonTemplateItem return NewCardButtonTemplateItem and edit 1`] = `
+
+
+
+`;
diff --git a/webapp/src/components/viewHeader/newCardButtonTemplateItem.test.tsx b/webapp/src/components/viewHeader/newCardButtonTemplateItem.test.tsx
new file mode 100644
index 000000000..3ef1f628d
--- /dev/null
+++ b/webapp/src/components/viewHeader/newCardButtonTemplateItem.test.tsx
@@ -0,0 +1,140 @@
+// 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 NewCardButtonTemplateItem from './newCardButtonTemplateItem'
+
+jest.mock('../../mutator')
+const mockedMutator = mocked(mutator, true)
+
+const board = TestBlockFactory.createBoard()
+const activeView = TestBlockFactory.createBoardView(board)
+const card = TestBlockFactory.createCard(board)
+
+describe('components/viewHeader/newCardButtonTemplateItem', () => {
+ 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 NewCardButtonTemplateItem', () => {
+ const {container} = render(
+ wrapIntl(
+
+
+ ,
+ ),
+ )
+ const buttonElement = screen.getByRole('button', {name: 'menuwrapper'})
+ userEvent.click(buttonElement)
+ expect(container).toMatchSnapshot()
+ })
+ test('return NewCardButtonTemplateItem and edit', () => {
+ const {container} = render(
+ wrapIntl(
+
+
+ ,
+ ),
+ )
+ const buttonElement = screen.getByRole('button', {name: 'menuwrapper'})
+ userEvent.click(buttonElement)
+ expect(container).toMatchSnapshot()
+ const buttonEdit = screen.getByRole('button', {name: 'Edit'})
+ userEvent.click(buttonEdit)
+ expect(mockFunction).toBeCalledTimes(1)
+ expect(mockFunction).toBeCalledWith(card.id)
+ })
+
+ test('return NewCardButtonTemplateItem and add Card from template', () => {
+ const {container} = render(
+ wrapIntl(
+
+
+ ,
+ ),
+ )
+ const buttonAdd = screen.getByRole('button', {name: 'title'})
+ userEvent.click(buttonAdd)
+ expect(container).toMatchSnapshot()
+ expect(mockFunction).toBeCalledTimes(1)
+ })
+ test('return NewCardButtonTemplateItem and delete', () => {
+ const {container} = render(
+ wrapIntl(
+
+
+ ,
+ ),
+ )
+ const buttonElement = screen.getByRole('button', {name: 'menuwrapper'})
+ userEvent.click(buttonElement)
+ expect(container).toMatchSnapshot()
+ const buttonDelete = screen.getByRole('button', {name: 'Delete'})
+ userEvent.click(buttonDelete)
+ expect(mockedMutator.performAsUndoGroup).toBeCalledTimes(1)
+ })
+ test('return NewCardButtonTemplateItem and Set as default', () => {
+ const {container} = render(
+ wrapIntl(
+
+
+ ,
+ ),
+ )
+ const buttonElement = screen.getByRole('button', {name: 'menuwrapper'})
+ userEvent.click(buttonElement)
+ expect(container).toMatchSnapshot()
+ const buttonSetAsDefault = screen.getByRole('button', {name: 'Set as default'})
+ userEvent.click(buttonSetAsDefault)
+ expect(mockedMutator.setDefaultTemplate).toBeCalledTimes(1)
+ expect(mockedMutator.setDefaultTemplate).toBeCalledWith(activeView.id, activeView.fields.defaultTemplateId, card.id)
+ })
+})