-
Notifications
You must be signed in to change notification settings - Fork 12
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
[Bug] 3.24.2 - up to - 3.25.3: href
empty from links in rendering tests
#554
Comments
Depending on how this addon does URL generation, I suspect it has to do roughly the same thing as the Ember PR's:
|
@esbanarango that is roughly how Ember up until now also behaved and the addon tries to follow what Ember itself does. we even explicitly test for this behavior in the test suite here. |
@Turbo87 mmmm that's weird. Looks like this is actually testing it to be "empty" https://github.com/buschtoens/ember-link/blob/master/tests/integration/components/link-test.ts#L40 or to be an ember selector (?) if you're using the I don't think this is up with how Ember is behaving now. This same test: module('Integration | Component | TMP', function (hooks) {
setupRenderingTest(hooks);
test('href test', async function (assert) {
assert.expect(1);
await render(hbs`<LinkTo @route="login">test</LinkTo>`);
assert.dom('a').hasAttribute('href', `/login`);
});
}); works fine with But this one breaks with module('Integration | Component | TMP', function (hooks) {
setupRenderingTest(hooks);
test('href test', async function (assert) {
assert.expect(1);
await render(hbs`
{{#let (link route="login") as |l|}}
<a href={{l.url}}>Login</a>
{{/let}}
`);
assert.dom('a').hasAttribute('href', `/login`);
});
});
|
yes, because Ember changed its behavior multiple times lately 🤷♂️ |
Yeah :/ sorry about this. We are trying to make the default behavior appropriate out of the box. From my perspective, the current implemetnation (in 3.24.3 and 3.25.3) is much better... |
I asked if this behavior were a bug in the related issue. Good to know that we will have a fix for it! 👏🏼🧡 |
@Turbo87 I tried tackling this issue but I think I'm missing some context on how you guys are matching the way Ember behaves. Is this on your radar 🙏 ? |
🐞 Describe the Bug
In a rendering test the
link
helper always return an emptyhref
.🔬 Minimal Reproduction
😕 Actual Behavior
Element
a
has an empty attribute "href".🤔 Expected Behavior
Element
a
has attribute "href" with value "/login"🌍 Environment
➕ Additional Context
emberjs/ember.js#19408
The text was updated successfully, but these errors were encountered: