1
0
mirror of https://github.com/mattermost/focalboard.git synced 2025-01-23 18:34:02 +02:00

Test: randomize icons

This commit is contained in:
Chen-I Lim 2020-10-15 19:36:49 -07:00
parent fd2f7ceb11
commit dbcbe286e7

View File

@ -265,6 +265,7 @@ class BoardComponent extends React.Component<Props, State> {
{ id: "exportBoardArchive", name: "Export board archive" },
{ id: "testAdd100Cards", name: "TEST: Add 100 cards" },
{ id: "testAdd1000Cards", name: "TEST: Add 1,000 cards" },
{ id: "testRandomizeIcons", name: "TEST: Randomize icons" },
]
OldMenu.shared.onMenuClicked = async (id: string) => {
@ -281,6 +282,10 @@ class BoardComponent extends React.Component<Props, State> {
this.testAddCards(1000)
break
}
case "testRandomizeIcons": {
this.testRandomizeIcons()
break
}
}
}
OldMenu.shared.showAtElement(e.target as HTMLElement)
@ -309,6 +314,14 @@ class BoardComponent extends React.Component<Props, State> {
}
}
private async testRandomizeIcons() {
const { boardTree } = this.props
for (const card of boardTree.cards) {
mutator.changeIcon(card, BlockIcons.shared.randomIcon(), "randomize icon")
}
}
private async propertiesClicked(e: React.MouseEvent) {
const { boardTree } = this.props
const { activeView } = boardTree