From d9a08be0703e44ea3289828d885cf876875596aa Mon Sep 17 00:00:00 2001
From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com>
Date: Wed, 27 Mar 2024 14:25:28 -0400
Subject: [PATCH 1/4] Remove attrs because they were deprecated for removal in
4.0
---
.../components/curly-components-test.js | 76 ++-------------
.../tests/integration/syntax/let-test.js | 20 ----
.../lib/plugins/assert-against-attrs.ts | 93 -------------------
.../lib/plugins/index.ts | 2 -
.../plugins/assert-against-attrs-test.js | 71 --------------
5 files changed, 7 insertions(+), 255 deletions(-)
delete mode 100644 packages/ember-template-compiler/lib/plugins/assert-against-attrs.ts
delete mode 100644 packages/ember-template-compiler/tests/plugins/assert-against-attrs-test.js
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 d3646a33074..c277351d100 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
@@ -165,7 +165,7 @@ moduleFor(
['@test layout supports computed property']() {
let FooBarComponent = Component.extend({
elementId: 'blahzorz',
- layout: computed(function () {
+ layout: computed(function() {
return compile('so much layout wat {{this.lulz}}');
}),
init() {
@@ -314,7 +314,7 @@ moduleFor(
['@test tagName can not be a computed property']() {
let FooBarComponent = Component.extend({
- tagName: computed(function () {
+ tagName: computed(function() {
return 'foo-bar';
}),
});
@@ -1259,38 +1259,6 @@ moduleFor(
this.assertText('somecomponent');
}
- ['@test non-block with properties access via attrs is asserted against']() {
- expectAssertion(() => {
- this.registerComponent('non-block', {
- template: 'In layout - someProp: {{attrs.someProp}}',
- });
- }, "Using {{attrs}} to reference named arguments is not supported. {{attrs.someProp}} should be updated to {{@someProp}}. ('my-app/templates/components/non-block.hbs' @ L1:C24) ");
- }
-
- ['@test non-block with properties on this.attrs']() {
- this.registerComponent('non-block', {
- template: 'In layout - someProp: {{this.attrs.someProp}}',
- });
-
- this.render('{{non-block someProp=this.prop}}', {
- prop: 'something here',
- });
-
- this.assertText('In layout - someProp: something here');
-
- runTask(() => this.rerender());
-
- this.assertText('In layout - someProp: something here');
-
- runTask(() => this.context.set('prop', 'other thing there'));
-
- this.assertText('In layout - someProp: other thing there');
-
- runTask(() => this.context.set('prop', 'something here'));
-
- this.assertText('In layout - someProp: something here');
- }
-
['@test non-block with named argument']() {
this.registerComponent('non-block', {
template: 'In layout - someProp: {{@someProp}}',
@@ -2913,7 +2881,7 @@ moduleFor(
['@test throws if `this._super` is not called from `init`']() {
this.registerComponent('foo-bar', {
ComponentClass: Component.extend({
- init() {},
+ init() { },
}),
});
@@ -3030,7 +2998,7 @@ moduleFor(
this.get('select').registerOption(this);
},
- selected: computed('select.value', function () {
+ selected: computed('select.value', function() {
return this.get('value') === this.get('select.value');
}),
@@ -3226,7 +3194,7 @@ moduleFor(
);
},
- listenerForSomeMethod: on('someMethod', function (...data) {
+ listenerForSomeMethod: on('someMethod', function(...data) {
assert.deepEqual(
data,
payload,
@@ -3234,7 +3202,7 @@ moduleFor(
);
}),
- listenerForSomeTruthyProperty: on('someTruthyProperty', function (...data) {
+ listenerForSomeTruthyProperty: on('someTruthyProperty', function(...data) {
assert.deepEqual(
data,
payload,
@@ -3290,36 +3258,6 @@ moduleFor(
this.assertText('hello');
}
- ['@test using attrs for positional params is asserted against']() {
- let MyComponent = Component.extend();
-
- expectAssertion(() => {
- this.registerComponent('foo-bar', {
- ComponentClass: MyComponent.reopenClass({
- positionalParams: ['myVar'],
- }),
- template:
- 'MyVar1: {{attrs.myVar}} {{this.myVar}} MyVar2: {{this.myVar2}} {{attrs.myVar2}}',
- });
- }, "Using {{attrs}} to reference named arguments is not supported. {{attrs.myVar}} should be updated to {{@myVar}}. ('my-app/templates/components/foo-bar.hbs' @ L1:C10) ");
- }
-
- ['@test using this.attrs for positional params']() {
- let MyComponent = Component.extend();
-
- this.registerComponent('foo-bar', {
- ComponentClass: MyComponent.reopenClass({
- positionalParams: ['myVar'],
- }),
- template:
- 'MyVar1: {{this.attrs.myVar}} {{this.myVar}} MyVar2: {{this.myVar2}} {{this.attrs.myVar2}}',
- });
-
- this.render('{{foo-bar 1 myVar2=2}}');
-
- this.assertText('MyVar1: 1 1 MyVar2: 2 2');
- }
-
['@test using named arguments for positional params']() {
let MyComponent = Component.extend();
@@ -3461,7 +3399,7 @@ moduleFor(
barInstance = this;
},
- bar: computed('target.foo', function () {
+ bar: computed('target.foo', function() {
if (this.target) {
return this.target.foo.toUpperCase();
}
diff --git a/packages/@ember/-internals/glimmer/tests/integration/syntax/let-test.js b/packages/@ember/-internals/glimmer/tests/integration/syntax/let-test.js
index f2516061932..3ff4b538f55 100644
--- a/packages/@ember/-internals/glimmer/tests/integration/syntax/let-test.js
+++ b/packages/@ember/-internals/glimmer/tests/integration/syntax/let-test.js
@@ -184,26 +184,6 @@ moduleFor(
this.assertText('Hello world');
}
-
- ['@test `attrs` can be used as a block param [GH#14678]']() {
- this.render('{{#let this.hash as |attrs|}}[{{this.hash.foo}}-{{attrs.foo}}]{{/let}}', {
- hash: { foo: 'foo' },
- });
-
- this.assertText('[foo-foo]');
-
- runTask(() => this.rerender());
-
- this.assertText('[foo-foo]');
-
- runTask(() => this.context.set('hash.foo', 'FOO'));
-
- this.assertText('[FOO-FOO]');
-
- runTask(() => this.context.set('hash.foo', 'foo'));
-
- this.assertText('[foo-foo]');
- }
}
);
diff --git a/packages/ember-template-compiler/lib/plugins/assert-against-attrs.ts b/packages/ember-template-compiler/lib/plugins/assert-against-attrs.ts
deleted file mode 100644
index 9a81ab58736..00000000000
--- a/packages/ember-template-compiler/lib/plugins/assert-against-attrs.ts
+++ /dev/null
@@ -1,93 +0,0 @@
-import { assert } from '@ember/debug';
-import type { AST, ASTPlugin } from '@glimmer/syntax';
-import calculateLocationDisplay from '../system/calculate-location-display';
-import type { EmberASTPluginEnvironment } from '../types';
-
-/**
- @module ember
-*/
-
-/**
- A Glimmer2 AST transformation that asserts against
-
- ```handlebars
- {{attrs.foo.bar}}
- ```
-
- ...as well as `{{#if attrs.foo}}`, `{{deeply (nested attrs.foobar.baz)}}`.
-
- @private
- @class AssertAgainstAttrs
-*/
-
-export default function assertAgainstAttrs(env: EmberASTPluginEnvironment): ASTPlugin {
- let { builders: b } = env.syntax;
- let moduleName = env.meta?.moduleName;
-
- let stack: string[][] = [[]];
-
- function updateBlockParamsStack(blockParams: string[]) {
- let parent = stack[stack.length - 1];
- assert('has parent', parent);
- stack.push(parent.concat(blockParams));
- }
-
- return {
- name: 'assert-against-attrs',
-
- visitor: {
- Program: {
- enter(node: AST.Program) {
- updateBlockParamsStack(node.blockParams);
- },
- exit() {
- stack.pop();
- },
- },
-
- ElementNode: {
- enter(node: AST.ElementNode) {
- updateBlockParamsStack(node.blockParams);
- },
- exit() {
- stack.pop();
- },
- },
-
- PathExpression(node: AST.PathExpression): AST.Node | void {
- if (isAttrs(node, stack[stack.length - 1]!)) {
- let path = b.path(node.original.substring(6));
-
- assert(
- `Using {{attrs}} to reference named arguments is not supported. {{attrs.${
- path.original
- }}} should be updated to {{@${path.original}}}. ${calculateLocationDisplay(
- moduleName,
- node.loc
- )}`,
- node.this !== false
- );
- }
- },
- },
- };
-}
-
-function isAttrs(node: AST.PathExpression, symbols: string[]) {
- let name = node.parts[0];
-
- if (name && symbols.indexOf(name) !== -1) {
- return false;
- }
-
- if (name === 'attrs') {
- if (node.this === true) {
- node.parts.shift();
- node.original = node.original.slice(5);
- }
-
- return true;
- }
-
- return false;
-}
diff --git a/packages/ember-template-compiler/lib/plugins/index.ts b/packages/ember-template-compiler/lib/plugins/index.ts
index 0b619bb76f9..8eb9baf5642 100644
--- a/packages/ember-template-compiler/lib/plugins/index.ts
+++ b/packages/ember-template-compiler/lib/plugins/index.ts
@@ -1,4 +1,3 @@
-import AssertAgainstAttrs from './assert-against-attrs';
import AssertAgainstNamedOutlets from './assert-against-named-outlets';
import AssertInputHelperWithoutBlock from './assert-input-helper-without-block';
import AssertReservedNamedArguments from './assert-reserved-named-arguments';
@@ -17,7 +16,6 @@ export const RESOLUTION_MODE_TRANSFORMS = Object.freeze(
TransformQuotedBindingsIntoJustBindings,
AssertReservedNamedArguments,
TransformActionSyntax,
- AssertAgainstAttrs,
TransformEachInIntoEach,
AssertInputHelperWithoutBlock,
TransformInElement,
diff --git a/packages/ember-template-compiler/tests/plugins/assert-against-attrs-test.js b/packages/ember-template-compiler/tests/plugins/assert-against-attrs-test.js
deleted file mode 100644
index 30f5c32fbd9..00000000000
--- a/packages/ember-template-compiler/tests/plugins/assert-against-attrs-test.js
+++ /dev/null
@@ -1,71 +0,0 @@
-import TransformTestCase from '../utils/transform-test-case';
-import { moduleFor, RenderingTestCase } from 'internal-test-helpers';
-
-moduleFor(
- 'ember-template-compiler: assert against attrs',
- class extends TransformTestCase {
- ['@test it asserts against attrs']() {
- expectAssertion(() => {
- this.assertTransformed(`{{attrs.foo}}`, `{{attrs.foo}}`);
- }, /Using {{attrs}} to reference named arguments is not supported. {{attrs.foo}} should be updated to {{@foo}}./);
-
- expectAssertion(() => {
- this.assertTransformed(`{{attrs.foo.bar}}`, `{{attrs.foo.bar}}`);
- }, /Using {{attrs}} to reference named arguments is not supported. {{attrs.foo.bar}} should be updated to {{@foo.bar}}./);
-
- expectAssertion(() => {
- this.assertTransformed(`{{if attrs.foo "foo"}}`, `{{if attrs.foo "foo"}}`);
- }, /Using {{attrs}} to reference named arguments is not supported. {{attrs.foo}} should be updated to {{@foo}}./);
-
- expectAssertion(() => {
- this.assertTransformed(`{{#if attrs.foo}}{{/if}}`, `{{#if attrs.foo}}{{/if}}`);
- }, /Using {{attrs}} to reference named arguments is not supported. {{attrs.foo}} should be updated to {{@foo}}./);
-
- expectAssertion(() => {
- this.assertTransformed(
- `{{deeply (nested attrs.foo.bar)}}`,
- `{{deeply (nested attrs.foo.bar)}}`
- );
- }, /Using {{attrs}} to reference named arguments is not supported. {{attrs.foo.bar}} should be updated to {{@foo.bar}}./);
- }
-
- ['@test it does not assert against this.attrs']() {
- this.assertTransformed(`{{this.attrs.foo}}`, `{{this.attrs.foo}}`);
- this.assertTransformed(`{{if this.attrs.foo "foo"}}`, `{{if this.attrs.foo "foo"}}`);
- this.assertTransformed(`{{#if this.attrs.foo}}{{/if}}`, `{{#if this.attrs.foo}}{{/if}}`);
- this.assertTransformed(
- `{{deeply (nested this.attrs.foo.bar)}}`,
- `{{deeply (nested this.attrs.foo.bar)}}`
- );
- }
- }
-);
-
-moduleFor(
- 'ember-template-compiler: not asserting against block params named "attrs"',
- class extends RenderingTestCase {
- ["@test it doesn't assert block params"]() {
- this.registerComponent('foo', {
- template: '{{#let "foo" as |attrs|}}{{attrs}}{{/let}}',
- });
- this.render('');
- this.assertComponentElement(this.firstChild, { content: 'foo' });
- }
-
- ["@test it doesn't assert component block params"]() {
- this.registerComponent('foo', {
- template: '{{yield "foo"}}',
- });
- this.render('{{attrs}}');
- this.assertComponentElement(this.firstChild, { content: 'foo' });
- }
-
- ["@test it doesn't assert block params with nested keys"]() {
- this.registerComponent('foo', {
- template: '{{yield (hash bar="baz")}}',
- });
- this.render('{{attrs.bar}}');
- this.assertComponentElement(this.firstChild, { content: 'baz' });
- }
- }
-);
From f6dba56e84a3825d3ed217b3a7883956ec13c4ee Mon Sep 17 00:00:00 2001
From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com>
Date: Wed, 27 Mar 2024 14:27:03 -0400
Subject: [PATCH 2/4] More removals
---
.../components/curly-components-test.js | 38 -------------------
1 file changed, 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 c277351d100..a0f68b023a3 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
@@ -1535,44 +1535,6 @@ moduleFor(
this.assertText('In layout - someProp: something here - In template');
}
- ['@test block with properties on attrs is asserted against']() {
- expectAssertion(() => {
- this.registerComponent('with-block', {
- template: 'In layout - someProp: {{attrs.someProp}} - {{yield}}',
- });
- }, "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}}',
From 04a7ffbbb06a4f9e32eae0442198439498888190 Mon Sep 17 00:00:00 2001
From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com>
Date: Wed, 27 Mar 2024 14:37:39 -0400
Subject: [PATCH 3/4] Update test
---
.../components/curly-components-test.js | 25 ++++++++-----------
1 file changed, 11 insertions(+), 14 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 a0f68b023a3..a4e01c5f7fb 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
@@ -165,7 +165,7 @@ moduleFor(
['@test layout supports computed property']() {
let FooBarComponent = Component.extend({
elementId: 'blahzorz',
- layout: computed(function() {
+ layout: computed(function () {
return compile('so much layout wat {{this.lulz}}');
}),
init() {
@@ -314,7 +314,7 @@ moduleFor(
['@test tagName can not be a computed property']() {
let FooBarComponent = Component.extend({
- tagName: computed(function() {
+ tagName: computed(function () {
return 'foo-bar';
}),
});
@@ -1444,13 +1444,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}}
@@ -1474,11 +1471,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']() {
@@ -2843,7 +2840,7 @@ moduleFor(
['@test throws if `this._super` is not called from `init`']() {
this.registerComponent('foo-bar', {
ComponentClass: Component.extend({
- init() { },
+ init() {},
}),
});
@@ -2960,7 +2957,7 @@ moduleFor(
this.get('select').registerOption(this);
},
- selected: computed('select.value', function() {
+ selected: computed('select.value', function () {
return this.get('value') === this.get('select.value');
}),
@@ -3156,7 +3153,7 @@ moduleFor(
);
},
- listenerForSomeMethod: on('someMethod', function(...data) {
+ listenerForSomeMethod: on('someMethod', function (...data) {
assert.deepEqual(
data,
payload,
@@ -3164,7 +3161,7 @@ moduleFor(
);
}),
- listenerForSomeTruthyProperty: on('someTruthyProperty', function(...data) {
+ listenerForSomeTruthyProperty: on('someTruthyProperty', function (...data) {
assert.deepEqual(
data,
payload,
@@ -3361,7 +3358,7 @@ moduleFor(
barInstance = this;
},
- bar: computed('target.foo', function() {
+ bar: computed('target.foo', function () {
if (this.target) {
return this.target.foo.toUpperCase();
}
From ca17211dcac0f323e5661d089d991ec0c4c5d964 Mon Sep 17 00:00:00 2001
From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com>
Date: Wed, 27 Mar 2024 14:50:17 -0400
Subject: [PATCH 4/4] Removing action will help, but we can't do that quite yet
---
.../glimmer/lib/utils/process-args.ts | 34 +------------------
.../components/curly-components-test.js | 4 +--
.../helpers/closure-action-test.js | 32 ++++++++---------
3 files changed, 19 insertions(+), 51 deletions(-)
diff --git a/packages/@ember/-internals/glimmer/lib/utils/process-args.ts b/packages/@ember/-internals/glimmer/lib/utils/process-args.ts
index 51e79131dc5..39f7079bfba 100644
--- a/packages/@ember/-internals/glimmer/lib/utils/process-args.ts
+++ b/packages/@ember/-internals/glimmer/lib/utils/process-args.ts
@@ -1,16 +1,12 @@
-import { MUTABLE_CELL } from '@ember/-internals/views';
import type { CapturedNamedArguments } from '@glimmer/interfaces';
-import type { Reference } from '@glimmer/reference';
-import { isUpdatableRef, updateRef, valueForRef } from '@glimmer/reference';
+import { valueForRef } from '@glimmer/reference';
import { assert } from '@ember/debug';
import { ARGS } from '../component-managers/curly';
-import { ACTIONS } from '../helpers/action';
// ComponentArgs takes EvaluatedNamedArgs and converts them into the
// inputs needed by CurlyComponents (attrs and props, with mutable
// cells, etc).
export function processComponentArgs(namedArgs: CapturedNamedArguments) {
- let attrs = Object.create(null);
let props = Object.create(null);
props[ARGS] = namedArgs;
@@ -20,36 +16,8 @@ export function processComponentArgs(namedArgs: CapturedNamedArguments) {
assert('expected ref', ref);
let value = valueForRef(ref);
- let isAction = typeof value === 'function' && ACTIONS.has(value);
-
- if (isUpdatableRef(ref) && !isAction) {
- attrs[name] = new MutableCell(ref, value);
- } else {
- attrs[name] = value;
- }
-
props[name] = value;
}
- props.attrs = attrs;
-
return props;
}
-
-const REF = Symbol('REF');
-
-class MutableCell {
- public value: any;
- [MUTABLE_CELL]: boolean;
- [REF]: Reference;
-
- constructor(ref: Reference, value: any) {
- this[MUTABLE_CELL] = true;
- this[REF] = ref;
- this.value = value;
- }
-
- update(val: any) {
- updateRef(this[REF], val);
- }
-}
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 a4e01c5f7fb..ddfb26e2d0a 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
@@ -3015,9 +3015,9 @@ moduleFor(
this.didInit = true;
},
- didReceiveAttrs() {
+ didReceiveAttrs(...args) {
assert.ok(this.didInit, 'expected init to have run before didReceiveAttrs');
- this.set('barCopy', this.attrs.bar.value + 1);
+ this.set('barCopy', this.bar + 1);
},
barCopyDidChange: observer('barCopy', () => {
diff --git a/packages/@ember/-internals/glimmer/tests/integration/helpers/closure-action-test.js b/packages/@ember/-internals/glimmer/tests/integration/helpers/closure-action-test.js
index 491ec966116..545665550a0 100644
--- a/packages/@ember/-internals/glimmer/tests/integration/helpers/closure-action-test.js
+++ b/packages/@ember/-internals/glimmer/tests/integration/helpers/closure-action-test.js
@@ -18,7 +18,7 @@ moduleFor(
component = this;
},
fireAction() {
- this.attrs.submit();
+ this.submit();
},
});
@@ -101,7 +101,7 @@ moduleFor(
innerComponent = this;
},
fireAction() {
- returnedValue = this.attrs.submit();
+ returnedValue = this.submit();
},
});
@@ -141,7 +141,7 @@ moduleFor(
innerComponent = this;
},
fireAction() {
- this.attrs.submit();
+ this.submit();
},
});
@@ -191,7 +191,7 @@ moduleFor(
innerComponent = this;
},
fireAction() {
- this.attrs.submit(fourth);
+ this.submit(fourth);
},
});
@@ -236,7 +236,7 @@ moduleFor(
innerComponent = this;
},
fireAction() {
- this.attrs.submit();
+ this.submit();
},
});
@@ -283,7 +283,7 @@ moduleFor(
innerComponent = this;
},
fireAction() {
- this.attrs.submit();
+ this.submit();
},
});
@@ -345,7 +345,7 @@ moduleFor(
innerComponent = this;
},
fireAction() {
- this.attrs.submit(second, third);
+ this.submit(second, third);
},
});
@@ -399,7 +399,7 @@ moduleFor(
innerComponent = this;
},
fireAction() {
- this.attrs.submit(newValue);
+ this.submit(newValue);
},
});
@@ -442,7 +442,7 @@ moduleFor(
innerComponent = this;
},
fireAction() {
- this.attrs.submit();
+ this.submit();
},
});
@@ -490,7 +490,7 @@ moduleFor(
innerComponent = this;
},
fireAction() {
- actualReturnedValue = this.attrs.submit(second);
+ actualReturnedValue = this.submit(second);
},
});
@@ -583,7 +583,7 @@ moduleFor(
innerComponent = this;
},
fireAction() {
- this.attrs.submit();
+ this.submit();
},
});
@@ -630,7 +630,7 @@ moduleFor(
innerComponent = this;
},
fireAction() {
- this.attrs.submit({
+ this.submit({
readProp: newValue,
});
},
@@ -678,7 +678,7 @@ moduleFor(
innerComponent = this;
},
fireAction() {
- this.attrs.submit({
+ this.submit({
readProp: newValue,
});
},
@@ -721,7 +721,7 @@ moduleFor(
innerComponent = this;
},
fireAction() {
- this.attrs.submit();
+ this.submit();
},
});
@@ -772,7 +772,7 @@ moduleFor(
this.get('submit')(second);
this.get('attrs-submit')(second);
let attrsSubmitReturnValue = this.attrs['attrs-submit'](second);
- let submitReturnValue = this.attrs.submit(second);
+ let submitReturnValue = this.submit(second);
assert.equal(
attrsSubmitReturnValue,
@@ -832,7 +832,7 @@ moduleFor(
innerComponent = this;
},
fireAction() {
- this.attrs.submit();
+ this.submit();
},
});