online_notifications_spec.rb 700 B

1234567891011121314151617181920
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. require 'rails_helper'
  3. RSpec.describe 'Mobile > Online Notifications', app: :mobile, authenticated_as: :user, type: :system do
  4. context 'when looking at notifications' do
  5. let(:notification) { create(:online_notification, user: user, created_by: user, type_name: 'update') }
  6. let(:user) { create(:admin, :groupable, group: Ticket.first.group) }
  7. before { notification }
  8. it 'shows notification' do
  9. visit '/notifications'
  10. wait_for_gql('shared/entities/online-notification/graphql/queries/onlineNotifications.graphql')
  11. expect(page).to have_text('updated ticket')
  12. end
  13. end
  14. end