There are two directives that are displayed based on the configuration of a variable. This was working visually, but I encountered an issue during acceptance tests. I tried to test whether both directives would be hidden if the <settingElement>
had not been clicked to configure the var selected
. The test passed for <directiveA>
, but failed for <directiveB>
, which left me feeling a bit puzzled.
Here is an example snippet of the code:
<settingElement ng-click="selected = trueOrFalse()"></settingElement>
<directiveA ng-show="selected"></directiveA>
<directiveB ng-show="!selected"></directiveB>