Skip to content

Commit 76af353

Browse files
author
Swastik
committed
Remove onClose references
1 parent 76c8245 commit 76af353

File tree

2 files changed

+1
-20
lines changed

2 files changed

+1
-20
lines changed

tests/dummy/app/controllers/application.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default Controller.extend({
1515
this.set('value', value)
1616
},
1717

18-
onClose () {
18+
onCancel () {
1919
log('Got close action');
2020
},
2121

tests/integration/components/ember-inline-edit-test.js

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ moduleForComponent(
1414
this.set("value", val)
1515
})
1616

17-
this.on("onClose", () => {
18-
this.set("value", "closed")
19-
})
20-
2117
this.on("onCancel", () => {
2218
this.set("value", "canceled")
2319
})
@@ -39,7 +35,6 @@ test("it renders", function(assert) {
3935
this.render(hbs`{{ember-inline-edit
4036
value=value
4137
onSave="onSave"
42-
onClose="onClose"
4338
onCancel="onCancel"}}`)
4439

4540
assert.ok(find(classNames.container))
@@ -49,7 +44,6 @@ test("the label is default", function(assert) {
4944
this.render(hbs`{{ember-inline-edit
5045
value=value
5146
onSave="onSave"
52-
onClose="onClose"
5347
onCancel="onCancel"}}`)
5448

5549
assert.equal(find(classNames.container).innerText.trim(), "Not Provided")
@@ -59,7 +53,6 @@ test("on click, it shows the input and buttons", async function(assert) {
5953
this.render(hbs`{{ember-inline-edit
6054
value=value
6155
onSave="onSave"
62-
onClose="onClose"
6356
onCancel="onCancel"}}`)
6457

6558
assert.notOk(find(classNames.input))
@@ -77,7 +70,6 @@ test("on click, the input gets focus", async function(assert) {
7770
this.render(hbs`{{ember-inline-edit
7871
value=value
7972
onSave="onSave"
80-
onClose="onClose"
8173
onCancel="onCancel"}}`)
8274

8375
await click(classNames.container)
@@ -92,7 +84,6 @@ test("it does not render the save button", async function(assert) {
9284
value=value
9385
showSaveButton=false
9486
onSave="onSave"
95-
onClose="onClose"
9687
onCancel="onCancel"}}`)
9788

9889
await click(classNames.container)
@@ -104,7 +95,6 @@ test("it does not render the cancel button", async function(assert) {
10495
value=value
10596
showCancelButton=false
10697
onSave="onSave"
107-
onClose="onClose"
10898
onCancel="onCancel"}}`)
10999

110100
await click(classNames.container)
@@ -116,7 +106,6 @@ test("it renders a non-default save button label", async function(assert) {
116106
value=value
117107
saveLabel="✓"
118108
onSave="onSave"
119-
onClose="onClose"
120109
onCancel="onCancel"}}`)
121110

122111
await click(classNames.container)
@@ -128,7 +117,6 @@ test("it renders a non-default cancel button label", async function(assert) {
128117
value=value
129118
cancelLabel="x"
130119
onSave="onSave"
131-
onClose="onClose"
132120
onCancel="onCancel"}}`)
133121

134122
await click(classNames.container)
@@ -140,7 +128,6 @@ test("on click, it renders the hint if present", async function(assert) {
140128
value=value
141129
hintLabel="press Enter to save"
142130
onSave="onSave"
143-
onClose="onClose"
144131
onCancel="onCancel"}}`)
145132

146133
assert.notOk(find(classNames.hint))
@@ -154,7 +141,6 @@ test("on save, it sends the save action", async function(assert) {
154141
this.render(hbs`{{ember-inline-edit
155142
value=value
156143
onSave="onSave"
157-
onClose="onClose"
158144
onCancel="onCancel"}}`)
159145

160146
await click(classNames.container)
@@ -170,7 +156,6 @@ test("on pressing enter in text field, it sends the save action", async function
170156
this.render(hbs`{{ember-inline-edit
171157
value=(readonly value)
172158
onSave="onSave"
173-
onClose="onClose"
174159
onCancel="onCancel"}}`)
175160

176161
await click(classNames.container)
@@ -188,7 +173,6 @@ test("on pressing enter in textarea field, it does not send the save action", as
188173
value=value
189174
field="textarea"
190175
onSave="onSave"
191-
onClose="onClose"
192176
onCancel="onCancel"}}`)
193177

194178
await click(classNames.container)
@@ -204,7 +188,6 @@ test("on cancel, it sends the cancel action and restores the input field to init
204188
this.render(hbs`{{ember-inline-edit
205189
value=value
206190
onSave="onSave"
207-
onClose="onClose"
208191
onCancel="onCancel"}}`)
209192

210193
await click(classNames.container)
@@ -222,7 +205,6 @@ test("on pressing esc, it sends the close action", async function(assert) {
222205
this.render(hbs`{{ember-inline-edit
223206
value=value
224207
onSave="onSave"
225-
onClose="onClose"
226208
onCancel="onCancel"}}`)
227209

228210
assert.notOk(find(classNames.input))
@@ -242,7 +224,6 @@ test("the text field is the same width as the original element", async function(
242224
this.render(hbs`{{ember-inline-edit
243225
value='A long field value, probably at least a few hundred pixels'
244226
onSave="onSave"
245-
onClose="onClose"
246227
onCancel="onCancel"}}`)
247228

248229
assert.notOk(find(classNames.input))

0 commit comments

Comments
 (0)