appearance_spec.rb 597 B

1234567891011121314151617181920212223
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. require 'rails_helper'
  3. RSpec.describe 'Profile > Appearance', type: :system do
  4. context 'when logged in as a customer', authenticated_as: :user do
  5. let(:user) { create(:customer) }
  6. before do
  7. visit 'profile/language'
  8. click_on 'Appearance'
  9. end
  10. it 'can change appearance' do
  11. within :active_content do
  12. find('span', text: 'Dark').click
  13. value = execute_script('return document.documentElement.dataset.theme')
  14. expect(value).to eq 'dark'
  15. end
  16. end
  17. end
  18. end