File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ FROM --platform=$TARGETPLATFORM ruby:3.2.2-slim
44RUN apt-get update && apt-get install -y --no-install-recommends \
55 build-essential \
66 chromium \
7+ xvfb \
78 chromium-driver \
89 libpq-dev \
910 && rm -rf /var/lib/apt/lists/*
Original file line number Diff line number Diff line change @@ -41,6 +41,14 @@ This command launches the container with the current working directory set
4141to ` /app ` , where your tests are mounted. From there you can run any
4242commands you need, such as ` bundle exec cucumber ` or ` bundle exec rspec ` .
4343
44+
45+ If your tests require an X server, you can prefix the test command with
46+ ` xvfb-run ` to run them in a virtual framebuffer. For example:
47+
48+ ``` bash
49+ xvfb-run bundle exec rspec
50+ ```
51+
4452## Testing Watir
4553
4654You can quickly verify that Watir is working inside the container by running a small script.
@@ -58,5 +66,4 @@ Run the script inside the container with:
5866
5967``` bash
6068bundle exec ruby test_browser.rb
61- ```
62-
69+ ```
You can’t perform that action at this time.
0 commit comments