From 6a10308f29d40b0f4d19c2fca5b0c86035ff1310 Mon Sep 17 00:00:00 2001 From: Martin Gruner Date: Sat, 25 Sep 2021 06:28:00 +0200 Subject: [PATCH] Maintenance: Stabilize System > Objects test. --- spec/system/system/object_manager_spec.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/spec/system/system/object_manager_spec.rb b/spec/system/system/object_manager_spec.rb index 4d25d1b9c..da687e8ba 100644 --- a/spec/system/system/object_manager_spec.rb +++ b/spec/system/system/object_manager_spec.rb @@ -78,7 +78,7 @@ RSpec.describe 'System > Objects', type: :system do expect(page).to have_text('Database Update required') click '.js-execute', wait: 7.minutes expect(page).to have_text('please reload your browser') - page.refresh + click '.modal-content button.js-submit' # Delete click 'tbody tr:last-child .js-delete' @@ -121,7 +121,7 @@ RSpec.describe 'System > Objects', type: :system do expect(page).to have_text('Database Update required') click '.js-execute', wait: 7.minutes expect(page).to have_text('please reload your browser') - page.refresh + click '.modal-content button.js-submit' # Check that the attributes were correctly saved. expect(ObjectManager::Attribute.last.data_option[:options][-2..]).to eq([{ 'name' => 'new tree option 0', 'value' => 'new tree option 0' }, { 'name' => 'new tree option 1', 'value' => 'new tree option 1' }]) @@ -212,8 +212,7 @@ RSpec.describe 'System > Objects', type: :system do expect(page).to have_text('Database Update required') click '.js-execute', wait: 7.minutes expect(page).to have_text('please reload your browser') - sleep 1 # Not sure why this is neede to pick up the new config in subsequent screens. - page.refresh + click '.modal-content button.js-submit' # Make sure option is still available in already saved ticket, even though the option was removed from the object attribute. # This is done via the :historical_options.