@StatelessCode
  @StatelessCode
Stateless Code | Add Code Climate to Project and Allow for Browser Test Driver Options @StatelessCode | Uploaded October 2022 | Updated October 2024, 4 hours ago.
This video has two parts:

Part 1: Add Code Climate to the Project
This is fairly straightforward. We are already signed up for Code Climate from the NerdDice Gem series, so we just need to add the nerd_dice_dot_com repo to Code Climate and add the badge to the README.

Part 2:
In our video when we set up our GitHub actions to work with browser-driven system tests, we changed the driver from :chrome to :headless_chrome to make the build work on GitHub, but there are some times when you need a non-headless version of a browser where you can pause the test case using the debugger statement and examine the browser using developer tools. To achieve this, we allow the test driver to be overwritten if the BROWSER_TEST_DRIVER environment variable is set. This allows us to override the default of headless_chrome on a case-by-case basis as needed.

This video covers:
00:00:12 Introduction and review of previous videos
00:02:58 Add Code Climate to the project
00:05:06 Add Code Climate and build badges to README and commit change
00:08:53 Overview of the story for allowing a CLI option for browser system test driver
00:11:41 Check on build for first story and merge it in
00:13:53 Implement the browser test driver story
00:16:49 Restore the fake tests from setting up system tests for GitHub actions to test it out
00:19:57 Use chrome driver and debugger statement to show ability to debug from the browser
00:22:08 Run Rubocop and add documentation comment
00:23:30 Commit, push, pull request, close issue, and preview of the Devise issues

#ruby #rails7 #rails #rubyonrails #rubygems #codecast #screencast #github #opensource #minitest #TDD #agile #NerdDice #DnD #roleplaying #softwaredevelopment #learntocode #tailwind #postgresql #rubocop #githubactions #codeclimate

Resources that we relied upon for this solution:
- Configuring Rails system tests for headless and headfull browsers by Josef Strzibny https://nts.strzibny.name/rails-system-tests-headless/

See other related StatelessCode videos:
- NerdDice RubyGem: Add Code Climate to Gem youtu.be/MCh2GF5Swpg

This video is CC0 - No rights reserved. (YouTube doesn't allow this option when publishing.) All code is released under the UNLICENSE. Stateless Code denies the concept of "intellectual property". Copying is not stealing.
Add Code Climate to Project and Allow for Browser Test Driver OptionsInstall Windows Subsystem for Linux 2 (WSL2) and Set Up Remote Development for Visual Studio CodeCodecast: Getting Started with Rails 7 10: Destroy an Article and Get it Working with TurboCreate a RubyGem 94: Fix a Cognitive Complexity Code Smell from Code ClimateConfigure Devise Settings and Add Environment-Specific Rails CredentialsCodecast: Install Rails 6, PostgreSQL 13, MariaDB 10.5Install balenaEtcher on Ubuntu 22.04Inkscape 07: Create a logo for the statelesscode.com WordPress SeriesUpgrade to Devise 4.9 on Rails 7 and Decommission the 4.8 HacksCodecast: Create a RubyGem 56: Refactor roll_ability_scores SpecsCodecast: Getting Started with Rails 7 24: Use ActionText for Rich Text ContentCreate Pre and Post Sign-In Pages to Test Devise

Add Code Climate to Project and Allow for Browser Test Driver Options @StatelessCode

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER