hinthealth / behave

Front-end testing helpers
MIT License
1 stars 0 forks source link

Finding multiple items when not expecting to #17

Open blakewest opened 9 years ago

blakewest commented 9 years ago

With the given view...

.modal(tabindex="-1" role="dialog")
  .modal-dialog
    .modal-content
      %form.form-horizontal(role='form' name='form' novalidate)
        .modal-header.text-highlight
          %a.close(ng-click="$hide()" type="button") ×
          %h4.modal-title
            Email This Charge Receipt

        .modal-body
          %h3 Patient Information
          %p Patient DOB: 5/19/87
          .form-group
            %label.col-xs-2 Send to
            .col-xs-6.no-padding-left
              %div(ng-show="charge.patient.id === charge.account.id")
                Joe Smitherson
            .col-xs-6.no-padding-left
              %select(ng-if="charge.patient.id !== charge.account.id"
              ng-model="emailParams.type")
                %option(value='')
                  Select a recipient
                %option(value="patient_charge_receipt")
                  {{charge.patient.name}} (patient)
                %option(value="payer_charge_receipt")
                  {{charge.account.name}} (payer)
            .col-xs-2
              %a.btn.btn-primary(ng-click="sendEmail(emailParams)")
                Send Email
        .modal-footer.panel-footer
          %a.btn.btn-default(ng-click="$hide()")
            Cancel

If I do find('Joe Smitherson'), it finds multiple items. wtf?