Skip to content

Commit

Permalink
Added Profile Module
Browse files Browse the repository at this point in the history
  • Loading branch information
jhamit committed Oct 17, 2012
1 parent 0a082e8 commit a07ee07
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/test/groovy/modules/ProfileModule.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import geb.*

class ProfileModule extends Module {
static content = {
profileCard { $('.profile-card') }
fullname { profileCard.find('.fullname') }
handle { profileCard.find('.username') }
description { profileCard.find('.bio') }
location { profileCard.find('.location') }
website { profileCard.find('.url') }
avatar { profileCard.find('img.avatar') }
}

def isAvatarDefault() {
avatar.attr('src').contains('/default_profile_images/')
}
}
1 change: 1 addition & 0 deletions src/test/groovy/pages/TwitterPage.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ class TwitterPage extends Page {
static url = "http://twitter.com"
static content = {
tweets { module TweetModule }
profileCard { module ProfileModule }
}
}

0 comments on commit a07ee07

Please sign in to comment.