Skip to content

Commit

Permalink
remove empty-line and add callbacks to tests to make sure they wait f…
Browse files Browse the repository at this point in the history
…or change event
  • Loading branch information
Harry-Ph committed Mar 2, 2020
1 parent 0cce7f3 commit c770254
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/vaadin-radio-group.html
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,6 @@
});

describe('change event', () => {

it('should fire on right/down', () => {
vaadinRadioButtonList[1].focus();
vaadinRadioButtonList[1].checked = true;
Expand Down Expand Up @@ -623,17 +622,19 @@
animationFrameFlush(done);
});

it('should value on the vaadin-radio-group is updated at the time when change is fired', () => {
it('should value on the vaadin-radio-group is updated at the time when change is fired', done => {
vaadinRadioButtonGroup.addEventListener('change', e => {
expect(vaadinRadioButtonGroup.value).to.equal(vaadinRadioButtonList[2].value);
done();
});
vaadinRadioButtonList[2].click();
});

it('should change event on radio-group includes updated value', () => {
it('should change event on radio-group includes updated value', done => {
vaadinRadioButtonGroup.addEventListener('change', e => {
expect(e.target.textContent).to.equal(vaadinRadioButtonList[2].textContent);
expect(e.currentTarget.value).to.equal(vaadinRadioButtonList[2].value);
done();
});
vaadinRadioButtonList[2].click();
});
Expand Down

0 comments on commit c770254

Please sign in to comment.