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

[5.6] Assert that response contains strings in a specific order #22915

Merged
merged 1 commit into from
Jan 26, 2018

Conversation

helmut
Copy link
Contributor

@helmut helmut commented Jan 25, 2018

Submitting to 5.6 as requested in #22853

A proposed implementation for some additional assertions that can check the response for strings ensuring they appear in a particular order. This is very helpful when testing sorting functionality.

For example:

$response->assertSeeInOrder(['foo', 'bar', 'baz']);

@helmut
Copy link
Contributor Author

helmut commented Jan 25, 2018

If you do go with this, just let me know if you would like an assertSeeInOrder method for the dusk repo too...

@deleugpn
Copy link
Contributor

I don't think this makes sense in Dusk as the only way to achieve it would either hack a js execution or grab the whole HTML of the page to assert the order of things, which sort of defeats the purpose of an e2e test.

@helmut
Copy link
Contributor Author

helmut commented Jan 26, 2018

@deleugpn I don't want to go off track within this pull request too much. Not sure if I'm missing something in your response but there's no need to hack anything. The whole premise of dusk is that you are able to assert on the HTML of the page after JS execution has completed.

@taylorotwell taylorotwell merged commit 75d7e07 into laravel:5.6 Jan 26, 2018
@helmut helmut mentioned this pull request Feb 4, 2018
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

Successfully merging this pull request may close these issues.

None yet

3 participants