From 449336a7f6d7fcce06d0a1dc2fc2c786e6a90004 Mon Sep 17 00:00:00 2001 From: KMY Date: Thu, 1 Feb 2024 13:03:18 +0900 Subject: [PATCH] Fix test --- spec/support/capybara.rb | 2 +- spec/support/stories/profile_stories.rb | 5 +++-- spec/system/new_statuses_spec.rb | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/spec/support/capybara.rb b/spec/support/capybara.rb index 3b9fccd22a..d4f27e209e 100644 --- a/spec/support/capybara.rb +++ b/spec/support/capybara.rb @@ -13,7 +13,7 @@ end Capybara.register_driver :headless_chrome do |app| options = Selenium::WebDriver::Chrome::Options.new options.add_argument '--headless=new' - options.add_argument '--window-size=1920,1050' + options.add_argument '--window-size=1680,1050' Capybara::Selenium::Driver.new( app, diff --git a/spec/support/stories/profile_stories.rb b/spec/support/stories/profile_stories.rb index 74342c337d..8c5a3c91f0 100644 --- a/spec/support/stories/profile_stories.rb +++ b/spec/support/stories/profile_stories.rb @@ -7,7 +7,8 @@ module ProfileStories @bob = Fabricate( :user, email: email, password: password, confirmed_at: confirmed_at, - account: Fabricate(:account, username: 'bob') + account: Fabricate(:account, username: 'bob'), + locale: 'en' ) Web::Setting.where(user: bob).first_or_initialize(user: bob).update!(data: { introductionVersion: 2018_12_16_044202 }) if finished_onboarding @@ -18,7 +19,7 @@ module ProfileStories visit new_user_session_path fill_in 'user_email', with: email fill_in 'user_password', with: password - click_on I18n.t('auth.login') + click_on 'ログイン' # I18n.t('auth.login') end def with_alice_as_local_user diff --git a/spec/system/new_statuses_spec.rb b/spec/system/new_statuses_spec.rb index 5a3f1b406b..68b7993859 100644 --- a/spec/system/new_statuses_spec.rb +++ b/spec/system/new_statuses_spec.rb @@ -15,6 +15,7 @@ describe 'NewStatuses', :sidekiq_inline do before do as_a_logged_in_user visit root_path + page.driver.browser.manage.window.resize_to(1600, 1050) end it 'can be posted' do