featurist / browser-monkey

Reliable DOM testing
https://browsermonkey.org
53 stars 6 forks source link

shouldHave can take a hierarchy of objects representing child compone… #14

Closed dereke closed 8 years ago

dereke commented 8 years ago

turn this:

flight1.depart().airport().shouldHave({text: 'SYD'}),
flight1.depart().date().shouldHave({text: '09 Aug'}),
flight1.depart().time().shouldHave({text: '11:00'}),
flight1.arrive().airport().shouldHave({text: 'DXB'}),
flight1.arrive().date().shouldHave({text: '10 Aug'}),
flight1.arrive().time().shouldHave({text: '07:00'}),

into this:

flight1.shouldHave({
  depart: {
    airport: {text: 'SYD'},
    date: {text: '09 Aug'},
    time: {text: '11:00'},
  },
  arrive: {
    airport: {text: 'DXB'},
    date: {text: '10 Aug'},
    time: {text: '07:00'},
  }
}),
dereke commented 8 years ago

@refractalize hey I want to go ahead and merge this in now unless you have any reservations?