-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
currentURL()
result when at root has changed in Ember 1.12.0-beta.1
#10784
Comments
The change seems odd to me. It is likely a result of the boot process changes, but it does not seem like an intentional change to me... Demos:
|
Could this be related to #10801? |
Not sure, it was not fixed by #10805. Beta JSBin after #10805: http://emberjs.jsbin.com/rwjblue/380/edit?html,js,output |
Thanks for showing how to construct a test environment in a JSBin, @rwjblue. That’ll likely be useful for me in the future. |
I'm seeing strange behavior with it('routes direct', function() {
visit('/account/settings/profile');
return andThen(function() {
expect(currentRouteName()).to.equal('account.settings.profile'); // Passes
expect(currentURL()).to.equal('/account/settings/profile'); // returns empty string
});
}); Let me know if I can provide additional info. |
I have the same issue with #canary using Qunit
|
I' m seeing this too -
This passes in 1.11.3, but fails in 1.12.0-beta.3. |
I'm having the same problem, upgrading from 1.11.3 to 1.12 (release). |
Just tried testing again- still having it as well. |
@achambers @saitheexplorer @samcic "me too" comments are not helpful and will only cause the thread to be closed for owners only. Comment if you have found a workaround, a fix or a clue that will lead to the culprit. |
@givanse Fair, but given the radio silence on what seems to be a regression (tests that passed in 1.11 no longer pass in 1.12 and changelog doesn't mention this being deprecated), my "me too" comment is an attempt to let the owners know that this is an issue that affects more people than just the OP. Not to belabor the point, but #10850 has a pretty detailed reproduction, and there hasn't been a response there either. Point taken though; I'll see if I can debug further and come up with some answers. Thanks. |
@backspace I did some hunting around today and may have tracked this down. I've got a PR up at #11201. We'll see how it goes. 😄 |
Yes, thanks for figuring it out, @elskwid! |
In short:
We have been developing an Ember CLI application on the 1.11 betas, so today I updated to the first 1.12 beta to try it out. Everything continued to work except a few acceptance test assertions about the
currentURL()
.Previously, if the application was at
/
,currentURL()
returned/
. Now it returns an empty string. On other routes, it still returns a string with/
at the beginning.When I run
ApplicationName.__container__.lookup('router:main').location.getURL()
in development, which I believe is the same code used bycurrentURL()
, I get/
. So this in-test behaviour seems incorrect to me.It seemed infeasible to make a JSBin to demonstrate this since it’s only happening in tests, but I did create a small demonstration Ember CLI application. I did verify that it’s still happening in the canary version.
It’s trivial to change our tests to look for an empty string instead of
/
, so if that’s the intended behaviour just let me know and I’ll update the tests so we can keep working with the betas.The text was updated successfully, but these errors were encountered: