Fix the issue where clicking on the + button at the top of a board group wouldn't open the newly-added card (#1708)

Co-authored-by: Moncy Gopalan <ilusivespectre@gmail.com>
This commit is contained in:
Moncy Gopalan 2021-11-15 14:56:51 +05:30 committed by GitHub
parent d2bcb9ad66
commit e9e86d8457
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 2 deletions

View file

@ -73,6 +73,15 @@ describe('Create and delete board / card', () => {
cy.get('.Dialog.dialog-back .wrapper').click({force: true});
});
it('Can create a card by clicking on the + button', () => {
// Create a card by clicking on the + button
cy.get('.KanbanColumnHeader :nth-child(5) > .CompassIcon ').click();
cy.get('.CardDetail').should('exist');
// Close card
cy.get('.Dialog.dialog-back .wrapper').click({force: true});
});
it('Can create a table view', () => {
// Create table view
// cy.intercept('POST', '/api/v1/blocks').as('insertBlocks');

View file

@ -29,7 +29,7 @@ type Props = {
groupByProperty?: IPropertyTemplate
intl: IntlShape
readonly: boolean
addCard: (groupByOptionId?: string) => Promise<void>
addCard: (groupByOptionId?: string, show?: boolean) => Promise<void>
propertyNameChanged: (option: IPropertyOption, text: string) => Promise<void>
onDropToColumn: (srcOption: IPropertyOption, card?: Card, dstOption?: IPropertyOption) => void
calculationMenuOpen: boolean
@ -180,7 +180,9 @@ export default function KanbanColumnHeader(props: Props): JSX.Element {
</MenuWrapper>
<IconButton
icon={<AddIcon/>}
onClick={() => props.addCard(group.option.id)}
onClick={() => {
props.addCard(group.option.id, true)
}}
/>
</>
}