@aws/mynah-ui 4.35.5 → 4.35.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Dockerfile +21 -4
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/package.json +11 -5
- package/scripts/docker-build.js +36 -0
- package/scripts/docker-health-check.js +45 -0
- package/scripts/get-playwright-version.js +62 -0
- package/scripts/pre-test-setup.js +80 -0
- package/scripts/setup-playwright.js +61 -0
- package/scripts/test-webkit.js +44 -0
- package/ui-tests/package.json +10 -6
- package/ui-tests/playwright.config.ts +13 -1
package/Dockerfile
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
1
|
+
# Version-agnostic Dockerfile for Mynah UI E2E Tests
|
|
2
|
+
# Supports dynamic Playwright version detection
|
|
3
|
+
ARG PLAYWRIGHT_VERSION=latest
|
|
4
|
+
FROM mcr.microsoft.com/playwright:${PLAYWRIGHT_VERSION}
|
|
3
5
|
|
|
4
6
|
# Set working directory
|
|
5
7
|
WORKDIR /app
|
|
@@ -14,6 +16,9 @@ COPY ./postinstall.js /app
|
|
|
14
16
|
COPY ./webpack.config.js /app
|
|
15
17
|
COPY ./tsconfig.json /app
|
|
16
18
|
|
|
19
|
+
# Copy scripts directory for version-agnostic setup
|
|
20
|
+
COPY ./scripts /app/scripts
|
|
21
|
+
|
|
17
22
|
# Copy required files from ui-tests
|
|
18
23
|
COPY ./ui-tests/package.json /app/ui-tests/
|
|
19
24
|
COPY ./ui-tests/playwright.config.ts /app/ui-tests/
|
|
@@ -28,7 +33,19 @@ COPY ./ui-tests/__snapshots__ /app/ui-tests/__snapshots__
|
|
|
28
33
|
# Install dependencies and build MynahUI
|
|
29
34
|
RUN npm install
|
|
30
35
|
RUN npm run build
|
|
31
|
-
|
|
36
|
+
|
|
37
|
+
# Setup Playwright with version-agnostic approach
|
|
38
|
+
RUN cd ./ui-tests && node ../scripts/setup-playwright.js && npm run prepare
|
|
39
|
+
|
|
40
|
+
# Ensure all browsers are installed with dependencies
|
|
41
|
+
RUN cd ./ui-tests && npx playwright install --with-deps
|
|
42
|
+
|
|
43
|
+
# Run health check to verify installation
|
|
44
|
+
RUN cd ./ui-tests && node ../scripts/docker-health-check.js
|
|
45
|
+
|
|
46
|
+
# Set environment variables for WebKit
|
|
47
|
+
ENV WEBKIT_FORCE_COMPLEX_TEXT=0
|
|
48
|
+
ENV WEBKIT_DISABLE_COMPOSITING_MODE=1
|
|
32
49
|
|
|
33
50
|
# Default command to run the tests
|
|
34
|
-
CMD ["sh", "-c", "cd ./ui-tests && npm run e2e${BROWSER:+:$BROWSER}"]
|
|
51
|
+
CMD ["sh", "-c", "cd ./ui-tests && npm run e2e${BROWSER:+:$BROWSER}"]
|