Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Make sure RUBY_VERSION matches the Ruby version in .ruby-version
ARG RUBY_VERSION=3.4.3
FROM ghcr.io/rails/devcontainer/images/ruby:$RUBY_VERSION

RUN wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add - && \
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list' && \
sudo apt-get update && \
sudo apt-get install -y google-chrome-stable
7 changes: 0 additions & 7 deletions .devcontainer/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,4 @@ services:

# Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
# (Adding the "ports" property to this file will not forward from a Codespace.)
depends_on:
- selenium

selenium:
image: selenium/standalone-chromium
restart: unless-stopped


5 changes: 0 additions & 5 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@
"ghcr.io/rails/devcontainer/features/sqlite3": {}
},

"containerEnv": {
"CAPYBARA_SERVER_PORT": "45678",
"SELENIUM_HOST": "selenium"
},

// A known problem is that this port forwarding configuration is not working properly right after codespace is started.
// PORTS > Visibility, change the setting that is currently /set to Private to Public, and immediately change it back to Private.
// This behavior seems to be a bug and is reported below.
Expand Down
11 changes: 1 addition & 10 deletions test/application_system_test_case.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
require "test_helper"

class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
if ENV["CAPYBARA_SERVER_PORT"]
served_by host: "rails-app", port: ENV["CAPYBARA_SERVER_PORT"]

driven_by :selenium, using: :headless_chrome, screen_size: [ 1400, 1400 ], options: {
browser: :remote,
url: "http://#{ENV["SELENIUM_HOST"]}:4444"
}
else
driven_by :selenium, using: :headless_chrome, screen_size: [ 1400, 1400 ]
end
driven_by :selenium, using: :headless_chrome, screen_size: [ 1400, 1400 ]
end