Skip to content

Commit bd0fa9f

Browse files
DavertMikclaude
andcommitted
Revert to commit 720ec42 with updated Dockerfile
- Reverted to commit 720ec42 (fixed webkit tests) - Updated Dockerfile to use Playwright v1.55.0 and ESM-compatible configuration - Fixed docker setup for ESM exports with proper symlinks 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 720ec42 commit bd0fa9f

File tree

2 files changed

+9
-24
lines changed

2 files changed

+9
-24
lines changed

Dockerfile

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Download Playwright and its dependencies
2-
FROM mcr.microsoft.com/playwright:v1.48.1-noble
3-
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
2+
FROM mcr.microsoft.com/playwright:v1.55.0-noble
43

54
RUN apt-get update --allow-releaseinfo-change
65

@@ -19,29 +18,17 @@ RUN apt-get update && apt-get install -y gnupg wget && \
1918
apt-get install -y google-chrome-stable --no-install-recommends && \
2019
rm -rf /var/lib/apt/lists/*
2120

22-
23-
# Add pptr user.
24-
RUN groupadd -r pptruser && useradd -r -g pptruser -G audio,video pptruser \
25-
&& mkdir -p /home/pptruser/Downloads \
26-
&& chown -R pptruser:pptruser /home/pptruser \
27-
&& chown -R pptruser:pptruser /home/pptruser
28-
29-
#RUN mkdir /home/codecept
30-
3121
COPY . /codecept
22+
WORKDIR /codecept
23+
RUN npm install
3224

33-
RUN chown -R pptruser:pptruser /codecept
34-
RUN runuser -l pptruser -c 'npm i --loglevel=warn --prefix /codecept'
25+
# Remove self-reference and create symlink to use root package.json with ESM exports
26+
RUN rm -rf /codecept/node_modules/codeceptjs && ln -sf /codecept /codecept/node_modules/codeceptjs
3527

3628
RUN ln -s /codecept/bin/codecept.js /usr/local/bin/codeceptjs
3729
RUN mkdir /tests
3830
WORKDIR /tests
39-
# Install puppeteer so it's available in the container.
40-
RUN npm i puppeteer@$(npm view puppeteer version) && npx puppeteer browsers install chrome
41-
RUN google-chrome --version
42-
43-
# Install playwright browsers
44-
RUN npx playwright install
31+
RUN npm init -y && npm pkg set type=module
4532

4633
# Allow to pass argument to codecept run via env variable
4734
ENV CODECEPT_ARGS=""
@@ -50,9 +37,7 @@ ENV NO_OF_WORKERS=""
5037

5138
# Set HOST ENV variable for Selenium Server
5239
ENV HOST=selenium
53-
54-
# Run user as non privileged.
55-
# USER pptruser
40+
ENV CODECEPT_DOCKER=1
5641

5742
# Set the entrypoint
5843
ENTRYPOINT ["/codecept/docker/entrypoint"]

test/acceptance/session_test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import assert from 'assert'
22
import { devices } from 'playwright'
3-
import { within } from '../../lib/effects.js'
4-
import event from '../../lib/event.js'
3+
import { within } from 'codeceptjs/effects'
4+
import event from 'codeceptjs'
55

66
const output_dir = global.output_dir || './output'
77

0 commit comments

Comments
 (0)