Skip to content

Commit

Permalink
test(ui): tdd for 'should cancel edits on click outside of edit field'
Browse files Browse the repository at this point in the history
  • Loading branch information
bsbodden committed Feb 23, 2021
1 parent 66c1366 commit 29d2e55
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/webapp/src/app.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,4 +177,12 @@ test('should cancel edits on escape', async t => {
.typeText(page.todoItemEdit(2), 'foo')
.pressKey('esc')
.expect(page.todoItem(2).innerText).contains(TODO_ITEM_TWO);
});

test('should cancel edits on click outside of edit field', async t => {
await t
.doubleClick(page.todoItemLabel(2))
.typeText(page.todoItemEdit(2), 'foo')
.click(page.title)
.expect(page.todoItem(2).innerText).contains(TODO_ITEM_TWO);
});

0 comments on commit 29d2e55

Please sign in to comment.