2012-04-05 3 views
0

Почему ниже описанный тест Geb с ошибкой ниже. Не могу ли я позвонить to SearchPage в том блоке?«to SearchPage» вызов из блока «then»

Condition not satisfied: 

to SearchPage 
| 
null 

    at test.LogoutSpec.Verify that the logout takes the user to login page(LogoutSpec.groovy:35) 



def "Verify that the logout takes the user to login page"() 
    { 
     given: "I successfully logged in to the application" 
     to LoginPage 
     loginForm.with 
     { 
      loginClientCode = "testingclient" 
      loginSystemCode = "testingsystem" 
      loginUserId = "abc" 
      loginPassword = "password1" 
     } 
     loginButton.click() 

     at SearchPage 
     section == "Search Applications" 

     when: "I click Log Out link from user panel" 
     userPanel.logOutLink.click() 

     then: "I am redirected to the LoginPage" 
     at LoginPage 

     and: "My session is invalidated" 
     //TODO how to verify this 
     to SearchPage 
    } 

ответ

0

then блок для утверждений. Если это поможет, вы можете добавить еще один-то и поставить to SearchPage в блок when.

Смежные вопросы