@spscommerce/e2e-core 2.10.1 → 2.10.5
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/.dockerignore +0 -1
- package/.husky/pre-commit +1 -1
- package/Dockerfile +3 -2
- package/README.md +16 -8
- package/package.json +5 -2
- package/pnpm-workspace.yaml +31 -1
package/.dockerignore
CHANGED
package/.husky/pre-commit
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
pnpm exec lint-staged --allow-empty
|
package/Dockerfile
CHANGED
|
@@ -2,8 +2,9 @@ FROM mcr.microsoft.com/playwright:v1.59.1-noble
|
|
|
2
2
|
|
|
3
3
|
ENV PNPM_HOME="/pnpm"
|
|
4
4
|
ENV PATH="$PNPM_HOME:$PATH"
|
|
5
|
-
RUN corepack enable
|
|
6
5
|
|
|
7
6
|
WORKDIR /e2e
|
|
7
|
+
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
|
|
8
|
+
RUN corepack enable
|
|
9
|
+
RUN pnpm install --frozen-lockfile
|
|
8
10
|
COPY . .
|
|
9
|
-
RUN pnpm i
|
package/README.md
CHANGED
|
@@ -106,29 +106,37 @@ After tests finishes, you can observe test results in the results-e2e/ folder:
|
|
|
106
106
|
|
|
107
107
|
### Tracer
|
|
108
108
|
You can observe the PW trace file in 3 ways:
|
|
109
|
-
- open a trace file via the terminal CLI:
|
|
109
|
+
- open a trace file via the terminal CLI: pnpm exec playwright show-trace [trace_file_path].zip
|
|
110
110
|
- use PW Trace Viewer web app: https://trace.playwright.dev/
|
|
111
111
|
- install "Playwright Trace Viewer for VSCode" extension: https://marketplace.visualstudio.com/items?itemName=ryanrosello-og.playwright-vscode-trace-viewer
|
|
112
112
|
|
|
113
113
|
## Dockerfile
|
|
114
114
|
PW provides an official Docker image. These image includes all the dependencies needed to run browsers in a Docker container, and also include the browsers themselves. Here is an example of the Dockerfile:
|
|
115
115
|
```
|
|
116
|
-
FROM mcr.microsoft.com/playwright:v1.
|
|
116
|
+
FROM mcr.microsoft.com/playwright:v1.59.1-noble
|
|
117
117
|
|
|
118
118
|
ARG BROWSER
|
|
119
119
|
|
|
120
120
|
RUN mkdir e2e
|
|
121
121
|
WORKDIR /e2e
|
|
122
|
+
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
|
|
123
|
+
RUN corepack enable
|
|
124
|
+
RUN pnpm install --frozen-lockfile
|
|
122
125
|
COPY . .
|
|
123
|
-
RUN
|
|
124
|
-
RUN pnpm
|
|
125
|
-
RUN if [ "$BROWSER" = "edge" ]; then npx playwright install msedge; fi
|
|
126
|
-
RUN if [ "$BROWSER" = "chrome" ]; then npx playwright install chrome; fi
|
|
126
|
+
RUN if [ "$BROWSER" = "edge" ]; then pnpm exec playwright install msedge; fi
|
|
127
|
+
RUN if [ "$BROWSER" = "chrome" ]; then pnpm exec playwright install chrome; fi
|
|
127
128
|
```
|
|
128
129
|
> Attention:
|
|
129
130
|
> Installed Playwright package version must match the Docker image version.
|
|
130
131
|
> You can find exact version here: https://mcr.microsoft.com/en-us/product/playwright/tags
|
|
131
132
|
|
|
133
|
+
## Local development
|
|
134
|
+
The pnpm version is pinned in the `packageManager` field of `package.json` and provided by Corepack (bundled with Node.js 24):
|
|
135
|
+
```
|
|
136
|
+
corepack enable
|
|
137
|
+
pnpm install
|
|
138
|
+
```
|
|
139
|
+
|
|
132
140
|
## Publish package
|
|
133
141
|
If you want to publish your package to the npm registry and have changed any files from `src` folder, you must build the package first. Run the following command: `pnpm build`.
|
|
134
142
|
After that, push changed files from the `lib` and `src` folders to your PR. You need to follow the [pattern](https://gist.github.com/joshbuchea/6f47e86d2510bce28f8e7f42ae84c716) of the semantic commit messages (should begin from __fix:__ or __feat:__), like:
|
|
@@ -168,8 +176,8 @@ jobs:
|
|
|
168
176
|
SUITE=$(suite)
|
|
169
177
|
CI=true
|
|
170
178
|
dockerCmd: |
|
|
171
|
-
|
|
172
|
-
xvfb-run --auto-servernum
|
|
179
|
+
pnpm exec playwright install
|
|
180
|
+
xvfb-run --auto-servernum pnpm run test:ci $(suite)
|
|
173
181
|
mountCustomVolume: true
|
|
174
182
|
externalMountLocation: '$(Build.ArtifactStagingDirectory)/results'
|
|
175
183
|
internalMountLocation: '/e2e/results-e2e'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spscommerce/e2e-core",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.5",
|
|
4
4
|
"description": "An automation test framework which is based on Playwright.",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -43,10 +43,13 @@
|
|
|
43
43
|
"playwright-testrail-reporter": "1.3.3",
|
|
44
44
|
"typescript": "5.9.3"
|
|
45
45
|
},
|
|
46
|
-
"packageManager": "pnpm@
|
|
46
|
+
"packageManager": "pnpm@11.28.8+sha512.f6988a32046b9a3f78d7d7ee0747926bbe905ff9dff73bf19abb87bd7d1906a2ac90d93f73be32b5f9e14c2899569bcb0c9c5ec8a19e083f5d71bbab6dd9e0b8",
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@commitlint/cli": "20.5.0",
|
|
49
49
|
"@commitlint/config-conventional": "20.5.0",
|
|
50
|
+
"@eslint/eslintrc": "^3.3.5",
|
|
51
|
+
"@eslint/js": "^9.39.4",
|
|
52
|
+
"globals": "^14.0.0",
|
|
50
53
|
"husky": "9.1.7",
|
|
51
54
|
"lint-staged": "16.4.0"
|
|
52
55
|
},
|
package/pnpm-workspace.yaml
CHANGED
|
@@ -1 +1,31 @@
|
|
|
1
|
-
|
|
1
|
+
# pnpm-workspace.yaml
|
|
2
|
+
|
|
3
|
+
# Require a minimum release age of 3 days (4320 minutes)
|
|
4
|
+
minimumReleaseAge: 4320
|
|
5
|
+
|
|
6
|
+
# Exclude internal packages from the minimum release age requirement
|
|
7
|
+
minimumReleaseAgeExclude:
|
|
8
|
+
- '@spscommerce/*'
|
|
9
|
+
- '@sps-woodland/*'
|
|
10
|
+
|
|
11
|
+
# Fail resolution if a package is missing a release time
|
|
12
|
+
minimumReleaseAgeIgnoreMissingTime: false
|
|
13
|
+
|
|
14
|
+
# Fail resolution if an earlier-published version has stronger trust evidence
|
|
15
|
+
trustPolicy: no-downgrade
|
|
16
|
+
|
|
17
|
+
# Include tarball URLs in the lockfile to ensure reproducible builds and provide source transparency
|
|
18
|
+
lockfileIncludeTarballUrl: true
|
|
19
|
+
|
|
20
|
+
# Warn the user if the project uses a different version of pnpm instead of downloading the correct version automatically
|
|
21
|
+
pmOnFail: warn
|
|
22
|
+
|
|
23
|
+
# Warn the user if a different version of Node.js is used instead of downloading the correct version automatically
|
|
24
|
+
runtimeOnFail: warn
|
|
25
|
+
|
|
26
|
+
engineStrict: true
|
|
27
|
+
|
|
28
|
+
overrides:
|
|
29
|
+
"axios": "1.15.1"
|
|
30
|
+
"flatted": "3.4.2"
|
|
31
|
+
"picomatch": "4.0.4"
|