Skip to content

Commit

Permalink
Replaced Selenium with Playwright, reorganized .gitignore, updated RE…
Browse files Browse the repository at this point in the history
…ADME
  • Loading branch information
Dantemss committed Oct 18, 2024
1 parent bea8b11 commit c915db9
Show file tree
Hide file tree
Showing 9 changed files with 258 additions and 186 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/migrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,8 @@ jobs:
OXA_DB_USER: postgres
OXA_DB_PASS: postgres
run: |
bundle install --jobs 4 --retry 3
bundle exec rake db:create db:schema:load db:seed --trace
bundle exec rails runner '3.times { FactoryBot.create :user }'
bin/rails db:setup
bin/rails runner '3.times { FactoryBot.create :user }'
git checkout --force -
# Install PR ruby version
Expand All @@ -66,6 +65,4 @@ jobs:
env:
OXA_DB_USER: postgres
OXA_DB_PASS: postgres
run: |
bundle install --jobs 4 --retry 3
bundle exec rake db:migrate
run: bin/rails db:migrate
11 changes: 8 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,13 @@ jobs:
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Playwright
run: |
yarn
yarn playwright install
- name: Test
env:
WORKERS: 4
run: |
bundle install --jobs 4 --retry 3
bundle exec rake parallel:create parallel:load_schema parallel:seed --trace
WORKERS=4 bundle exec rake parallel:spec
bin/rake parallel:setup
bin/rake parallel:spec
66 changes: 21 additions & 45 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,62 +4,38 @@
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile ~/.gitignore_global

# Ignore bundler config.
# Bundler config and custom gem path
/.bundle

# Ignore environment variables
.env

# Ignore the default SQLite database.
/db/*.sqlite3
/db/*.sqlite3-journal

# Ignore all logfiles and tempfiles.
/log/*
!/log/.keep
/tmp

# Ignore public precompiled assets
/public/assets

# Ignore precompiled static error pages
/public/404.html
/public/422.html
/public/500.html
/public/503.html

# Ignore
/vendor/bundle

# Ignore yaml_db database files
/db/data.yml*

# Ignore Cucumber and RSpec failure information
cucumber_rerun.txt
.rspec_last_failures

# Ignore byebug history files
# Byebug history files
.byebug_history

# Ignore webdrivers lock file
.webdrivers_update
# Codecov coverage reports
/coverage

# Ignore Coverage reports
coverage/*
# Environment variables
.env

# Ignore Brakeman security scan results
brakeman.html
# Logfiles and tempfiles
/log
/tmp

# Ignore OS X's Desktop Service Store files
# OS X's Desktop Service Store and Unix editor temp files
*.DS_Store
*~

.generators
.rakeTasks
# Node modules (Playwright)
node_modules/

# Ignore unix editor temp files
*~
# Public precompiled assets and static error pages
/public/assets
/public/404.html
/public/500.html
/public/503.html

# Ignore binary created by redis-server
# Redis-server DB dump
dump.rdb

.idea
# RSpec failure information
.rspec_last_failures
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,10 @@ group :test do

gem 'db-query-matchers'

# Run feature tests with Capybara + Selenium; choose which driver gems to use
# Run feature tests with Capybara + Playwright; choose which driver gems to use
# based on test environment.
gem 'capybara'
gem 'selenium-webdriver', require: false
gem 'capybara-playwright-driver'
gem 'webdrivers', require: false

# Testing emails
Expand Down
13 changes: 12 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,10 @@ GEM
capybara-email (3.0.2)
capybara (>= 2.4, < 4.0)
mail
capybara-playwright-driver (0.5.2)
addressable
capybara
playwright-ruby-client (>= 1.16.0)
capybara-screenshot (1.0.26)
capybara (>= 1.0, < 4)
launchy
Expand Down Expand Up @@ -444,6 +448,10 @@ GEM
rack-contrib (>= 1.1, < 3)
railties (>= 3.0.0, < 8)
method_source (1.1.0)
mime-types (3.6.0)
logger
mime-types-data (~> 3.2015)
mime-types-data (3.2024.1001)
mini_mime (1.1.5)
mini_portile2 (2.8.7)
mini_racer (0.16.0)
Expand Down Expand Up @@ -556,6 +564,9 @@ GEM
ast (~> 2.4.1)
racc
pg (1.5.8)
playwright-ruby-client (1.47.0)
concurrent-ruby (>= 1.1.6)
mime-types (>= 3.0)
premailer (1.27.0)
addressable
css_parser (>= 1.19.0)
Expand Down Expand Up @@ -832,6 +843,7 @@ DEPENDENCIES
byebug
capybara
capybara-email
capybara-playwright-driver
capybara-screenshot
cgi
chronic
Expand Down Expand Up @@ -911,7 +923,6 @@ DEPENDENCIES
sass (= 3.4.19)
sass-rails
sd_notify
selenium-webdriver
sentry-delayed_job
sentry-rails
sentry-ruby
Expand Down
Loading

0 comments on commit c915db9

Please sign in to comment.