-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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.7] Assert that response contains strings in a specific order #22853
Conversation
Looks like the build failed due to commits unrelated to this pull request in the master branch. |
Wouldn't a |
Could someone enlighten me about these test methods and their difference for the old system that was moved out to https://github.com/laravel/browser-kit-testing with the introduction of Dusk. Aren't we just introducing the architecture extracted away back into the framework one method at a time? |
@GuidoHendriks That's in there... take a look at the files changed. |
@helmut Sorry about that. Not sure how I missed that, I specifically looked for that. |
@sisve in a way,I believe browser-kit-testing was the friendly deprecation that sometimes you miss. With Dusk, it was moved to a package in order to be removed from the framework and make room for tests focused only in the application itself without the mentality that we're trying to cover the lack of a real browser. A lot of stuff was just renamed, which would be breaking. At least that's how I look at it: a rework with a different mindset. |
@sisve Browser Kit was unusable basically for all modern applications that rely on JavaScript. |
@taylorotwell I understand that, but these new methods that are slowly merged back in has the exact same problem. And this new test code has assertSee/assertDontSee/assertSeeText/assertDontSeeText, and the extracted browserkit package has see/dontSee/seeText/dontSeeText. I guess I am wondering why the previous code was extracted out, if the functionality should be kept. |
@sisve sorry... wasn't thinking clearly on my last response and was commenting as if this was a PR to the Dusk repository 🤕 |
This would go to 5.6 branch. |
Just to be clear, are you asking me to submit this again to the 5.6 branch? |
Yes, that's what he said. |
As discussed in the internals message board here is a proposed implementation for some additional assertions that can check the response for strings ensuring they appear in a particular order. This is especially important when testing sorting functionality.
For example:
No stress if you guys don't want to include this in the core or have a better way to implement.