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'
RSpec.describe 'Ticket history', type: :system, time_zone: 'Europe/London' do
let(:group) { Group.find_by(name: 'Users') }
RSpec.describe 'Ticket history', type: :system, time_zone: 'Europe/London', authenticated_as: :admin_de do
let(:group) { create(: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
freeze_time
@ -35,9 +35,6 @@ RSpec.describe 'Ticket history', type: :system, time_zone: 'Europe/London' do
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.
page.evaluate_script "App.LocalStorage.set('translation_support_no', true, App.Session.get('id'))"