Open zepumph opened 6 years ago
@jessegreenberg could you help me out with this one? Or maybe could we do it together?
I thought about one more test that would be nice here, relating to having accessible content or not.
var m = new Node();
var n = new Node( {tagName: 'div' });
m[ addAssociationFunction ]( {
otherNode: n,
thisElementName: AccessiblePeer.PRIMARY_SIBLING,
otherElementName: AccessiblePeer.LABEL_SIBLING
} );
m.tagName = 'div';
/* test */
var m = new Node();
var n = new Node();
m[ addAssociationFunction ]( {
otherNode: n,
thisElementName: AccessiblePeer.PRIMARY_SIBLING,
otherElementName: AccessiblePeer.LABEL_SIBLING
} );
m.tagName = 'div';
n.tagName = 'div';
/* test */
Good idea @zepumph. In a dev meeting a while ago, we added more tests to verify behavior after other changes to the scene graph such as adding/removing children, reordering children, and more than one association. I also took a look at the way describedby is being tested in the same way, it looks very nice. Removing my assignment for now, but feel free to reassign if you wish.
We are testing dag pretty well one just 1 case (when you are labelledby yourself).