login_spec.rb 555 B

123456789101112131415161718192021222324
  1. # Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
  2. require 'rails_helper'
  3. RSpec.describe 'Login', type: :system, authenticated_as: false do
  4. before do
  5. visit '/'
  6. end
  7. it 'fqdn is visible on login page' do
  8. expect(page).to have_css('.login p', text: Setting.get('fqdn'))
  9. end
  10. it 'Login with wrong credentials' do
  11. within('#login') do
  12. fill_in 'username', with: 'admin@example.com'
  13. fill_in 'password', with: 'wrong'
  14. click_button
  15. end
  16. expect(page).to have_css('#login .alert')
  17. end
  18. end