GrailsInAction / graina2

Source code for the 2nd edition of Grails in Action
90 stars 92 forks source link

MEAP v13 ch09 Geb Test uses wrong selector for Timeline.gsp #69

Closed EdZilla closed 10 years ago

EdZilla commented 10 years ago

Delete me. This is a duplicate.

The timeline.gsp file specifies a class but the geb test is looking for a div id, instead of a class reference. TimelinePage.groovy: static at = { $("title").text().contains("Timeline for") $("#allPosts") <-- div id selector } timeline.gsp: <-- div class ${post.content}

/g:each The test will pass if you change TimelinePage.groovy to use a div class selector: static at = { $("title").text().contains("Timeline for") //$("#allPosts") $("div.allPosts") <--- div class selector }