From 6bce2f9ea2060c0d6c4cc91fde13d20d1b79e768 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Wed, 27 Mar 2024 15:02:44 -0400 Subject: [PATCH] Remove tests for code that was supposed to be removed in v4 --- .../components/curly-components-test.js | 43 +++---------------- .../lib/plugins/assert-against-attrs.ts | 1 + 2 files changed, 6 insertions(+), 38 deletions(-) diff --git a/packages/@ember/-internals/glimmer/tests/integration/components/curly-components-test.js b/packages/@ember/-internals/glimmer/tests/integration/components/curly-components-test.js index 93c34a8ccf6..6985228fb44 100644 --- a/packages/@ember/-internals/glimmer/tests/integration/components/curly-components-test.js +++ b/packages/@ember/-internals/glimmer/tests/integration/components/curly-components-test.js @@ -1269,7 +1269,7 @@ moduleFor( ['@test non-block with properties on this.attrs']() { this.registerComponent('non-block', { - template: 'In layout - someProp: {{this.attrs.someProp}}{{log this.attrs}}', + template: 'In layout - someProp: {{@someProp}}', }); this.render('{{non-block someProp=this.prop}}', { @@ -1476,13 +1476,10 @@ moduleFor( ); } - ['@test this.attrs.foo === @foo === foo']() { + ['@test @foo === foo']() { this.registerComponent('foo-bar', { template: strip` - Args: {{this.attrs.value}} | {{@value}} | {{this.value}} - {{#each this.attrs.items as |item|}} - {{item}} - {{/each}} + Args: {{@value}} | {{this.value}} {{#each @items as |item|}} {{item}} {{/each}} @@ -1506,11 +1503,11 @@ moduleFor( this.context.set('model.items', [1]); }); - this.assertText(strip`Args: lul | lul | lul111`); + this.assertText(strip`Args: lul | lul11`); runTask(() => this.context.set('model', { value: 'wat', items: [1, 2, 3] })); - this.assertText('Args: wat | wat | wat123123123'); + this.assertText('Args: wat | wat123123'); } ['@test non-block with properties on self']() { @@ -1575,36 +1572,6 @@ moduleFor( }, "Using {{attrs}} to reference named arguments is not supported. {{attrs.someProp}} should be updated to {{@someProp}}. ('my-app/templates/components/with-block.hbs' @ L1:C24) "); } - ['@test block with properties on this.attrs']() { - this.registerComponent('with-block', { - template: 'In layout - someProp: {{this.attrs.someProp}} - {{yield}}', - }); - - this.render( - strip` - {{#with-block someProp=this.prop}} - In template - {{/with-block}}`, - { - prop: 'something here', - } - ); - - this.assertText('In layout - someProp: something here - In template'); - - runTask(() => this.rerender()); - - this.assertText('In layout - someProp: something here - In template'); - - runTask(() => this.context.set('prop', 'something else')); - - this.assertText('In layout - someProp: something else - In template'); - - runTask(() => this.context.set('prop', 'something here')); - - this.assertText('In layout - someProp: something here - In template'); - } - ['@test block with named argument']() { this.registerComponent('with-block', { template: 'In layout - someProp: {{@someProp}} - {{yield}}', diff --git a/packages/ember-template-compiler/lib/plugins/assert-against-attrs.ts b/packages/ember-template-compiler/lib/plugins/assert-against-attrs.ts index e2372ba1da4..3653c31e432 100644 --- a/packages/ember-template-compiler/lib/plugins/assert-against-attrs.ts +++ b/packages/ember-template-compiler/lib/plugins/assert-against-attrs.ts @@ -32,6 +32,7 @@ export default function assertAgainstAttrs(env: EmberASTPluginEnvironment): ASTP stack.push(parent.concat(blockParams)); } + // https://deprecations.emberjs.com/v3.x#toc_attrs-arg-access return { name: 'assert-against-attrs',