Skip to content

Commit

Permalink
test(ui): tdd for 'should commit changes edits on return/enter'
Browse files Browse the repository at this point in the history
  • Loading branch information
bsbodden committed Feb 21, 2021
1 parent 9e1c6df commit 8570ba5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/main/webapp/src/app.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,14 @@ test('should exit edit mode on a second double click ', async t => {
.doubleClick(page.todoItemEdit(1))
.expect(page.todoItemToggle(1).visible).ok()
.expect(page.todoItemLabel(1).visible).ok();
});

test('should commit changes edits on return/enter', async t => {
await t
.doubleClick(page.todoItemLabel(1))
.typeText(page.todoItemEdit(1), ' now!')
.pressKey('enter')
.expect(page.todoItemToggle(1).visible).ok()
.expect(page.todoItemLabel(1).visible).ok()
.expect(page.todoItem(1).innerText).contains('Wake up now!');
});

0 comments on commit 8570ba5

Please sign in to comment.