Skip to content

Commit

Permalink
improved change_user_role function and test
Browse files Browse the repository at this point in the history
  • Loading branch information
bernardofire committed Jul 14, 2011
1 parent 97a8f7d commit 5edeb62
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion splinterplone/testcase.py
Expand Up @@ -65,7 +65,7 @@ def portal_add_user(self, fullname, username, email, password):
def portal_change_user_role(self, username, new_role):
self.portal_click_a_personaltool('Site Setup')
self.browser.click_link_by_text('Users and Groups')
self.browser.find_by_xpath("//table[@class='listing']//tr[td/input[@value='%s']]//input[@value='%s']" % (username, new_role)).first.click()
self.browser.find_by_xpath("//tr[*/input[@value='%s']]//input[@value='%s']" % (username, new_role)).first.click()
self.browser.find_by_name('form.button.Modify').first.click()


Expand Down
2 changes: 1 addition & 1 deletion splinterplone/tests/basic_features.txt
Expand Up @@ -51,7 +51,7 @@ Basic Features of Splinter-Plone

Changing portal user role
>>> self.portal_change_user_role('testuser','Manager')
>>> self.find_by_xpath("//table[@class='listing']//tr[td/input[@value='testuser']]//input[@value='Manager']").checked
>>> self.find_by_xpath("//tr[*/input[@value='testuser']]//input[@value='Manager']").checked
True

List portal states, for example home
Expand Down

0 comments on commit 5edeb62

Please sign in to comment.