diff --git a/addon/components/link/component.ts b/addon/components/link/component.ts deleted file mode 100644 index 1ab5fd99..00000000 --- a/addon/components/link/component.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { deprecate } from '@ember/debug'; -import Component from '@glimmer/component'; - -import { LinkHelperNamedParams as LinkArgs } from '../../helpers/link'; - -export { LinkArgs }; - -export default class LinkComponent extends Component { - constructor(owner: unknown, args: LinkArgs) { - super(owner, args); - - deprecate( - '`` component is deprecated. Use `(link)` helper instead.', - false, - { - id: 'ember-link.link-component', - until: '3.0.0', - for: 'ember-link', - since: { - available: '2.1.0', - enabled: '2.1.0' - } - } - ); - } -} diff --git a/addon/components/link/template.hbs b/addon/components/link/template.hbs deleted file mode 100644 index 136ba490..00000000 --- a/addon/components/link/template.hbs +++ /dev/null @@ -1,12 +0,0 @@ -{{~yield - (link - route=@route - models=@models - model=@model - query=@query - fromURL=@fromURL - preventDefault=@preventDefault - onTransitionTo=@onTransitionTo - onReplaceWith=@onReplaceWith - ) -~}} diff --git a/tests/acceptance/link-test.ts b/tests/acceptance/link-test.ts index 7094bcb0..647ef310 100644 --- a/tests/acceptance/link-test.ts +++ b/tests/acceptance/link-test.ts @@ -31,7 +31,7 @@ module('Acceptance | link', function (hooks) { this.owner.register( 'template:application', hbs` - + {{#let (link route="foo") as |l|}} Link - + {{/let}} ` ); @@ -59,7 +59,7 @@ module('Acceptance | link', function (hooks) { this.owner.register( 'template:application', hbs` - + {{#let (link route="with-model" models=(array 123)) as |l|}} Link - + {{/let}} ` ); @@ -87,7 +87,7 @@ module('Acceptance | link', function (hooks) { this.owner.register( 'template:application', hbs` - + {{#let (link route="with-model" model="123") as |l|}} Link - + {{/let}} ` ); @@ -115,7 +115,7 @@ module('Acceptance | link', function (hooks) { this.owner.register( 'template:application', hbs` - + {{#let (link route="parent.child" models=(array 123 456)) as |l|}} Link - + {{/let}} ` ); @@ -145,7 +145,7 @@ module('Acceptance | link', function (hooks) { this.owner.register( 'template:application', hbs` - + {{#let (link route="with-model" models=(array 123)) as |l|}} Link - - + {{/let}} + {{#let (link route="with-model" models=(array 456)) as |l|}} Link - + {{/let}} ` ); @@ -209,7 +209,7 @@ module('Acceptance | link', function (hooks) { this.owner.register( 'template:application', hbs` - + {{#let (link route="foo" query=(hash qp=123)) as |l|}} Link - - + {{/let}} + {{#let (link route="foo" query=(hash qp=456)) as |l|}} Link - + {{/let}} ` ); @@ -277,7 +277,7 @@ module('Acceptance | link', function (hooks) { this.owner.register( 'template:application', hbs` - + {{#let (link route="foo" query=(hash qp=123)) as |l|}} Link - + {{/let}} ` ); @@ -331,7 +331,7 @@ module('Acceptance | link', function (hooks) { this.owner.register( 'template:application', hbs` - + {{#let (link route="foo" query=(hash qp=123)) as |l|}} Link - + {{/let}} ` ); @@ -406,7 +406,7 @@ module('Acceptance | link', function (hooks) { this.owner.register( 'template:application', hbs` - + {{#let (link route="foo" query=(hash qp=123) onTransitionTo=this.spy) as |l|}} Link - + {{/let}} ` ); @@ -438,7 +438,7 @@ module('Acceptance | link', function (hooks) { this.owner.register( 'template:application', hbs` - + {{#let (link route="foo" query=(hash qp=123) onReplaceWith=this.spy) as |l|}} Link - + {{/let}} ` ); diff --git a/tests/integration/components/link-test.ts b/tests/helpers/link-test.ts similarity index 91% rename from tests/integration/components/link-test.ts rename to tests/helpers/link-test.ts index 8adbd42e..731e8921 100644 --- a/tests/integration/components/link-test.ts +++ b/tests/helpers/link-test.ts @@ -8,7 +8,7 @@ import { setupLink } from 'ember-link/test-support'; import waitForError from 'dummy/tests/helpers/wait-for-error'; -module('Integration | Component | link', function (hooks) { +module('Integration | Helper | link', function (hooks) { setupRenderingTest(hooks); for (const withSetupLink of [false, true]) { @@ -23,7 +23,7 @@ module('Integration | Component | link', function (hooks) { // Regression for: https://github.com/buschtoens/ember-link/issues/126 test('it renders', async function (assert) { await render(hbs` - + {{#let (link route="foo") as |l|}} Link - + {{/let}} `); assert @@ -43,7 +43,7 @@ module('Integration | Component | link', function (hooks) { test('triggering a transition has no effect', async function (assert) { await render(hbs` - + {{#let (link route="foo") as |l|}} Link - + {{/let}} `); assert.strictEqual(currentURL(), null); @@ -72,7 +72,7 @@ module('Integration | Component | link', function (hooks) { module('with incomplete models', function () { test('it renders', async function (assert) { await render(hbs` - + {{#let (link route="parent.second-child") as |l|}} Link - + {{/let}} `); assert @@ -92,7 +92,7 @@ module('Integration | Component | link', function (hooks) { test('triggering a transition has no effect', async function (assert) { await render(hbs` - + {{#let (link route="parent.second-child") as |l|}} Link - + {{/let}} `); assert.strictEqual(currentURL(), null); @@ -120,7 +120,7 @@ module('Integration | Component | link', function (hooks) { test('it does not break any following LinkTo components', async function (assert) { await render(hbs` - + {{#let (link route="parent.second-child") as |l|}} Link - + {{/let}} Link