increase spec robustness (#4498)

pull/4501/head
ulferts 9 years ago committed by Oliver Günther
parent 8fd2e0ba24
commit 566333ab34
  1. 21
      spec/features/work_packages/table/switch_types_spec.rb

@ -70,6 +70,11 @@ describe 'Switching types in work package table', js: true do
wp_table.expect_notification( wp_table.expect_notification(
message: 'Successful update. Click here to open this work package in fullscreen view.' message: 'Successful update. Click here to open this work package in fullscreen view.'
) )
# safegurards
wp_table.dismiss_notification!
wp_table.expect_no_notification(
message: 'Successful update. Click here to open this work package in fullscreen view.'
)
# Switch type # Switch type
type_field.activate! type_field.activate!
@ -80,6 +85,12 @@ describe 'Switching types in work package table', js: true do
type: :error, type: :error,
message: "#{cf_req_text.name} can't be blank." message: "#{cf_req_text.name} can't be blank."
) )
# safegurards
wp_table.dismiss_notification!
wp_table.expect_no_notification(
type: :error,
message: "#{cf_req_text.name} can't be blank."
)
# Old text field should disappear # Old text field should disappear
text_field.expect_state_text '-' text_field.expect_state_text '-'
@ -92,6 +103,11 @@ describe 'Switching types in work package table', js: true do
wp_table.expect_notification( wp_table.expect_notification(
message: 'Successful update. Click here to open this work package in fullscreen view.' message: 'Successful update. Click here to open this work package in fullscreen view.'
) )
# safegurards
wp_table.dismiss_notification!
wp_table.expect_no_notification(
message: 'Successful update. Click here to open this work package in fullscreen view.'
)
expect(text_field).not_to be_editable expect(text_field).not_to be_editable
@ -102,6 +118,11 @@ describe 'Switching types in work package table', js: true do
wp_table.expect_notification( wp_table.expect_notification(
message: 'Successful update. Click here to open this work package in fullscreen view.' message: 'Successful update. Click here to open this work package in fullscreen view.'
) )
# safegurards
wp_table.dismiss_notification!
wp_table.expect_no_notification(
message: 'Successful update. Click here to open this work package in fullscreen view.'
)
req_text_field.expect_state_text '-' req_text_field.expect_state_text '-'
end end

Loading…
Cancel
Save