- page.within(:xpath, '//tr[@data-object-uuid][1]') do
- assert (text.include? 'foo@example.com false'), 'Expected email'
- new_user_uuid = text.split[0]
+ # verify that the new user showed up in the users page and find
+ # the new user's UUID
+ new_user_uuid =
+ find('tr[data-object-uuid]', text: 'foo@example.com')['data-object-uuid']
+ assert new_user_uuid, "Expected new user uuid not found"