refactor(spec): wait for debounce and in flight promise
This commit is contained in:
parent
5cadb70d3a
commit
e71b7eeee5
1 changed files with 2 additions and 1 deletions
|
@ -174,7 +174,8 @@ module SystemHelpers
|
|||
|
||||
def wait_for_autosave(brouillon = true)
|
||||
blur
|
||||
expect(page).to have_css('span', text: "#{brouillon ? 'Brouillon' : 'Dossier'} enregistré", visible: true)
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue