mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
parent
b0418253c1
commit
340bcf1d1b
1
.github/workflows/build_frontend_prs.yml
vendored
1
.github/workflows/build_frontend_prs.yml
vendored
@ -23,4 +23,5 @@ jobs:
|
|||||||
- run: yarn --frozen-lockfile
|
- run: yarn --frozen-lockfile
|
||||||
- run: yarn run test
|
- run: yarn run test
|
||||||
- run: yarn run fmt:check
|
- run: yarn run fmt:check
|
||||||
|
- run: yarn run lint:check
|
||||||
- run: yarn run ts:check # TODO: optimize
|
- run: yarn run ts:check # TODO: optimize
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
"lint": "yarn fmt:check",
|
|
||||||
"start": "vite",
|
"start": "vite",
|
||||||
"start:prod": "vite build && vite preview",
|
"start:prod": "vite build && vite preview",
|
||||||
"start:sandbox": "UNLEASH_API=https://sandbox.getunleash.io/ospro yarn run start",
|
"start:sandbox": "UNLEASH_API=https://sandbox.getunleash.io/ospro yarn run start",
|
||||||
@ -20,6 +19,8 @@
|
|||||||
"test": "tsc && vitest run",
|
"test": "tsc && vitest run",
|
||||||
"test:snapshot": "yarn test -u",
|
"test:snapshot": "yarn test -u",
|
||||||
"test:watch": "vitest watch",
|
"test:watch": "vitest watch",
|
||||||
|
"lint": "eslint --fix ./src",
|
||||||
|
"lint:check": "eslint ./src",
|
||||||
"fmt": "prettier src --write --loglevel warn",
|
"fmt": "prettier src --write --loglevel warn",
|
||||||
"fmt:check": "prettier src --check",
|
"fmt:check": "prettier src --check",
|
||||||
"ts:check": "tsc",
|
"ts:check": "tsc",
|
||||||
|
@ -188,7 +188,8 @@ const deleteButtonsActiveInChangeRequestEnv = async () => {
|
|||||||
// production
|
// production
|
||||||
const productionStrategyDeleteButton = deleteButtons[0];
|
const productionStrategyDeleteButton = deleteButtons[0];
|
||||||
expect(productionStrategyDeleteButton).not.toBeDisabled();
|
expect(productionStrategyDeleteButton).not.toBeDisabled();
|
||||||
|
});
|
||||||
|
await waitFor(() => {
|
||||||
// custom env
|
// custom env
|
||||||
const customEnvStrategyDeleteButton = deleteButtons[1];
|
const customEnvStrategyDeleteButton = deleteButtons[1];
|
||||||
expect(customEnvStrategyDeleteButton).toBeDisabled();
|
expect(customEnvStrategyDeleteButton).toBeDisabled();
|
||||||
|
@ -161,11 +161,11 @@ const BannerButton = ({
|
|||||||
openDialog,
|
openDialog,
|
||||||
children,
|
children,
|
||||||
}: IBannerButtonProps) => {
|
}: IBannerButtonProps) => {
|
||||||
if (!link) return null;
|
|
||||||
|
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const tracker = usePlausibleTracker();
|
const tracker = usePlausibleTracker();
|
||||||
|
|
||||||
|
if (!link) return null;
|
||||||
|
|
||||||
const dialog = link === 'dialog';
|
const dialog = link === 'dialog';
|
||||||
const internal = !link.startsWith('http');
|
const internal = !link.startsWith('http');
|
||||||
|
|
||||||
|
@ -7,5 +7,7 @@ yarn run lint
|
|||||||
yarn run test
|
yarn run test
|
||||||
|
|
||||||
cd frontend
|
cd frontend
|
||||||
yarn run lint
|
yarn run ts:check
|
||||||
|
yarn run lint:check
|
||||||
|
yarn run fmt:check
|
||||||
yarn run test
|
yarn run test
|
||||||
|
Loading…
Reference in New Issue
Block a user