Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/pr-visual-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
name: Visual Tests
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.49.0-jammy
image: mcr.microsoft.com/playwright:v1.52.0-jammy
steps:
- name: Checkout
uses: actions/checkout@v6
Expand Down
14 changes: 7 additions & 7 deletions demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@
"@babel/preset-typescript": "7.28.5",
"@bem-react/classname": "^1.6.0",
"@gravity-ui/icons": "^2.12.0",
"@playwright/experimental-ct-react": "1.49.0",
"@playwright/test": "1.49.0",
"@storybook/addon-docs": "10.1.10",
"@playwright/experimental-ct-react": "1.52.0",
"@playwright/test": "1.52.0",
"@storybook/addon-docs": "10.2.19",
"@storybook/addon-webpack5-compiler-babel": "4.0.0",
"@storybook/cli": "10.1.10",
"@storybook/cli": "10.2.19",
"@storybook/preset-scss": "1.0.3",
"@storybook/react": "10.1.10",
"@storybook/react-webpack5": "10.1.10",
"@storybook/react": "10.2.19",
"@storybook/react-webpack5": "10.2.19",
"@types/markdown-it": "catalog:",
"@types/node": "catalog:",
"@types/react": "catalog:react",
Expand All @@ -64,7 +64,7 @@
"react": "catalog:react",
"react-dom": "catalog:react",
"react-use": "catalog:",
"storybook": "10.2.10",
"storybook": "10.2.19",
"stylelint": "catalog:linters",
"ts-dedent": "2.2.0",
"typescript": "catalog:ts",
Expand Down
20 changes: 16 additions & 4 deletions demo/scripts/playwright-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ cd "$REPO_ROOT"
echo "Running in $(pwd)"

IMAGE_NAME="mcr.microsoft.com/playwright"
IMAGE_TAG="v1.49.0-jammy" # This version have to be synchronized with playwright version from package.json
IMAGE_TAG="v1.52.0-jammy" # This version have to be synchronized with playwright version from package.json

PNPM_STORE_CACHE_DIR="$HOME/.cache/markdown-editor-playwright-docker-pnpm-store"
NODE_MODULES_CACHE_DIR="$HOME/.cache/markdown-editor-playwright-docker-node-modules"
Expand All @@ -21,8 +21,11 @@ command_exists() {

run_command() {
$CONTAINER_TOOL run --rm --network host -it -w /work \
--platform linux/arm64 \
--ipc=host \
-v $(pwd):/work \
-v "$NODE_MODULES_CACHE_DIR:/work/node_modules" \
-v "$PNPM_STORE_CACHE_DIR:/root/.local/share/pnpm/store" \
-e IS_DOCKER=1 \
-e NODE_OPTIONS="--max-old-space-size=8192" \
"$IMAGE_NAME:$IMAGE_TAG" \
Expand All @@ -40,6 +43,7 @@ fi

if [[ "$1" = "clear" ]]; then
rm -rf "$NODE_MODULES_CACHE_DIR"
rm -rf "$PNPM_STORE_CACHE_DIR"
rm -rf "./demo/tests/playwright/.cache-docker"
exit 0
fi
Expand All @@ -49,8 +53,10 @@ init_pnpm() {
run_command "COREPACK_INTEGRITY_KEYS=0 corepack pnpm config set store-dir $PNPM_STORE_CACHE_DIR"
}

if [[ ! -d "$NODE_MODULES_CACHE_DIR" ]]; then
mkdir -p "$NODE_MODULES_CACHE_DIR"
mkdir -p "$NODE_MODULES_CACHE_DIR"
mkdir -p "$PNPM_STORE_CACHE_DIR"

if [[ -z "$(ls -A "$NODE_MODULES_CACHE_DIR")" ]]; then
init_pnpm
run_command "COREPACK_INTEGRITY_KEYS=0 corepack pnpm i --frozen-lockfile"
else
Expand All @@ -59,8 +65,14 @@ fi

if [[ "$1" = "test" ]]; then
echo "Running playwright tests"
EXTRA_ARGS=""
if [[ $# -ge 2 ]]; then
for arg in "${@:2}"; do
EXTRA_ARGS="$EXTRA_ARGS $(printf '%q' "$arg")"
done
fi
run_command 'COREPACK_INTEGRITY_KEYS=0 corepack pnpm --filter '@gravity-ui/*' build'
run_command 'COREPACK_INTEGRITY_KEYS=0 corepack pnpm --filter '@markdown-editor/demo' run playwright'
run_command "cd demo && COREPACK_INTEGRITY_KEYS=0 corepack pnpm exec playwright test --config=tests/playwright/playwright.config.ts $EXTRA_ARGS"
exit 0
fi

Expand Down
2 changes: 1 addition & 1 deletion demo/tests/playwright/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const config: PlaywrightTestConfig = {
snapshotPathTemplate:
'{testDir}/__snapshots__/{testFileName}-snapshots/{arg}{-projectName}-linux{ext}',
/* Maximum time one test can run for. */
timeout: 10 * 1000,
timeout: 15 * 1000,
/* Run tests in files in parallel */
fullyParallel: true,
/* Fail the build on CI if you accidentally left test.only in the source code. */
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/how-to-add-visual-test.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ On the first run, install the required dependencies (Docker or alternatives, Pla
```shell
brew install podman
podman machine init
podman machine set --cpus 2 --memory 8192
podman machine set --cpus 4 --memory 12288
podman machine start
```

Expand Down
Loading
Loading