clean(js): remove unused autosave:reset

This commit is contained in:
simon lehericey 2022-10-24 21:15:30 +02:00
parent e71b7eeee5
commit dbb5b7deec
2 changed files with 0 additions and 7 deletions

View file

@ -27,8 +27,6 @@ export class AutosaveStatusController extends ApplicationController {
connect(): void {
this.onGlobal('autosave:enqueue', () => this.didEnqueue());
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.didFail(event)
);
@ -63,10 +61,6 @@ export class AutosaveStatusController extends ApplicationController {
this.debounce(this.hideSucceededStatus, AUTOSAVE_STATUS_VISIBLE_DURATION);
}
private didReset() {
this.setState('idle');
}
private didFail(event: CustomEvent<{ error: ResponseError }>) {
const error = event.detail.error;

View file

@ -176,7 +176,6 @@ module SystemHelpers
blur
expect(page).to have_css('.debounced-empty') # no more debounce
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