Skip to content

[code-infra] Add test case for core charts issue #17612

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 11 commits into
base: master
Choose a base branch
from
Draft
6 changes: 6 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,12 @@ jobs:
- run:
name: Run visual regression tests
command: xvfb-run pnpm test:regressions
- run:
name: Build packages for fixtures
command: pnpm release:build
- run:
name: Run tests to run after release:build
command: pnpm -r release:test
- run:
name: Upload screenshots to Argos CI
command: pnpm test:argos
Expand Down
18 changes: 18 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ packages:
- packages/*
- docs
- test
- test/e2e
- test/regressions
- test/performance-charts
- test/*

ignoredBuiltDependencies:
- '@mui/monorepo'
Expand Down
14 changes: 14 additions & 0 deletions test/typescript/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "@mui/x-test-typescript",
"private": true,
"dependencies": {
"@mui/x-charts": "workspace:*",
"@mui/x-data-grid": "workspace:*",
"@mui/x-date-pickers": "workspace:*",
"@mui/x-date-pickers-pro": "workspace:*",
"@mui/material": "7"
},
"scripts": {
"release:test": "tsc --noEmit"
}
}
17 changes: 17 additions & 0 deletions test/typescript/pieChart.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import * as React from 'react';
import { PieChart, PieChartProps } from '@mui/x-charts/PieChart';
import { createTheme, ThemeOptions } from '@mui/material/styles';

interface ChartsComponentsPropsList {
MuiPieChart: PieChartProps;
}

declare module '@mui/material/styles' {
interface ComponentsPropsList extends ChartsComponentsPropsList {}
}

createTheme({} as ThemeOptions);

export default function ChartUserByCountry() {
return <PieChart colors={[]} series={[]} />;
}
25 changes: 25 additions & 0 deletions test/typescript/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"compilerOptions": {
"baseUrl": "../..",
"lib": ["DOM", "ESNext"],
"target": "ESNext",
"paths": {
"@mui/x-charts/*": ["./packages/x-charts/build/esm/*"]
// "@mui/x-charts/*": ["./packages/x-charts/src/*"]
},
"strict": true,
"allowJs": true,
"isolatedModules": true,
"moduleResolution": "bundler",
"jsx": "react",
"module": "ESNext",
"noEmit": true,
"noUnusedLocals": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"esModuleInterop": true,
"types": ["@mui/material/themeCssVarsAugmentation", "node"]
},
"include": ["**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}