Skip to content

Commit

Permalink
test: add test
Browse files Browse the repository at this point in the history
  • Loading branch information
jajugoguma committed Jan 4, 2024
1 parent 33f1766 commit fce9765
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions packages/toast-ui.grid/cypress/integration/keyMap.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,29 @@ describe('Move focus on enter', () => {

assertFocusedCell('name', 0);
});

it('should finish editing on last cell', () => {
createGrid({
columns: [
{ name: 'name', editor: 'text' },
{ name: 'value', editor: 'text' },
{ name: 'age', editor: 'text' },
],
moveDirectionOnEnter: 'nextCell',
});
cy.getCellByIdx(3, 1).click();

clipboardType('{enter}');
editingLayerType('{enter}');

assertFocusedCell('age', 3);
cy.getByCls('layer-editing').should('be.visible');

editingLayerType('{enter}');

assertFocusedCell('age', 3);
cy.getByCls('layer-editing').should('not.be.visible');
});
});

describe('Selection', () => {
Expand Down

0 comments on commit fce9765

Please sign in to comment.