Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ComplainWith is not working with seeThatResponse consequence #1370

Closed
ricardorlg opened this issue Sep 11, 2018 · 5 comments
Closed

ComplainWith is not working with seeThatResponse consequence #1370

ricardorlg opened this issue Sep 11, 2018 · 5 comments

Comments

@ricardorlg
Copy link
Contributor

I'm using serenity screenplay rest, and I notice that using complain with is not working with serenity seeThatResponse consequence, looks like the complainwith method is not invoked after a failure serenity doesn't use my own exception or message.

@wakaleo
Copy link
Member

wakaleo commented Sep 11, 2018

Thanks for noticing this. Could you propose a PR?

@ricardorlg
Copy link
Contributor Author

sure, I will upload a PR with also some changes to Rest interactions in order to allow logging on execution. I have another question, askfor call doesn't add subject value to step name in the report, this is because is called outside Consequence wrapper?

@wakaleo
Copy link
Member

wakaleo commented Sep 11, 2018

Could you give an example of what you mean?

@ricardorlg
Copy link
Contributor Author

for example:

class TestFact : Fact {

    lateinit var products: List<Something>

    override fun setup(actor: Actor) {
        theActor(actor) {
           products= asksFor(aQuestion())
        }
    }
}

here aQuestion is a Question that has subject annotation, but if I run the test, the report ignores that, I thinks because askfor is not called inside nothing that adds something to the step report right?

@wakaleo
Copy link
Member

wakaleo commented Oct 13, 2018

Yes, I think, since the question is getting invoked inside the setup and before the reporting has started.

@wakaleo wakaleo closed this as completed Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants