From a68c2b8422f647f326b2123f42cb6b2dfce22f03 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Fri, 30 Oct 2020 18:28:23 +0100 Subject: [PATCH] System tests added --- test/application_system_test_case.rb | 7 +++++++ test/system/users_test.rb | 14 ++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 test/application_system_test_case.rb create mode 100644 test/system/users_test.rb diff --git a/test/application_system_test_case.rb b/test/application_system_test_case.rb new file mode 100644 index 0000000..fb655fe --- /dev/null +++ b/test/application_system_test_case.rb @@ -0,0 +1,7 @@ +require "test_helper" + +class ApplicationSystemTestCase < ActionDispatch::SystemTestCase + #driven_by :selenium, using: :chrome, screen_size: [1400, 1400] + driven_by :selenium, using: :firefox, screen_size: [1400, 1400] + #driven_by :selenium, using: :headless_firefox, screen_size: [1400, 1400] +end diff --git a/test/system/users_test.rb b/test/system/users_test.rb new file mode 100644 index 0000000..2bbe0a2 --- /dev/null +++ b/test/system/users_test.rb @@ -0,0 +1,14 @@ +require "application_system_test_case" + +class UsersTest < ApplicationSystemTestCase + test "go to login page" do + visit new_user_session_path + + fill_in 'user[email]', with: 'admin@debian.ork' + fill_in 'user[password]', with: 'adminsecret' + + click_on 'commit' + + assert_text 'Signed in successfully' + end +end