mirror of
https://github.com/BillyOutlast/posthog.git
synced 2026-02-04 03:01:23 +01:00
chore: Remove more Cypress (#37467)
This commit is contained in:
7
.github/workflows/ci-e2e-playwright.yml
vendored
7
.github/workflows/ci-e2e-playwright.yml
vendored
@@ -31,7 +31,6 @@ env:
|
||||
CLICKHOUSE_SECURE: 'False'
|
||||
CLICKHOUSE_VERIFY: 'False'
|
||||
CLICKHOUSE_DATABASE: posthog_test
|
||||
CYPRESS_BASE_URL: http://localhost:8000
|
||||
PGHOST: localhost
|
||||
PGUSER: posthog
|
||||
PGPASSWORD: posthog
|
||||
@@ -418,8 +417,8 @@ jobs:
|
||||
id: pnpm-cache
|
||||
with:
|
||||
path: ${{ steps.pnpm-cache-dir.outputs.PNPM_STORE_PATH }}
|
||||
key: ${{ runner.os }}-pnpm-cypress-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
restore-keys: ${{ runner.os }}-pnpm-cypress-
|
||||
key: ${{ runner.os }}-pnpm-playwright-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
restore-keys: ${{ runner.os }}-pnpm-playwright-
|
||||
|
||||
- name: Install package.json dependencies with pnpm
|
||||
if: needs.changes.outputs.shouldRun == 'true'
|
||||
@@ -490,8 +489,6 @@ jobs:
|
||||
|
||||
- name: Run Playwright tests
|
||||
if: needs.changes.outputs.shouldRun == 'true'
|
||||
env:
|
||||
START_PLAYWRIGHT: '1'
|
||||
run: pnpm --filter=@posthog/playwright exec playwright test
|
||||
|
||||
# ── Artifacts on failure / always ─────────────────────────────────────
|
||||
|
||||
12
.github/workflows/ci-frontend.yml
vendored
12
.github/workflows/ci-frontend.yml
vendored
@@ -89,8 +89,8 @@ jobs:
|
||||
id: pnpm-cache
|
||||
with:
|
||||
path: ${{ steps.pnpm-cache-dir.outputs.PNPM_STORE_PATH }}
|
||||
key: ${{ runner.os }}-pnpm-cypress-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
restore-keys: ${{ runner.os }}-pnpm-cypress-
|
||||
key: ${{ runner.os }}-pnpm-frontend-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
restore-keys: ${{ runner.os }}-pnpm-frontend-
|
||||
|
||||
- name: Install package.json dependencies with pnpm
|
||||
if: needs.changes.outputs.frontend == 'true'
|
||||
@@ -144,8 +144,8 @@ jobs:
|
||||
id: pnpm-cache
|
||||
with:
|
||||
path: ${{ steps.pnpm-cache-dir.outputs.PNPM_STORE_PATH }}
|
||||
key: ${{ runner.os }}-pnpm-cypress-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
restore-keys: ${{ runner.os }}-pnpm-cypress-
|
||||
key: ${{ runner.os }}-pnpm-frontend-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
restore-keys: ${{ runner.os }}-pnpm-frontend-
|
||||
|
||||
- name: Install package.json dependencies with pnpm
|
||||
if: needs.changes.outputs.frontend == 'true'
|
||||
@@ -207,8 +207,8 @@ jobs:
|
||||
id: pnpm-cache
|
||||
with:
|
||||
path: ${{ steps.pnpm-cache-dir.outputs.PNPM_STORE_PATH }}
|
||||
key: ${{ runner.os }}-pnpm-cypress-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
restore-keys: ${{ runner.os }}-pnpm-cypress-
|
||||
key: ${{ runner.os }}-pnpm-frontend-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
restore-keys: ${{ runner.os }}-pnpm-frontend-
|
||||
|
||||
- name: Install package.json dependencies with pnpm
|
||||
if: needs.changes.outputs.frontend == 'true'
|
||||
|
||||
5
.github/workflows/ci-storybook.yml
vendored
5
.github/workflows/ci-storybook.yml
vendored
@@ -218,7 +218,6 @@ jobs:
|
||||
shard_count: 3
|
||||
shard: 3
|
||||
env:
|
||||
CYPRESS_INSTALL_BINARY: '0'
|
||||
NODE_OPTIONS: --max-old-space-size=16384
|
||||
OPT_OUT_CAPTURE: 1
|
||||
outputs:
|
||||
@@ -373,8 +372,8 @@ jobs:
|
||||
id: pnpm-cache
|
||||
with:
|
||||
path: ${{ steps.pnpm-cache-dir.outputs.PNPM_STORE_PATH }}
|
||||
key: ${{ runner.os }}-pnpm-cypress-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
restore-keys: ${{ runner.os }}-pnpm-cypress-
|
||||
key: ${{ runner.os }}-pnpm-regression-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
restore-keys: ${{ runner.os }}-pnpm-regression-
|
||||
|
||||
- name: Install package.json dependencies with pnpm
|
||||
if: needs.changes.outputs.frontend == 'true'
|
||||
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -45,9 +45,6 @@ common/hogvm/typescript/dist
|
||||
common/plugin_transpiler/dist
|
||||
common/tailwind/dist
|
||||
coverage-*.xml
|
||||
cypress/**/*.diff.png
|
||||
cypress/downloads/
|
||||
cypress/screenshots/
|
||||
debug.log
|
||||
docker-compose.prod.yml
|
||||
ee/benchmarks/results
|
||||
|
||||
@@ -12,8 +12,6 @@ RUN npm install -g pnpm
|
||||
COPY package.json pnpm-lock.yaml ./
|
||||
COPY patches/ patches/
|
||||
|
||||
ENV CYPRESS_INSTALL_BINARY=0
|
||||
|
||||
RUN pnpm install --frozen-lockfile
|
||||
|
||||
COPY playwright.config.ts webpack.config.js babel.config.js tsconfig.json test-runner-jest.config.js test-runner-jest-environment.js ./
|
||||
|
||||
@@ -6,7 +6,6 @@ SKIP_RECREATE_DATABASE=false
|
||||
SKIP_SETUP_DEV=false
|
||||
|
||||
HELP_TEXT=$(cat << EOF
|
||||
use --skip-all-setup to only run Cypress
|
||||
use --skip-recreate-db to skip dropping and creating databases
|
||||
use --skip-migrate-db to skip running DB migrations
|
||||
use --skip-setup-dev to skip running django setup_dev command
|
||||
@@ -46,7 +45,6 @@ do
|
||||
fi
|
||||
done
|
||||
|
||||
export CYPRESS_BASE_URL=http://localhost:8080
|
||||
export SECURE_COOKIES=0
|
||||
export SKIP_SERVICE_VERSION_REQUIREMENTS=1
|
||||
export KAFKA_HOSTS=kafka:9092
|
||||
@@ -65,17 +63,9 @@ export PGPASSWORD="${PGPASSWORD:=posthog}"
|
||||
export PGPORT="${PGPORT:=5432}"
|
||||
export DATABASE_URL="postgres://${PGUSER}:${PGPASSWORD}@${PGHOST}:${PGPORT}/${DATABASE}"
|
||||
export CLOUD_DEPLOYMENT=E2E
|
||||
export START_CYPRESS="${START_CYPRESS:-0}"
|
||||
export START_PLAYWRIGHT="${START_PLAYWRIGHT:-0}"
|
||||
|
||||
echo "~~~~~~~~~~~~~ starting e2e test runner ~~~~~~~~~~~~~"
|
||||
|
||||
# Ensure one of the test runners is set before running any commands
|
||||
if [ "$START_CYPRESS" -ne 1 ] 2>/dev/null && [ "$START_PLAYWRIGHT" -ne 1 ] 2>/dev/null; then
|
||||
echo "Must set START_CYPRESS or START_PLAYWRIGHT to 1"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
source ./bin/celery-queues.env
|
||||
|
||||
trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* global require, module, process, __dirname */
|
||||
const path = require('path')
|
||||
const webpack = require('webpack')
|
||||
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
||||
const HtmlWebpackHarddiskPlugin = require('html-webpack-harddisk-plugin')
|
||||
|
||||
@@ -205,14 +205,7 @@ function createEntry(entry) {
|
||||
}),
|
||||
new HtmlWebpackHarddiskPlugin(),
|
||||
]
|
||||
: entry === 'cypress'
|
||||
? [
|
||||
new HtmlWebpackHarddiskPlugin(),
|
||||
new webpack.ProvidePlugin({
|
||||
process: 'process/browser',
|
||||
}),
|
||||
]
|
||||
: []
|
||||
: []
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
"lint": "pnpm lint:js && pnpm lint:css",
|
||||
"lint:js": "cd .. && oxlint --quiet",
|
||||
"lint:css": "stylelint \"../(frontend|products)/**/*.{css,scss}\" --ignore-path=frontend/.stylelintignore",
|
||||
"format": "cd .. && oxlint --fix --fix-suggestions --fix-dangerously --quiet && pnpm prettier -w \"./{cypress,products,frontend/src}/**/*.{js,mjs,ts,tsx,json,yaml,yml,css,scss}\"",
|
||||
"format": "cd .. && oxlint --fix --fix-suggestions --fix-dangerously --quiet && pnpm prettier -w \"./{products,frontend/src}/**/*.{js,mjs,ts,tsx,json,yaml,yml,css,scss}\"",
|
||||
"visualize-toolbar-bundle": "pnpm exec esbuild-visualizer --metadata ./toolbar-esbuild-meta.json --filename=toolbar-esbuild-bundle-visualization.html",
|
||||
"check-toolbar-csp-eval": "node ./bin/check-toolbar-csp-eval.mjs",
|
||||
"start-vite": "pnpm build:products && concurrently -n VITE,TYPEGEN,TAILWIND -c green,blue,yellow \"vite --host 0.0.0.0\" \"${SKIP_TYPEGEN:-pnpm run typegen:watch}\" \"pnpm watch:tailwind\""
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import './PropertyGroupFilters.scss'
|
||||
|
||||
import clsx from 'clsx'
|
||||
import { BindLogic, useActions, useValues } from 'kea'
|
||||
import React from 'react'
|
||||
|
||||
@@ -160,12 +159,7 @@ export function PropertyGroupFilters({
|
||||
icon={<IconPlusSmall />}
|
||||
sideIcon={null}
|
||||
disabledReason={disabledReason}
|
||||
// This class hides this button in some situations to improve layout
|
||||
// We don't want to hide it in Cypress tests because it'll complain the button isn't clickable
|
||||
// so let's simply avoid adding the class in that case
|
||||
className={clsx({
|
||||
'PropertyGroupFilters__add-filter-group-after': !window.Cypress,
|
||||
})}
|
||||
className="PropertyGroupFilters__add-filter-group-after"
|
||||
>
|
||||
Add filter group
|
||||
</LemonButton>
|
||||
|
||||
@@ -188,7 +188,6 @@ export const signupLogic = kea<signupLogicType>([
|
||||
const isRegionOverrideValid =
|
||||
isString(regionOverrideFlag) && regionsAllowList.includes(regionOverrideFlag)
|
||||
// KLUDGE: the backend can technically return null
|
||||
// but definitely does in Cypress tests
|
||||
// and, we don't want to redirect to the app unless the preflight region is valid
|
||||
const isPreflightRegionValid =
|
||||
values.preflight?.region && regionsAllowList.includes(values.preflight?.region)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
to run the new playwright tests, run the following command:
|
||||
|
||||
```bash
|
||||
START_PLAYWRIGHT=1 ./bin/e2e-test-runner
|
||||
./bin/e2e-test-runner
|
||||
```
|
||||
|
||||
to run the new playwright tests against an already locally running PostHog instance
|
||||
|
||||
759
pnpm-lock.yaml
generated
759
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,6 @@ packages:
|
||||
- common/plugin_transpiler
|
||||
- common/storybook
|
||||
- common/tailwind
|
||||
- cypress
|
||||
- ee/frontend
|
||||
- frontend
|
||||
- playwright
|
||||
|
||||
Reference in New Issue
Block a user