From 7dd33d299dcba18d91196a8f1ad98488d953bc57 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Tue, 12 Nov 2024 07:45:02 +0900 Subject: [PATCH] DEV: ensure bulk action is done before checking for result (#602) We were sometimes visiting latest before the request happens, the solution is to wait for the modal to have automatically closed as it indicates the request has finished and the state should be the one we expect. --- spec/system/bulk_assign_spec.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/system/bulk_assign_spec.rb b/spec/system/bulk_assign_spec.rb index a29deab..d604879 100644 --- a/spec/system/bulk_assign_spec.rb +++ b/spec/system/bulk_assign_spec.rb @@ -46,6 +46,7 @@ describe "Assign | Bulk Assign", type: :system do # Click Confirm topic_list_header.click_bulk_topics_confirm + expect(assign_modal).to be_closed # Reload and check that topic is now assigned visit "/latest" @@ -65,6 +66,7 @@ describe "Assign | Bulk Assign", type: :system do # Click Confirm topic_list_header.click_bulk_topics_confirm + expect(assign_modal).to be_closed # Reload and check that topic is now assigned visit "/latest"