From c774e0a8376f9c53edc87a8921be0f355a3f609b Mon Sep 17 00:00:00 2001 From: Pavel Kvach Date: Sat, 30 Mar 2024 10:54:42 +0200 Subject: [PATCH] js: isso.js: Disable Postbox submit button on click, enable after response Disable the submit button in Postbox to prevent double posting upon click. Enable the button after receiving a response from the API endpoint. Fixes https://github.com/posativ/isso/issues/913 --- isso/js/tests/integration/puppet.test.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/isso/js/tests/integration/puppet.test.js b/isso/js/tests/integration/puppet.test.js index be60c7d5..4975c6cd 100644 --- a/isso/js/tests/integration/puppet.test.js +++ b/isso/js/tests/integration/puppet.test.js @@ -240,7 +240,10 @@ test("should execute GET/PUT/POST/DELETE requests correctly", async () => { await expect(page).toMatchElement( '#isso-1 .isso-text', - { text: 'New comment body' }, + { + text: 'New comment body', + timeout: 1000, + }, ); // Delete comment via DELETE