Maintenance: Stabilize ticket history test.

This commit is contained in:
Martin Gruner 2022-02-11 09:28:47 +01:00
parent e6aec87df1
commit 170bfc6e59

View file

@ -2,10 +2,10 @@
require 'rails_helper' require 'rails_helper'
RSpec.describe 'Ticket history', type: :system, time_zone: 'Europe/London' do RSpec.describe 'Ticket history', type: :system, time_zone: 'Europe/London', authenticated_as: :admin_de do
let(:group) { Group.find_by(name: 'Users') } let(:group) { create(:group) }
let(:ticket) { create(:ticket, group: group) } let(:ticket) { create(:ticket, group: group) }
let!(:session_user) { User.find_by(login: 'admin@example.com') } let(:admin_de) { create(:admin, :groupable, preferences: { locale: 'de-de' }, group: group) }
before do before do
freeze_time freeze_time
@ -35,9 +35,6 @@ RSpec.describe 'Ticket history', type: :system, time_zone: 'Europe/London' do
travel_back travel_back
session_user.preferences[:locale] = 'de-de'
session_user.save!
# Suppress the modal dialog that invites to contributions for translations that are < 95% as this breaks the tests for de-de. # Suppress the modal dialog that invites to contributions for translations that are < 95% as this breaks the tests for de-de.
page.evaluate_script "App.LocalStorage.set('translation_support_no', true, App.Session.get('id'))" page.evaluate_script "App.LocalStorage.set('translation_support_no', true, App.Session.get('id'))"