GreenStepsChatt/greensteps

Show matcher should be scoped to the expected object

開放

#20 建立於 2017年9月21日

 (0 則留言) (0 個反應) (0 位負責人)Ruby (30 個分叉)auto 404
help wantedready

倉庫指標

星標
 (12 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

Right now, the show matcher ignores what is passed to expect. It just looks to see if the specified page object is anywhere on the page. When we expect one page object to be a child of another, it would be nice to be able to say something like

expect(dashboard).to show :deed_form

This example comes from user_logs_deed_spec.rb. Right now, we can only assert that both objects are on the page:

expect(page).to show :deed_form
expect(page).to show :dashboard

With the way things are now if we were to say expect(dashboard).to show :deed_form it would pass, even if the deed form wasn't a child of the dashboard but was elsewhere on the page.

貢獻者指南