Module: Spree::Backend::TestingSupport::Flash
- Defined in:
- lib/spree/backend/testing_support/flash.rb
Instance Method Summary collapse
- #assert_admin_flash_alert_error(message) ⇒ Object
- #assert_admin_flash_alert_notice(message) ⇒ Object
- #assert_admin_flash_alert_success(message) ⇒ Object
Instance Method Details
#assert_admin_flash_alert_error(message) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/spree/backend/testing_support/flash.rb', line 13 def assert_admin_flash_alert_error() = convert_flash() within('#FlashAlertsContainer', visible: :all) do expect(page).to have_css('span[data-alert-type="error"]', text: , visible: :all) end end |
#assert_admin_flash_alert_notice(message) ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/spree/backend/testing_support/flash.rb', line 21 def assert_admin_flash_alert_notice() = convert_flash() within('#FlashAlertsContainer', visible: :all) do expect(page).to have_css('span[data-alert-type="notice"]', text: , visible: :all) end end |
#assert_admin_flash_alert_success(message) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/spree/backend/testing_support/flash.rb', line 5 def assert_admin_flash_alert_success() = convert_flash() within('#FlashAlertsContainer', visible: :all) do expect(page).to have_css('span[data-alert-type="success"]', text: , visible: :all) end end |