Skip to content

Commit

Permalink
last issue
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Nov 21, 2024
1 parent 9a92d9c commit 4165747
Show file tree
Hide file tree
Showing 19 changed files with 17 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ export default function SignInCard() {
<FormControl>
<Box sx={{ display: 'flex', justifyContent: 'space-between' }}>
<FormLabel htmlFor="password">Password</FormLabel>
{/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
<Link
component="button"
type="button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ export default function SignInCard() {
<FormControl>
<Box sx={{ display: 'flex', justifyContent: 'space-between' }}>
<FormLabel htmlFor="password">Password</FormLabel>
{/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
<Link
component="button"
type="button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ export default function SignIn(props) {
>
Sign in
</Button>
{/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
<Link
component="button"
type="button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ export default function SignIn(props: { disableCustomTheme?: boolean }) {
>
Sign in
</Button>
{/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
<Link
component="button"
type="button"
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.
29 changes: 17 additions & 12 deletions docs/scripts/generateTemplateScreenshots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ import { chromium } from 'playwright';
* - Set `chromium.launch({ headless: false })` in line:50 to see the browser
*/

function sleep(duration: number): Promise<void> {
return new Promise<void>((resolve) => {
setTimeout(() => {
resolve();
}, duration);
});
}

const host = process.env.DEPLOY_PREVIEW || 'http://localhost:3000';

/**
Expand Down Expand Up @@ -78,10 +86,9 @@ const names = new Set(process.argv.slice(2));
await page.click('[data-screenshot="toggle-mode"]');
await page.getByRole('menuitem').filter({ hasText: /dark/i }).click();
await page.waitForLoadState('networkidle'); // changing to dark mode might trigger image loading
await page.screenshot({
path: outputPath,
animations: 'disabled',
});
await sleep(100); // give time for image decoding, resizing, rendering

await page.screenshot({ path: outputPath, animations: 'disabled' });

await page.click('[data-screenshot="toggle-mode"]');
await page
Expand All @@ -92,10 +99,9 @@ const names = new Set(process.argv.slice(2));
await page.click('[data-screenshot="toggle-mode"]');
await page.getByRole('option').filter({ hasText: /dark/i }).click();
await page.waitForLoadState('networkidle'); // changing to dark mode might trigger image loading
await page.screenshot({
path: outputPath,
animations: 'disabled',
});
await sleep(100); // give time for image decoding, resizing, rendering

await page.screenshot({ path: outputPath, animations: 'disabled' });

await page.click('[data-screenshot="toggle-mode"]');
await page
Expand All @@ -105,10 +111,9 @@ const names = new Set(process.argv.slice(2));
} else {
await page.click('[data-screenshot="toggle-mode"]');
await page.waitForLoadState('networkidle'); // changing to dark mode might trigger image loading
await page.screenshot({
path: outputPath,
animations: 'disabled',
});
await sleep(100); // give time for image decoding, resizing, rendering

await page.screenshot({ path: outputPath, animations: 'disabled' });

await page.click('[data-screenshot="toggle-mode"]'); // switch back to light
}
Expand Down

0 comments on commit 4165747

Please sign in to comment.