mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
Run `npm run format` and `npm run lint`. Fix stylelint configuration to correctly parse variables with units in their names. Migrate raw CSS measurements to tokens in `css/tokens.css` and update usages in `css/tailwind.source.css` and HTML templates. Improve `scripts/check-design-tokens.mjs` to handle variable names with unit-like suffixes. Files changed: - css/tailwind.source.css (formatted and fixed lint) - css/tokens.css (added tokens) - stylelint.config.cjs (fixed regex) - scripts/check-design-tokens.mjs (improved detection logic) - components/profile-modal.html (fixed arbitrary values) - index.html (fixed arbitrary values)
31 lines
1.1 KiB
JavaScript
31 lines
1.1 KiB
JavaScript
|
|
const { chromium } = require('playwright');
|
|
const fs = require('fs');
|
|
|
|
(async () => {
|
|
const browser = await chromium.launch();
|
|
const page = await browser.newPage();
|
|
|
|
// Navigate to the index page locally
|
|
await page.goto('file://' + process.cwd() + '/index.html');
|
|
|
|
// Set viewport to simulate mobile for some checks
|
|
await page.setViewportSize({ width: 375, height: 667 });
|
|
|
|
// Wait for Tailwind classes to be effective (loaded from CSS)
|
|
// We can't easily wait for CSS file load in file protocol without network idle,
|
|
// but file protocol is fast.
|
|
await page.waitForTimeout(1000);
|
|
|
|
// Take screenshot of mobile view (to verify search bar width fix)
|
|
await page.screenshot({ path: 'verification/mobile-view.png' });
|
|
|
|
// Navigate to profile modal by finding a trigger (this is harder without a full app running)
|
|
// But we can check if the profile modal component file has the right classes by reading it?
|
|
// No, visual verification of static HTML file is better.
|
|
|
|
// Let's just screenshot index.html in mobile view which had the w-[calc...] fix.
|
|
|
|
await browser.close();
|
|
})();
|