-
Notifications
You must be signed in to change notification settings - Fork 3.4k
[Needs reviews!] Mega test refactor #4378
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
Open
matthew-dean
wants to merge
13
commits into
less:master
Choose a base branch
from
matthew-dean:fix/valid-test-data
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
f150c18
Migrate Less to use valid CSS
matthew-dean c98f810
Merge branch 'master' into fix/valid-test-data
matthew-dean d23bf15
Re-organize test structure
matthew-dean c440ad0
Lots of test refactoring
matthew-dean f9398cd
More test updates
matthew-dean 1e7c0a4
Add restructured tests
matthew-dean 2cd0bd5
WIP
matthew-dean 82f6cc6
More fixes to tests
matthew-dean bab1940
More test fixes
matthew-dean 902a3c6
All tests passing
matthew-dean 093e4b7
WIP fix tests
matthew-dean 904278f
Merge branch 'master' into fix/valid-test-data
matthew-dean 1637d18
Finished fixing browser tests
matthew-dean File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| #!/usr/bin/env node | ||
|
|
||
| /** | ||
| * Post-install script for Less.js package | ||
| * | ||
| * This script installs Playwright browsers only when: | ||
| * 1. This is a development environment (not when installed as a dependency) | ||
| * 2. We're in a monorepo context (parent package.json exists) | ||
| * 3. Not running in CI or other automated environments | ||
| */ | ||
|
|
||
| const fs = require('fs'); | ||
| const path = require('path'); | ||
| const { execSync } = require('child_process'); | ||
|
|
||
| // Check if we're in a development environment | ||
| function isDevelopmentEnvironment() { | ||
| // Skip if this is a global install or user config | ||
| if (process.env.npm_config_user_config || process.env.npm_config_global) { | ||
| return false; | ||
| } | ||
|
|
||
| // Skip in CI environments | ||
| if (process.env.CI || process.env.GITHUB_ACTIONS || process.env.TRAVIS) { | ||
| return false; | ||
| } | ||
|
|
||
| // Check if we're in a monorepo (parent package.json exists) | ||
| const parentPackageJson = path.join(__dirname, '../../../package.json'); | ||
| if (!fs.existsSync(parentPackageJson)) { | ||
| return false; | ||
| } | ||
|
|
||
| // Check if this is the root of the monorepo | ||
| const currentPackageJson = path.join(__dirname, '../package.json'); | ||
| if (!fs.existsSync(currentPackageJson)) { | ||
| return false; | ||
| } | ||
|
|
||
| return true; | ||
| } | ||
|
|
||
| // Install Playwright browsers | ||
| function installPlaywrightBrowsers() { | ||
| try { | ||
| console.log('🎭 Installing Playwright browsers for development...'); | ||
| execSync('pnpm exec playwright install', { | ||
| stdio: 'inherit', | ||
| cwd: path.join(__dirname, '..') | ||
| }); | ||
| console.log('✅ Playwright browsers installed successfully'); | ||
| } catch (error) { | ||
| console.warn('⚠️ Failed to install Playwright browsers:', error.message); | ||
| console.warn(' You can install them manually with: pnpm exec playwright install'); | ||
| } | ||
| } | ||
|
|
||
| // Main execution | ||
| if (isDevelopmentEnvironment()) { | ||
| installPlaywrightBrowsers(); | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| .test { color: red; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is handy, thanks!