mirror of
https://github.com/mattermost/focalboard.git
synced 2024-11-24 08:22:29 +02:00
IMported corect menu reference and fixde tests
This commit is contained in:
parent
ecb2d445ed
commit
c03bf1446d
@ -40,6 +40,7 @@ exports[`src/components/shareBoard/userPermissionsRow should match snapshot 1`]
|
||||
</button>
|
||||
<div
|
||||
class="Menu noselect left "
|
||||
style="top: 40px;"
|
||||
>
|
||||
<div
|
||||
class="menu-contents"
|
||||
@ -293,6 +294,7 @@ exports[`src/components/shareBoard/userPermissionsRow should match snapshot in p
|
||||
</button>
|
||||
<div
|
||||
class="Menu noselect left "
|
||||
style="top: 40px;"
|
||||
>
|
||||
<div
|
||||
class="menu-contents"
|
||||
@ -546,6 +548,7 @@ exports[`src/components/shareBoard/userPermissionsRow should match snapshot in t
|
||||
</button>
|
||||
<div
|
||||
class="Menu noselect left "
|
||||
style="top: 40px;"
|
||||
>
|
||||
<div
|
||||
class="menu-contents"
|
||||
|
@ -129,6 +129,7 @@ exports[`components/sidebarBoardItem sidebar board item 1`] = `
|
||||
</button>
|
||||
<div
|
||||
class="Menu noselect auto fixed"
|
||||
style="top: 40px;"
|
||||
>
|
||||
<div
|
||||
class="menu-contents"
|
||||
@ -431,6 +432,7 @@ exports[`components/sidebarBoardItem sidebar board item for guest 1`] = `
|
||||
</button>
|
||||
<div
|
||||
class="Menu noselect auto fixed"
|
||||
style="top: 40px;"
|
||||
>
|
||||
<div
|
||||
class="menu-contents"
|
||||
|
@ -82,4 +82,175 @@ describe('components/standardProperties/statusProperty/EditStatusPropertyDialog'
|
||||
const {container} = render(component)
|
||||
expect(container).toMatchSnapshot()
|
||||
})
|
||||
|
||||
test('no value in any column', () => {
|
||||
const noValueConfig: StatusCategory[] = [
|
||||
{
|
||||
id: 'category_id_1',
|
||||
title: 'Not Started',
|
||||
options: [],
|
||||
emptyState: {
|
||||
icon: (<BlackCheckboxOutline/>),
|
||||
color: '--sys-dnd-indicator-rgb',
|
||||
text: {
|
||||
id: 'statusProperty.configDialog.todo.emptyText',
|
||||
defaultMessage: 'Drag statuses here to consider tasks with these statuses “Not Started”',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'category_id_2',
|
||||
title: 'In progress',
|
||||
options: [],
|
||||
emptyState: {
|
||||
icon: (<ClockOutline/>),
|
||||
color: '--away-indicator-rgb',
|
||||
text: {
|
||||
id: 'statusProperty.configDialog.inProgress.emptyText',
|
||||
defaultMessage: 'Drag statuses here to consider tasks with these statuses “in progress”',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'category_id_3',
|
||||
title: 'Completed',
|
||||
options: [],
|
||||
emptyState: {
|
||||
icon: (<CheckIcon/>),
|
||||
color: '--online-indicator-rgb',
|
||||
text: {
|
||||
id: 'statusProperty.configDialog.complete.emptyText',
|
||||
defaultMessage: 'Drag statuses here to consider tasks with these statuses ”Done”',
|
||||
},
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
const component = wrapRBDNDContext(
|
||||
wrapIntl(
|
||||
<EditStatusPropertyDialog
|
||||
valueCategories={noValueConfig}
|
||||
onClose={() => {}}
|
||||
onUpdate={() => {}}
|
||||
/>,
|
||||
))
|
||||
|
||||
const {container} = render(component)
|
||||
expect(container).toMatchSnapshot()
|
||||
})
|
||||
|
||||
test('5 columns', () => {
|
||||
const initialValueCategoryValue: StatusCategory[] = [
|
||||
{
|
||||
id: 'category_id_1',
|
||||
title: 'Column 1',
|
||||
options: [
|
||||
{id: 'status_id_1', value: 'Pending Design', color: 'propColorPurple'},
|
||||
{id: 'status_id_2', value: 'TODO', color: 'propColorYellow'},
|
||||
{id: 'status_id_3', value: 'Pending Specs', color: 'propColorGray'},
|
||||
],
|
||||
emptyState: {
|
||||
icon: (<BlackCheckboxOutline/>),
|
||||
color: '--sys-dnd-indicator-rgb',
|
||||
text: {
|
||||
id: 'statusProperty.configDialog.todo.emptyText',
|
||||
defaultMessage: 'Drag statuses here to consider tasks with these statuses “Not Started”',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'category_id_2',
|
||||
title: 'Column 2',
|
||||
options: [
|
||||
{id: 'status_id_4', value: 'In Progress', color: 'propColorBrown'},
|
||||
{id: 'status_id_5', value: 'In Review', color: 'propColorRed'},
|
||||
{id: 'status_id_6', value: 'In QA', color: 'propColorPink'},
|
||||
{id: 'status_id_7', value: 'Awaiting Cherrypick', color: 'propColorOrange'},
|
||||
],
|
||||
emptyState: {
|
||||
icon: (<ClockOutline/>),
|
||||
color: '--away-indicator-rgb',
|
||||
text: {
|
||||
id: 'statusProperty.configDialog.inProgress.emptyText',
|
||||
defaultMessage: 'Drag statuses here to consider tasks with these statuses “in progress”',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'category_id_3',
|
||||
title: 'Column 3',
|
||||
options: [
|
||||
{id: 'status_id_20', value: 'Done', color: 'propColorPink'},
|
||||
{id: 'status_id_21', value: 'Branch Cut', color: 'propColorGreen'},
|
||||
{id: 'status_id_22', value: 'Released', color: 'propColorDefault'},
|
||||
],
|
||||
emptyState: {
|
||||
icon: (<CheckIcon/>),
|
||||
color: '--online-indicator-rgb',
|
||||
text: {
|
||||
id: 'statusProperty.configDialog.complete.emptyText',
|
||||
defaultMessage: 'Drag statuses here to consider tasks with these statuses ”Done”',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'category_id_2',
|
||||
title: 'Column 4',
|
||||
options: [
|
||||
{id: 'status_id_54', value: 'Michael Scott', color: 'propColorOrange'},
|
||||
],
|
||||
emptyState: {
|
||||
icon: (<ClockOutline/>),
|
||||
color: '--away-indicator-rgb',
|
||||
text: {
|
||||
id: 'statusProperty.configDialog.inProgress.emptyText',
|
||||
defaultMessage: 'Drag statuses here to consider tasks with these statuses “in progress”',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'category_id_3',
|
||||
title: 'Column 5',
|
||||
options: [
|
||||
{id: 'status_id_22', value: 'Jim Halpert', color: 'propColorDefault'},
|
||||
],
|
||||
emptyState: {
|
||||
icon: (<CheckIcon/>),
|
||||
color: '--online-indicator-rgb',
|
||||
text: {
|
||||
id: 'statusProperty.configDialog.complete.emptyText',
|
||||
defaultMessage: 'Drag statuses here to consider tasks with these statuses ”Done”',
|
||||
},
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
const component = wrapRBDNDContext(
|
||||
wrapIntl(
|
||||
<EditStatusPropertyDialog
|
||||
valueCategories={initialValueCategoryValue}
|
||||
onClose={() => {}}
|
||||
onUpdate={() => {}}
|
||||
/>,
|
||||
))
|
||||
|
||||
const {container} = render(component)
|
||||
expect(container).toMatchSnapshot()
|
||||
})
|
||||
|
||||
test('0 columns', () => {
|
||||
const initialValueCategoryValue: StatusCategory[] = []
|
||||
|
||||
const component = wrapRBDNDContext(
|
||||
wrapIntl(
|
||||
<EditStatusPropertyDialog
|
||||
valueCategories={initialValueCategoryValue}
|
||||
onClose={() => {}}
|
||||
onUpdate={() => {}}
|
||||
/>,
|
||||
))
|
||||
|
||||
const {container} = render(component)
|
||||
expect(container).toMatchSnapshot()
|
||||
})
|
||||
})
|
||||
|
@ -10,7 +10,7 @@ import {Constants} from '../../../constants'
|
||||
|
||||
import DragHandle from '../../../widgets/icons/dragHandle'
|
||||
import EditIcon from '../../../widgets/icons/edit'
|
||||
import Menu from '../../../widgets/menu/menu'
|
||||
import Menu from '../../../widgets/menu'
|
||||
import MenuWrapper from '../../../widgets/menuWrapper'
|
||||
|
||||
import {IPropertyOption} from '../../../blocks/board'
|
||||
|
Loading…
Reference in New Issue
Block a user