Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

Commit

Permalink
Passing test for signed in user
Browse files Browse the repository at this point in the history
This fixes it, tried directly finding the element and using webdrivers
text method first but this has the same incorrect idea about the dom.
Not found anything obvious about this issue in phantom 1.9.7 and don't
want to spend too long so using this hack for now. These tests may
become defunct soon anyway.
  • Loading branch information
jcbashdown committed Jun 10, 2014
1 parent 14994fe commit 51f856e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion features/admin/signin.feature
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Feature: Sign in
Given I am logged in as "Max" with email "test@example.com"
When I go to "/"
Then I should get a "cache-control" header of "private, must-revalidate"
And I should see the text "Signed in as Max"
And I should see the signed in user "Max"

Scenario: Show signed in list of actions
Given I am logged in as "Alex" with email "test@example.com"
Expand Down
7 changes: 7 additions & 0 deletions features/steps/splinter.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ def step(context, message):
assert context.client.browser.is_text_present(message)


@then(u'I should see the signed in user "{name}"')
def step(context, name):
signed_in_text = context.client.browser.evaluate_script(
'document.querySelector("p.navbar-text").innerText;')
assert signed_in_text == "Signed in as {}".format(name)


@then(u'the "{data_set_name}" data_set should contain in any order')
def step(context, data_set_name):
data_set_contains(context, data_set_name, contains_inanyorder)
Expand Down

0 comments on commit 51f856e

Please sign in to comment.