Skip to content

Commit

Permalink
Merge branch 'main' into fixes/update-billing-test-helper
Browse files Browse the repository at this point in the history
  • Loading branch information
gazayas committed Aug 3, 2023
2 parents 58f7814 + eb05e88 commit e65a040
Show file tree
Hide file tree
Showing 24 changed files with 396 additions and 291 deletions.
49 changes: 49 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,54 @@ jobs:
# - store_test_results:
# path: test/reports

'Minitest with HIDE_THINGS':
docker:
- <<: *ruby_node_browsers_docker_image
- <<: *postgres_docker_image
- image: circleci/redis
executor: ruby/default
parallelism: 16
steps:
- browser-tools/install-browser-tools
- checkout
- restore_cache: *restore_bundler_cache
- restore_cache: *restore_yarn_cache

# Install dependencies
- ruby/bundle-install
- run: bundle clean --force
- run: bundle exec rake bt:link
- run: yarn install
- run: yarn build
- run: yarn build:css

- *wait_for_docker

- run:
name: Run tests with Knapsack Pro
command: |
export RAILS_ENV=test
bundle exec rails "knapsack_pro:queue:minitest[--verbose]"
environment:
KNAPSACK_PRO_CI_NODE_TOTAL: 16
HIDE_THINGS: true

# If you don't want to use Knapsack Pro, then use this configuration:
#
# - run:
# name: Run unit tests with HIDE_THINGS
# command: HIDE_THINGS=true bundle exec rails test
# - run:
# name: Run system tests with HIDE_THINGS
# command: HIDE_THINGS=true bundle exec rails test:system
#
# If you want to gather test results in CircleCI when not running tests in parallel,
# include `minitest-ci` in your Gemfile and uncomment the following step.
# You can access the test results via the "Tests" tab within each build in CircleCI.
#
# - store_test_results:
# path: test/reports

'Minitest for Super Scaffolding':
docker:
- <<: *ruby_node_browsers_docker_image
Expand Down Expand Up @@ -250,6 +298,7 @@ workflows:
- 'Standard Ruby'
- 'Database Schema Check'
- 'Minitest'
- 'Minitest with HIDE_THINGS'
- 'Minitest for Super Scaffolding'
# - 'System Tests with Cuprite'
# - 'System Tests for Action Models'
11 changes: 4 additions & 7 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ gem "chronic"

group :development, :test do
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
# TODO: Remove version restriction once Ruby 3.2.2 is released.
# See: https://github.com/ruby/debug/issues/898#issuecomment-1451804022
gem "debug", "1.8.0", platforms: %i[mri mingw x64_mingw]
gem "debug", platforms: %i[mri mingw x64_mingw]

# A gem for generating test coverage results in your browser.
gem "simplecov", require: false
Expand All @@ -82,16 +80,15 @@ end

group :test do
# Use system testing [https://guides.rubyonrails.org/testing.html#system-testing]
gem "capybara", github: "teamcapybara/capybara"
gem "capybara", "~> 3.39"

# Selenium is the default default Capybara driver for system tests that ships with
# Rails. Cuprite is an alternative driver that uses Chrome's native DevTools protocol
# and offers improved speed and reliability, but only works with Chrome. If you want
# to switch to Cuprite, you can comment out the `selenium-webdriver` and `webdrivers`
# gems and uncomment the `cuprite` gem below. Bullet Train will automatically load
# to switch to Cuprite, you can comment out the `selenium-webdriver` gem
# and uncomment the `cuprite` gem below. Bullet Train will automatically load
# the correct configuration based on which gem is included.
gem "selenium-webdriver"
gem "webdrivers"

# gem "cuprite"
end
Expand Down
102 changes: 45 additions & 57 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
GIT
remote: https://github.com/teamcapybara/capybara.git
revision: 43e32a84954817caeba2313db7a7599417893f9f
specs:
capybara (3.39.0)
addressable
matrix
mini_mime (>= 0.1.3)
nokogiri (~> 1.11)
rack (>= 1.6.0)
rack-test (>= 0.6.3)
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)

