Skip to content

Commit

Permalink
Move from SystemTest to ApplicationSystemTestCase
Browse files Browse the repository at this point in the history
  • Loading branch information
colby-swandale committed Oct 15, 2024
1 parent 460c282 commit 152a72a
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 32 deletions.
2 changes: 1 addition & 1 deletion test/integration/locale_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require "test_helper"

class LocaleTest < SystemTest
class LocaleTest < ActionDispatch::IntegrationTest
test "html lang attribute is set from locale" do
I18n.available_locales.each do |locale|
visit root_path(locale: locale)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require "test_helper"
require "application_system_test_case"
require "helpers/email_helpers"

class EmailConfirmationTest < SystemTest
class EmailConfirmationTest < ApplicationSystemTestCase
include ActiveJob::TestHelper

setup do
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require "test_helper"
require "application_system_test_case"
require "helpers/adoption_helpers"

class OwnershipRequestsTest < SystemTest
class OwnershipRequestsTest < ApplicationSystemTestCase
include ActionMailer::TestHelper
include AdoptionHelpers

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require "test_helper"
require "application_system_test_case"

class PageParamsTest < SystemTest
class PageParamsTest < ApplicationSystemTestCase
include SearchKickHelper

test "stats with page param more than 10" do
Expand Down
4 changes: 2 additions & 2 deletions test/integration/pages_test.rb → test/system/pages_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require "test_helper"
require "application_system_test_case"

class PagesTest < SystemTest
class PagesTest < ApplicationSystemTestCase
test "renders existing page" do
visit "/"
click_link "About"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require "test_helper"
require "application_system_test_case"

class PasswordResetTest < SystemTest
class PasswordResetTest < ApplicationSystemTestCase
include ActiveJob::TestHelper

def password_reset_link
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require "test_helper"
require "application_system_test_case"

class ProfileTest < SystemTest
class ProfileTest < ApplicationSystemTestCase
include ActiveJob::TestHelper

setup do
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require "test_helper"
require "application_system_test_case"

class SearchTest < SystemTest
class SearchTest < ApplicationSystemTestCase
include SearchKickHelper

test "searching for a gem" do
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require "test_helper"
require "application_system_test_case"

class SignInTest < SystemTest
class SignInTest < ApplicationSystemTestCase
setup do
@user = create(:user, email: "[email protected]", password: PasswordHelpers::SECURE_TEST_PASSWORD, handle: nil)
@mfa_user = create(:user, email: "[email protected]", password: PasswordHelpers::SECURE_TEST_PASSWORD,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require "test_helper"
require "application_system_test_case"

class SignUpTest < SystemTest
class SignUpTest < ApplicationSystemTestCase
test "sign up" do
visit sign_up_path

Expand Down
4 changes: 2 additions & 2 deletions test/integration/yank_test.rb → test/system/yank_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require "test_helper"
require "application_system_test_case"

class YankTest < SystemTest
class YankTest < ApplicationSystemTestCase
setup do
@user = create(:user, password: PasswordHelpers::SECURE_TEST_PASSWORD)
@rubygem = create(:rubygem, name: "sandworm")
Expand Down
11 changes: 0 additions & 11 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -260,17 +260,6 @@ class ActionDispatch::IntegrationTest
# Force loading of ActionDispatch::SystemTesting::* helpers
_ = ActionDispatch::SystemTestCase

class SystemTest < ActionDispatch::IntegrationTest
include Capybara::DSL
include Capybara::Minitest::Assertions
include ActionDispatch::SystemTesting::TestHelpers::ScreenshotHelper
include ActionDispatch::SystemTesting::TestHelpers::SetupAndTeardown

setup do
Capybara.current_driver = :rack_test
end
end

class AdminPolicyTestCase < ActiveSupport::TestCase
def setup
requires_avo_pro
Expand Down

0 comments on commit 152a72a

Please sign in to comment.