Skip to content

Commit

Permalink
test for inner content change, see #852
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed Feb 14, 2019
1 parent f9c78fb commit fba1170
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion js/accessibility/AccessibleSiblingTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,14 @@ define( function( require ) {

// udpdate so the display to position elements
display.updateDisplay();
assert.ok( siblingBoundsCorrect( inputElement ), 'input element descendant incorrectly positioned' );
assert.ok( siblingBoundsCorrect( buttonElement ), 'button element descendant correctly positioned' );
assert.ok( siblingBoundsCorrect( inputElement ), 'input element descendant correctly positioned' );

// when inner content of an element changes, its client bounds change - make sure that the element still matches
// the Node
buttonElement.innerHTML = 'Some Test';
display.updateDisplay();
assert.ok( siblingBoundsCorrect( buttonElement ), 'button element descendant correclty positioned after inner content changed' );

// remove the display element so it doesn't interfere with qunit api
document.body.removeChild( display.domElement );
Expand Down

0 comments on commit fba1170

Please sign in to comment.