GEM
remote: https://rubygems.org/
specs:
Expand Down Expand Up @@ -87,7 +73,7 @@ GEM
ast (2.4.2)
awesome_print (1.9.2)
aws-eventstream (1.2.0)
aws-partitions (1.762.0)
aws-partitions (1.765.0)
aws-sdk-core (3.172.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.651.0)
Expand All @@ -110,7 +96,7 @@ GEM
bootsnap (1.16.0)
msgpack (~> 1.2)
builder (3.2.4)
bullet_train (1.2.25)
bullet_train (1.2.26)
awesome_print
bullet_train-fields
bullet_train-has_uuid
Expand All @@ -119,7 +105,7 @@ GEM
bullet_train-scope_validator
bullet_train-super_load_and_authorize_resource
bullet_train-themes
cable_ready (= 5.0.0.pre9)
cable_ready (~> 5.0.0)
cancancan
commonmarker
devise
Expand All @@ -141,7 +127,7 @@ GEM
unicode-emoji
valid_email
xxhash
bullet_train-api (1.2.25)
bullet_train-api (1.2.26)
bullet_train
doorkeeper
factory_bot
Expand All @@ -150,65 +136,72 @@ GEM
pagy_cursor
rack-cors
rails (>= 6.0.0)
bullet_train-fields (1.2.25)
bullet_train-fields (1.2.26)
chronic
cloudinary
phonelib
rails (>= 6.0.0)
bullet_train-has_uuid (1.2.25)
bullet_train-has_uuid (1.2.26)
rails (>= 6.0.0)
bullet_train-incoming_webhooks (1.2.25)
bullet_train-incoming_webhooks (1.2.26)
bullet_train-super_scaffolding
rails (>= 6.0.0)
bullet_train-integrations (1.2.25)
bullet_train-integrations (1.2.26)
rails (>= 6.0.0)
bullet_train-integrations-stripe (1.2.25)
bullet_train-integrations-stripe (1.2.26)
omniauth
omniauth-rails_csrf_protection
omniauth-stripe-connect
rails (>= 6.0.0)
stripe
bullet_train-obfuscates_id (1.2.25)
bullet_train-obfuscates_id (1.2.26)
hashids
rails (>= 6.0.0)
bullet_train-outgoing_webhooks (1.2.25)
bullet_train-outgoing_webhooks (1.2.26)
public_suffix
rails (>= 6.0.0)
bullet_train-roles (1.2.25)
bullet_train-roles (1.2.26)
active_hash
activesupport
cancancan
bullet_train-routes (1.0.0)
rails (>= 6.0.0)
bullet_train-scope_questions (1.2.25)
bullet_train-scope_questions (1.2.26)
rails (>= 6.0.0)
bullet_train-scope_validator (1.2.25)
bullet_train-sortable (1.2.25)
bullet_train-scope_validator (1.2.26)
bullet_train-sortable (1.2.26)
rails (>= 6.0.0)
bullet_train-super_load_and_authorize_resource (1.2.25)
bullet_train-super_load_and_authorize_resource (1.2.26)
rails (>= 6.0.0)
bullet_train-super_scaffolding (1.2.25)
bullet_train-super_scaffolding (1.2.26)
bullet_train
indefinite_article
rails (>= 6.0.0)
bullet_train-themes (1.2.25)
bullet_train-themes (1.2.26)
rails (>= 6.0.0)
bullet_train-themes-light (1.2.25)
bullet_train-themes-light (1.2.26)
bullet_train-themes-tailwind_css
rails (>= 6.0.0)
bullet_train-themes-tailwind_css (1.2.25)
bullet_train-themes-tailwind_css (1.2.26)
bullet_train
bullet_train-themes
rails (>= 6.0.0)
cable_ready (5.0.0.pre9)
actioncable (>= 5.2)
cable_ready (5.0.0)
actionpack (>= 5.2)
actionview (>= 5.2)
activerecord (>= 5.2)
activesupport (>= 5.2)
railties (>= 5.2)
thread-local (>= 1.1.0)
cancancan (3.5.0)
capybara (3.39.2)
addressable
matrix
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
rack (>= 1.6.0)
rack-test (>= 0.6.3)
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
capybara-email (3.0.2)
capybara (>= 2.4, < 4.0)
mail
Expand Down Expand Up @@ -254,7 +247,7 @@ GEM
unf (>= 0.0.5, < 1.0.0)
doorkeeper (5.6.6)
railties (>= 5)
email_reply_parser (0.5.10)
email_reply_parser (0.5.11)
erubi (1.12.0)
erubis (2.7.0)
extended_email_reply_parser (0.5.1)
Expand Down Expand Up @@ -314,7 +307,7 @@ GEM
letter_opener (1.8.1)
launchy (>= 2.2, < 3)
lint_roller (1.0.0)
loofah (2.21.2)
loofah (2.21.3)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
magic_test (0.0.9)
Expand Down Expand Up @@ -357,12 +350,12 @@ GEM
nice_partials (0.9.3)
actionview (>= 4.2.6)
nio4r (2.5.9)
nokogiri (1.14.3)
mini_portile2 (~> 2.8.0)
nokogiri (1.15.2)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogiri (1.14.3-arm64-darwin)
nokogiri (1.15.2-arm64-darwin)
racc (~> 1.4)
nokogiri (1.14.3-x86_64-linux)
nokogiri (1.15.2-x86_64-linux)
racc (~> 1.4)
oauth2 (2.0.9)
faraday (>= 0.17.3, < 3.0)
Expand Down Expand Up @@ -417,7 +410,7 @@ GEM
puma (6.2.2)
nio4r (~> 2.0)
pwned (2.0.2)
racc (1.6.2)
racc (1.7.1)
rack (2.2.7)
rack-cors (2.0.1)
rack (>= 2.0.0)
Expand Down Expand Up @@ -466,7 +459,7 @@ GEM
redis-client (>= 0.9.0)
redis-client (0.14.1)
connection_pool
regexp_parser (2.8.0)
regexp_parser (2.8.1)
reline (0.3.3)
io-console (~> 0.5)
require_all (3.0.0)
Expand All @@ -478,9 +471,9 @@ GEM
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
rexml (3.2.5)
rexml (3.2.6)
rotp (6.2.2)
rqrcode (2.1.2)
rqrcode (2.2.0)
chunky_png (~> 1.0)
rqrcode_core (~> 1.0)
rqrcode_core (1.2.0)
Expand All @@ -499,13 +492,13 @@ GEM
rubocop-performance (1.16.0)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
ruby-openai (4.0.0)
ruby-openai (4.1.0)
faraday (>= 1)
faraday-multipart (>= 1)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
selenium-webdriver (4.9.1)
selenium-webdriver (4.11.0)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
Expand Down Expand Up @@ -557,7 +550,7 @@ GEM
stimulus-rails (1.2.1)
railties (>= 6.0.0)
stripe (8.5.0)
thor (1.2.1)
thor (1.2.2)
thread-local (1.1.0)
timeout (0.3.2)
turbo-rails (1.4.0)
Expand Down Expand Up @@ -585,10 +578,6 @@ GEM
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
railties (>= 6.0.0)
webdrivers (5.2.0)
nokogiri (~> 1.6)
rubyzip (>= 1.3.0)
selenium-webdriver (~> 4.0)
websocket (1.2.9)
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
Expand Down Expand Up @@ -620,12 +609,12 @@ DEPENDENCIES
bullet_train-super_scaffolding
bullet_train-themes
bullet_train-themes-light
capybara!
capybara (~> 3.39)
capybara-email
chronic
colorize
cssbundling-rails
debug (= 1.8.0)
debug
devise
devise-two-factor
factory_bot_rails
Expand Down Expand Up @@ -658,7 +647,6 @@ DEPENDENCIES
turbo-rails
tzinfo-data
web-console
webdrivers

RUBY VERSION
ruby 3.2.2
Expand Down
7 changes: 7 additions & 0 deletions app/javascript/controllers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ import consumer from '../channels/consumer'

const application = Application.start()

// In the browser console:
// * Type `window.Stimulus.debug = true` to log actions and lifecycle hooks
// on subsequent user interactions and Turbo page views.
// * Type `window.Stimulus.router.modulesByIdentifier` for a list of loaded controllers.
// See https://stimulus.hotwired.dev/handbook/installing#debugging
window.Stimulus = application

// Load all the controllers within this directory and all subdirectories.
// Controller files must be named *_controller.js.
import { context as controllersContext } from './**/*_controller.js';
Expand Down
Loading

0 comments on commit e65a040

Please sign in to comment.