From e5dc7a24b0dff17f95f294375ed73e149f6ccf70 Mon Sep 17 00:00:00 2001 From: Gabriel Zayas Date: Sat, 2 Mar 2024 05:41:07 +0900 Subject: [PATCH 1/7] Account for invite-only mode in system tests (#1333) --- test/application_system_test_case.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/application_system_test_case.rb b/test/application_system_test_case.rb index 58387ce3..f6584759 100644 --- a/test/application_system_test_case.rb +++ b/test/application_system_test_case.rb @@ -230,8 +230,17 @@ def sign_in_from_homepage(display_details = self.display_details) def new_registration_page(display_details = self.display_details) # TODO: Adjust tests to start from the home page. + # Ensure no one is signed in before trying to register a new account. + logout + visit new_user_registration_path + if invitation_only? + assert_text("You need to sign in or sign up before continuing.") + refute_text("Create Your Account") + visit invitation_path(key: ENV["INVITATION_KEYS"].split(",\s+").first) + end + # this forces capybara to wait until the proper page loads. # otherwise our tests will immediately start trying to match things before the page even loads. assert_text("Create Your Account") From c1bb7a0eb925945da5544efb435f306b66362118 Mon Sep 17 00:00:00 2001 From: Kasper Timm Hansen Date: Fri, 1 Mar 2024 21:43:01 +0100 Subject: [PATCH 2/7] Run super scaffolding tests via directory (#1329) Follow-up to #1311 With the new directory we can ensure any new super scaffolding test file is automatically run, so we don't forget. --- .github/workflows/_run_super_scaffolding_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/_run_super_scaffolding_tests.yml b/.github/workflows/_run_super_scaffolding_tests.yml index 7fe20256..ab7df711 100644 --- a/.github/workflows/_run_super_scaffolding_tests.yml +++ b/.github/workflows/_run_super_scaffolding_tests.yml @@ -128,7 +128,7 @@ jobs: CIRCLE_NODE_INDEX: ${{ strategy.job-index }} - name: 'Run Super Scaffolding Test' - run: bundle exec rails test test/system/super_scaffolding/super_scaffolding_test.rb test/system/super_scaffolding/partial_test.rb test/controllers/webhooks/incoming/some_provider_webhooks_controller_test.rb + run: bin/rails test test/system/super_scaffolding/ test/controllers/webhooks/incoming/some_provider_webhooks_controller_test.rb working-directory: tmp/starter - name: Test Summary From d557995f23f82caf458ee6c2befc30aa173fb6bf Mon Sep 17 00:00:00 2001 From: Gabriel Zayas Date: Sat, 2 Mar 2024 05:44:10 +0900 Subject: [PATCH 3/7] Prevent scaffolding test from generating OpenAPI document unnecessarily (#1325) * Remove unneeded command for Super Scaffolding OpenAPI doc test * Remove rm command for openapi documentation in scaffolding test * Start test server for individual openapi test before linting * Remove unnecessary rm from scaffolding system test --- test/system/super_scaffolding/super_scaffolding_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/system/super_scaffolding/super_scaffolding_test.rb b/test/system/super_scaffolding/super_scaffolding_test.rb index 1b4c7c35..44776767 100644 --- a/test/system/super_scaffolding/super_scaffolding_test.rb +++ b/test/system/super_scaffolding/super_scaffolding_test.rb @@ -286,8 +286,8 @@ def setup end test "OpenAPI V3 document is still valid" do - visit "http://127.0.0.1:3001/api/v1/openapi.yaml" - puts(output = `yarn exec redocly lint http://127.0.0.1:3001/api/v1/openapi.yaml 1> /dev/stdout 2> /dev/stdout; rm openapi.yaml`) + visit "/" # Make sure the test server is running before linting the file. + puts(output = `yarn exec redocly lint http://127.0.0.1:3001/api/v1/openapi.yaml 1> /dev/stdout 2> /dev/stdout`) # redocly/openapi-core changed the format of their success message in version 1.2.0. # https://github.com/Redocly/redocly-cli/pull/1239 # We use a robust regex here so that we can match both formats. From b9580d24692ec7fc5d97bf1ac8d0d7984cd59b09 Mon Sep 17 00:00:00 2001 From: Gabriel Zayas Date: Sat, 2 Mar 2024 05:44:46 +0900 Subject: [PATCH 4/7] Disable strong passwords by default in development (#1310) * Disable strong passwords by default in development * Add extra comment * Update config/initializers/bullet_train.rb * Update config/initializers/bullet_train.rb --------- Co-authored-by: Jeremy Green --- config/initializers/bullet_train.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config/initializers/bullet_train.rb b/config/initializers/bullet_train.rb index b5249783..b3491082 100644 --- a/config/initializers/bullet_train.rb +++ b/config/initializers/bullet_train.rb @@ -1,6 +1,8 @@ BulletTrain.configure do |config| - # Uncomment this line if you want to bypass strong passwords. - # config.strong_passwords = false + # Use strong passwords when registering a user in non-development environment. + # Please note that the password validations for devise are still in place + # in all environments. + config.strong_passwords = !Rails.env.development? # Enable bulk invitations on the user onboarding step. # config.enable_bulk_invitations = true From c0587faf8f2bd284ecbb6610c00d615b9ed78aee Mon Sep 17 00:00:00 2001 From: Gabriel Zayas Date: Sat, 2 Mar 2024 05:45:40 +0900 Subject: [PATCH 5/7] Visit Creative Concepts page directly in reactivity system test (#1300) --- test/system/reactivity_system_test.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/test/system/reactivity_system_test.rb b/test/system/reactivity_system_test.rb index c3347a93..0425c84a 100644 --- a/test/system/reactivity_system_test.rb +++ b/test/system/reactivity_system_test.rb @@ -36,9 +36,13 @@ def teardown end end - # We should be on the account dashboard with no Creative Concepts listed. + # Ensure the user was able to sign up successfully. assert_text "My Super Team’s Dashboard" + @team = Team.find_by(name: "My Super Team") + + visit account_team_scaffolding_absolutely_abstract_creative_concepts_path(@team) assert_text "If you're wondering what this" + assert_text "Add New Creative Concept" # Open a new window. We'll bounce back and forth between these two to ensure updates are happening in both places. current_url = page.current_url @@ -47,7 +51,7 @@ def teardown # We're going to do some activity and assertions within the new window. within_window second_window do visit current_url - assert_text "My Super Team’s Dashboard" + assert_text "My Super Team’s Creative Concepts" # Ensure we're on a page with no Creative Concepts listed. # (This sets us up to confirm that an entire table manifests out of nowhere.) @@ -65,7 +69,7 @@ def teardown within_window second_window do # Ensure we're still on the same page. - assert_text "My Super Team’s Dashboard" + assert_text "My Super Team’s Creative Concepts" # But now the new Creative Concept should be present on the page. assert_text "My Generic Creative Concept" From f2979439fe38c14837cbc4376e3f004a918e6b82 Mon Sep 17 00:00:00 2001 From: Pascal Laliberte Date: Fri, 1 Mar 2024 15:47:38 -0500 Subject: [PATCH 6/7] whitelist ngrok-free.app domain in config.hosts (#1299) --- config/environments/development.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/config/environments/development.rb b/config/environments/development.rb index d88e8505..319b2b01 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -94,6 +94,7 @@ # whitelist ngrok domains. config.hosts << /[a-z0-9-]+\.ngrok\.io/ + config.hosts << /[a-z0-9-]+\.ngrok-free\.app/ config.action_mailer.delivery_method = :letter_opener config.active_job.queue_adapter = :sidekiq From f97f3c12422f5b4433431c642bf09e7693a1a42f Mon Sep 17 00:00:00 2001 From: Jeremy Green Date: Fri, 1 Mar 2024 16:12:45 -0600 Subject: [PATCH 7/7] BT-Core version bump: - 1.6.35 (#1346) Co-authored-by: jagthedrummer --- Gemfile | 2 +- Gemfile.lock | 76 ++++++++++++++++++++++++++-------------------------- package.json | 6 ++--- yarn.lock | 24 ++++++++--------- 4 files changed, 54 insertions(+), 54 deletions(-) diff --git a/Gemfile b/Gemfile index ebeb5760..af140c68 100644 --- a/Gemfile +++ b/Gemfile @@ -112,7 +112,7 @@ end # We use a constant here so that we can ensure that all of the bullet_train-* # packages are on the same version. -BULLET_TRAIN_VERSION = "1.6.34" +BULLET_TRAIN_VERSION = "1.6.35" # Core packages. gem "bullet_train", BULLET_TRAIN_VERSION diff --git a/Gemfile.lock b/Gemfile.lock index 106be5e3..65ec9951 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -127,7 +127,7 @@ GEM bootsnap (1.17.1) msgpack (~> 1.2) builder (3.2.4) - bullet_train (1.6.34) + bullet_train (1.6.35) awesome_print bullet_train-has_uuid bullet_train-roles @@ -160,7 +160,7 @@ GEM unicode-emoji valid_email xxhash - bullet_train-api (1.6.34) + bullet_train-api (1.6.35) bullet_train bullet_train-super_scaffolding colorizer @@ -171,61 +171,61 @@ GEM pagy_cursor rack-cors rails (>= 6.0.0) - bullet_train-fields (1.6.34) + bullet_train-fields (1.6.35) chronic cloudinary phonelib rails (>= 6.0.0) - bullet_train-has_uuid (1.6.34) + bullet_train-has_uuid (1.6.35) rails (>= 6.0.0) - bullet_train-incoming_webhooks (1.6.34) + bullet_train-incoming_webhooks (1.6.35) bullet_train bullet_train-api bullet_train-super_scaffolding rails (>= 6.0.0) - bullet_train-integrations (1.6.34) + bullet_train-integrations (1.6.35) rails (>= 6.0.0) - bullet_train-integrations-stripe (1.6.34) + bullet_train-integrations-stripe (1.6.35) omniauth omniauth-rails_csrf_protection omniauth-stripe-connect rails (>= 6.0.0) stripe - bullet_train-obfuscates_id (1.6.34) + bullet_train-obfuscates_id (1.6.35) hashids rails (>= 6.0.0) - bullet_train-outgoing_webhooks (1.6.34) + bullet_train-outgoing_webhooks (1.6.35) public_suffix rails (>= 6.0.0) - bullet_train-roles (1.6.34) + bullet_train-roles (1.6.35) active_hash activesupport cancancan bullet_train-routes (1.0.0) rails (>= 6.0.0) - bullet_train-scope_questions (1.6.34) + bullet_train-scope_questions (1.6.35) rails (>= 6.0.0) - bullet_train-scope_validator (1.6.34) + bullet_train-scope_validator (1.6.35) rails - bullet_train-sortable (1.6.34) + bullet_train-sortable (1.6.35) rails (>= 6.0.0) - bullet_train-super_load_and_authorize_resource (1.6.34) + bullet_train-super_load_and_authorize_resource (1.6.35) cancancan rails (>= 6.0.0) - bullet_train-super_scaffolding (1.6.34) + bullet_train-super_scaffolding (1.6.35) colorizer indefinite_article masamune-ast (~> 2.0.2) rails (>= 6.0.0) - bullet_train-themes (1.6.34) + bullet_train-themes (1.6.35) bullet_train-fields nice_partials (~> 0.9) rails (>= 6.0.0) - bullet_train-themes-light (1.6.34) + bullet_train-themes-light (1.6.35) bullet_train-themes-tailwind_css masamune-ast (~> 2.0.2) rails (>= 6.0.0) - bullet_train-themes-tailwind_css (1.6.34) + bullet_train-themes-tailwind_css (1.6.35) bullet_train-themes rails (>= 6.0.0) cable_ready (5.0.3) @@ -365,7 +365,7 @@ GEM jsbundling-rails (1.3.0) railties (>= 6.0.0) json (2.7.1) - jwt (2.8.0) + jwt (2.8.1) base64 knapsack_pro (6.0.4) rake @@ -657,7 +657,7 @@ GEM stimulus-rails (1.3.3) railties (>= 6.0.0) stringio (3.1.0) - stripe (10.10.0) + stripe (10.11.0) terser (1.2.0) execjs (>= 0.3.0, < 3) thor (1.3.0) @@ -717,24 +717,24 @@ DEPENDENCIES avo (>= 3.1.7) aws-sdk-s3 bootsnap - bullet_train (= 1.6.34) - bullet_train-api (= 1.6.34) - bullet_train-fields (= 1.6.34) - bullet_train-has_uuid (= 1.6.34) - bullet_train-incoming_webhooks (= 1.6.34) - bullet_train-integrations (= 1.6.34) - bullet_train-integrations-stripe (= 1.6.34) - bullet_train-obfuscates_id (= 1.6.34) - bullet_train-outgoing_webhooks (= 1.6.34) - bullet_train-roles (= 1.6.34) - bullet_train-scope_questions (= 1.6.34) - bullet_train-scope_validator (= 1.6.34) - bullet_train-sortable (= 1.6.34) - bullet_train-super_load_and_authorize_resource (= 1.6.34) - bullet_train-super_scaffolding (= 1.6.34) - bullet_train-themes (= 1.6.34) - bullet_train-themes-light (= 1.6.34) - bullet_train-themes-tailwind_css (= 1.6.34) + bullet_train (= 1.6.35) + bullet_train-api (= 1.6.35) + bullet_train-fields (= 1.6.35) + bullet_train-has_uuid (= 1.6.35) + bullet_train-incoming_webhooks (= 1.6.35) + bullet_train-integrations (= 1.6.35) + bullet_train-integrations-stripe (= 1.6.35) + bullet_train-obfuscates_id (= 1.6.35) + bullet_train-outgoing_webhooks (= 1.6.35) + bullet_train-roles (= 1.6.35) + bullet_train-scope_questions (= 1.6.35) + bullet_train-scope_validator (= 1.6.35) + bullet_train-sortable (= 1.6.35) + bullet_train-super_load_and_authorize_resource (= 1.6.35) + bullet_train-super_scaffolding (= 1.6.35) + bullet_train-themes (= 1.6.35) + bullet_train-themes-light (= 1.6.35) + bullet_train-themes-tailwind_css (= 1.6.35) capybara (~> 3.39) capybara-email capybara-lockstep diff --git a/package.json b/package.json index 0a08d32b..c30b0758 100644 --- a/package.json +++ b/package.json @@ -2,9 +2,9 @@ "name": "app", "private": true, "dependencies": { - "@bullet-train/bullet-train": "1.6.34", - "@bullet-train/bullet-train-sortable": "1.6.34", - "@bullet-train/fields": "1.6.34", + "@bullet-train/bullet-train": "1.6.35", + "@bullet-train/bullet-train-sortable": "1.6.35", + "@bullet-train/fields": "1.6.35", "@esbuild-plugins/node-globals-polyfill": "^0.2.3", "@fullhuman/postcss-purgecss": "5.0.0", "@hotwired/turbo-rails": "^8.0.3", diff --git a/yarn.lock b/yarn.lock index f53baae7..e903f894 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1061,26 +1061,26 @@ "@babel/helper-validator-identifier" "^7.22.19" to-fast-properties "^2.0.0" -"@bullet-train/bullet-train-sortable@1.6.34": - version "1.6.34" - resolved "https://registry.yarnpkg.com/@bullet-train/bullet-train-sortable/-/bullet-train-sortable-1.6.34.tgz#f933e2be57acfc7cf12c8dfc9b68224cc5be5523" - integrity sha512-YCaJhWK8zBzICFJ1iED/icWZEI+QI0+oqS0Ok7k83ERs6LR8qBxOBduPhsJdTCbi+aBSfL2g3x6MVIFZszT4gA== +"@bullet-train/bullet-train-sortable@1.6.35": + version "1.6.35" + resolved "https://registry.yarnpkg.com/@bullet-train/bullet-train-sortable/-/bullet-train-sortable-1.6.35.tgz#c1b9ee3273e6bb8b1d89906a2bde95999daba3ff" + integrity sha512-HUhUrr3GRrLWQ94Mjvaay4R+TNjDLunWhyNmzlldbUwY/mhpe0kKvabBbO/OaRq99rg3NkpD7d8GmL9BHyvT9g== dependencies: "@hotwired/stimulus" "^3.0.1" "@rails/request.js" "^0.0.6" dragula "^3.7.3" -"@bullet-train/bullet-train@1.6.34": - version "1.6.34" - resolved "https://registry.yarnpkg.com/@bullet-train/bullet-train/-/bullet-train-1.6.34.tgz#1d86e331128c219b9561aed244287ced6f9d338e" - integrity sha512-uI6/F0AByA/tE2RCobVQDYLtCgJzMOlxuyifQidvzNgli7zwwXlEIvU3fA+8nXmBqa0+JegbxKzyXpDokcuviQ== +"@bullet-train/bullet-train@1.6.35": + version "1.6.35" + resolved "https://registry.yarnpkg.com/@bullet-train/bullet-train/-/bullet-train-1.6.35.tgz#73e46d4affd88e0fea660dd189578b07a4fa0462" + integrity sha512-zfmDxzc8Y02XnZhUl5vctEHkAYtjCgNMMO7pGxgtfTCIub721wRJu2AyloUW95KRzPwJH4jslzzAhbZP1oUhgQ== dependencies: "@hotwired/stimulus" "^3.0.1" -"@bullet-train/fields@1.6.34": - version "1.6.34" - resolved "https://registry.yarnpkg.com/@bullet-train/fields/-/fields-1.6.34.tgz#f8638ac47c55314bb30c804c63410c282a774c1e" - integrity sha512-zgfWhynmH6GRq3vmdPKwwucg4m/6SjDVw8T60R68j+fsVxqCPhrJeuk5YqHtupERcncezr+SN62rlccUvXmlGw== +"@bullet-train/fields@1.6.35": + version "1.6.35" + resolved "https://registry.yarnpkg.com/@bullet-train/fields/-/fields-1.6.35.tgz#b9ef647a0e9a347254255b9a6626314941994475" + integrity sha512-JwwLq780pi7ExpUFxV1I/GZGR7Mw4w87VRYGt4NI/0uPv1eiHoMVn0TOjbTFsxiymP1Wofz7NfWQaMmghvamCw== dependencies: "@hotwired/stimulus" "^3.0.1" "@simonwep/pickr" "^1.8.1"