From fba11705b6b32ae9517a5199ec278e0b13badc88 Mon Sep 17 00:00:00 2001 From: Jesse Date: Wed, 13 Feb 2019 19:30:13 -0500 Subject: [PATCH] test for inner content change, see #852 --- js/accessibility/AccessibleSiblingTests.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/js/accessibility/AccessibleSiblingTests.js b/js/accessibility/AccessibleSiblingTests.js index 58b989dc1..f7629852c 100644 --- a/js/accessibility/AccessibleSiblingTests.js +++ b/js/accessibility/AccessibleSiblingTests.js @@ -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 );