diff --git a/.gitignore b/.gitignore index f532c52..7efe2a1 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,5 @@ /.lesshst /.local /.viminfo +/.webdrivers +*.swp diff --git a/Gemfile b/Gemfile index 99e3cab..656ecdc 100644 --- a/Gemfile +++ b/Gemfile @@ -21,13 +21,10 @@ gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ] gem "devise" group :development, :test do - # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem - gem "debug", platforms: %i[ mri mingw x64_mingw ] + gem "byebug" end group :development do - gem "byebug" - # Use console on exceptions pages [https://github.com/rails/web-console] gem "web-console" diff --git a/Gemfile.lock b/Gemfile.lock index cfd66de..b55bce7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -66,13 +66,13 @@ GEM i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) - addressable (2.8.2) + addressable (2.8.4) public_suffix (>= 2.0.2, < 6.0) bcrypt (3.1.18) bindex (0.8.1) builder (3.2.4) byebug (11.1.3) - capybara (3.38.0) + capybara (3.39.0) addressable matrix mini_mime (>= 0.1.3) @@ -84,10 +84,7 @@ GEM concurrent-ruby (1.2.2) crass (1.0.6) date (3.3.3) - debug (1.7.2) - irb (>= 1.5.0) - reline (>= 0.3.1) - devise (4.9.1) + devise (4.9.2) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 4.1.0) @@ -102,9 +99,6 @@ GEM importmap-rails (1.1.5) actionpack (>= 6.0.0) railties (>= 6.0.0) - io-console (0.6.0) - irb (1.6.3) - reline (>= 0.3.0) loofah (2.20.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) @@ -128,8 +122,8 @@ GEM timeout net-smtp (0.3.3) net-protocol - nio4r (2.5.8) - nokogiri (1.14.2-x86_64-linux) + nio4r (2.5.9) + nokogiri (1.14.3-x86_64-linux) racc (~> 1.4) orm_adapter (0.5.0) public_suffix (5.0.1) @@ -167,8 +161,6 @@ GEM zeitwerk (~> 2.5) rake (13.0.6) regexp_parser (2.7.0) - reline (0.3.3) - io-console (~> 0.5) responders (3.1.0) actionpack (>= 5.2) railties (>= 5.2) @@ -227,7 +219,6 @@ PLATFORMS DEPENDENCIES byebug capybara - debug devise importmap-rails mysql2 (~> 0.5) diff --git a/test/application_system_test_case.rb b/test/application_system_test_case.rb index d19212a..9758202 100644 --- a/test/application_system_test_case.rb +++ b/test/application_system_test_case.rb @@ -1,5 +1,8 @@ require "test_helper" class ApplicationSystemTestCase < ActionDispatch::SystemTestCase - driven_by :selenium, using: :chrome, screen_size: [1400, 1400] + # NOTE: remove when capabilities no longer used by Rails + Selenium::WebDriver.logger.ignore(:capabilities) + + driven_by :selenium, using: :headless_firefox, screen_size: [1600, 900] end diff --git a/test/fixtures/users.yml b/test/fixtures/users.yml index 1a2a93c..957a32d 100644 --- a/test/fixtures/users.yml +++ b/test/fixtures/users.yml @@ -1,9 +1,3 @@ -# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html - -one: - email: MyString - status: 1 - -two: - email: MyString - status: 1 +admin: + email: admin@dev27.fixin.me + status: admin diff --git a/test/system/users_test.rb b/test/system/users_test.rb index 6b39d3f..883faad 100644 --- a/test/system/users_test.rb +++ b/test/system/users_test.rb @@ -2,42 +2,27 @@ require "application_system_test_case" class UsersTest < ApplicationSystemTestCase setup do - @user = users(:one) + @admin = users(:admin) end - test "visiting the index" do - visit users_url - assert_selector "h1", text: "Users" + test "sign in" do + visit new_user_session_url end - test "should create user" do - visit users_url - click_on "New user" + #test "visiting the index" do + # visit users_url + # assert_selector "h1", text: "Users" + #end - fill_in "Email", with: @user.email - fill_in "Status", with: @user.status - click_on "Create User" + #test "should create user" do + # visit users_url + # click_on "New user" - assert_text "User was successfully created" - click_on "Back" - end + # fill_in "Email", with: @user.email + # fill_in "Status", with: @user.status + # click_on "Create User" - test "should update User" do - visit user_url(@user) - click_on "Edit this user", match: :first - - fill_in "Email", with: @user.email - fill_in "Status", with: @user.status - click_on "Update User" - - assert_text "User was successfully updated" - click_on "Back" - end - - test "should destroy User" do - visit user_url(@user) - click_on "Destroy this user", match: :first - - assert_text "User was successfully destroyed" - end + # assert_text "User was successfully created" + # click_on "Back" + #end end