Skip to content
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

[docs-infra] Disable flaky demos for visual regression test #44961

Closed
wants to merge 2 commits into from
Closed
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
1 change: 1 addition & 0 deletions apps/pigment-css-vite-app/src/pages/fixtures/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ async function main() {
path: screenshotPath,
type: 'png',
animations: 'disabled',
mask: [page.locator('css=[data-playwright-masked]')],
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ export default function Progress() {
</section>
<section>
<h2> Linear Determinate</h2>
<div className="demo-container">
<div className="demo-container" data-playwright-masked>
{/* masked when taking screenshot with playwright because this demo is a flaky one */}
<LinearDeterminate />
</div>
</section>
Expand Down
19 changes: 4 additions & 15 deletions apps/pigment-css-vite-app/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,12 @@ import reactPlugin from '@vitejs/plugin-react';
import Pages from 'vite-plugin-pages';
import { nodePolyfills } from 'vite-plugin-node-polyfills';
import { pigment } from '@pigment-css/vite-plugin';
import { extendTheme } from '@mui/material/styles';
import { createTheme } from '@mui/material/styles';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extendTheme is deprecated.


const theme = extendTheme({
getSelector: function getSelector(colorScheme, css) {
if (colorScheme) {
return {
[`@media (prefers-color-scheme: ${colorScheme})`]: {
':root': css,
},
};
}
return ':root';
},
const theme = createTheme({
cssVariables: true,
colorSchemes: { light: true, dark: true },
});
theme.getColorSchemeSelector = (colorScheme) => {
return `@media (prefers-color-scheme: ${colorScheme})`;
};

export default defineConfig({
plugins: [
Expand Down
1 change: 1 addition & 0 deletions test/regressions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ const blacklist = [
'docs-getting-started-templates', // No public components
'docs-getting-started-usage/Usage.png', // No public components
'docs-getting-started-supported-components/MaterialUIComponents.png', // No public components
'docs-getting-started-templates-dashboard-components/MainGrid.png', // No public components
'docs-landing', // Mostly images, redundant
'docs-production-error', // No components, page for DX
'docs-styles-advanced', // Redundant
Expand Down
Loading