clean(js): remove unused autosave:reset
This commit is contained in:
parent
e71b7eeee5
commit
dbb5b7deec
2 changed files with 0 additions and 7 deletions
|
@ -27,8 +27,6 @@ export class AutosaveStatusController extends ApplicationController {
|
||||||
connect(): void {
|
connect(): void {
|
||||||
this.onGlobal('autosave:enqueue', () => this.didEnqueue());
|
this.onGlobal('autosave:enqueue', () => this.didEnqueue());
|
||||||
this.onGlobal('autosave:end', () => this.didSucceed());
|
this.onGlobal('autosave:end', () => this.didSucceed());
|
||||||
// This event is used in tests to reset the state of the controller
|
|
||||||
this.onGlobal('autosave:reset', () => this.didReset());
|
|
||||||
this.onGlobal<CustomEvent>('autosave:error', (event) =>
|
this.onGlobal<CustomEvent>('autosave:error', (event) =>
|
||||||
this.didFail(event)
|
this.didFail(event)
|
||||||
);
|
);
|
||||||
|
@ -63,10 +61,6 @@ export class AutosaveStatusController extends ApplicationController {
|
||||||
this.debounce(this.hideSucceededStatus, AUTOSAVE_STATUS_VISIBLE_DURATION);
|
this.debounce(this.hideSucceededStatus, AUTOSAVE_STATUS_VISIBLE_DURATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
private didReset() {
|
|
||||||
this.setState('idle');
|
|
||||||
}
|
|
||||||
|
|
||||||
private didFail(event: CustomEvent<{ error: ResponseError }>) {
|
private didFail(event: CustomEvent<{ error: ResponseError }>) {
|
||||||
const error = event.detail.error;
|
const error = event.detail.error;
|
||||||
|
|
||||||
|
|
|
@ -176,7 +176,6 @@ module SystemHelpers
|
||||||
blur
|
blur
|
||||||
expect(page).to have_css('.debounced-empty') # no more debounce
|
expect(page).to have_css('.debounced-empty') # no more debounce
|
||||||
expect(page).to have_css('.autosave-state-idle') # no more in flight promise
|
expect(page).to have_css('.autosave-state-idle') # no more in flight promise
|
||||||
page.execute_script("document.documentElement.dispatchEvent(new CustomEvent('autosave:reset'));")
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue