-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(web-components): Use Playwright fixture for tests (#33023)
- Loading branch information
Showing
58 changed files
with
4,266 additions
and
5,340 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
change/@fluentui-web-components-ec172ca8-23f3-4d01-a969-6504fa67a87a.json
This file contains 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,7 @@ | ||
{ | ||
"type": "prerelease", | ||
"comment": "Allow field states to be set regardless of connection status", | ||
"packageName": "@fluentui/web-components", | ||
"email": "[email protected]", | ||
"dependentChangeType": "patch" | ||
} |
This file contains 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 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 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 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 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 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 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 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,38 @@ | ||
/* eslint-env node */ | ||
import { execSync, spawn } from 'node:child_process'; | ||
|
||
const uiMode = process.argv.includes('--ui'); | ||
|
||
try { | ||
// UI Mode runs Vite in development mode and Playwright in UI mode, in parallel | ||
if (uiMode) { | ||
const vite = spawn('vite', ['serve', 'test/harness'], { stdio: 'inherit' }); | ||
const playwright = spawn('playwright', ['test', '--ui'], { stdio: 'inherit' }); | ||
|
||
// Forward the exit codes if the child processes exit | ||
vite.on('exit', code => process.exit(code)); | ||
playwright.on('exit', code => process.exit(code)); | ||
|
||
// Close the processes when the parent process exits | ||
process.on('exit', () => { | ||
vite.kill(); | ||
playwright.kill(); | ||
process.exit(0); | ||
}); | ||
|
||
// Run both processes in parallel | ||
Promise.all([vite, playwright]); | ||
} | ||
|
||
// E2E Mode first builds the test harness with Vite and then runs the tests with Playwright | ||
if (!uiMode) { | ||
// Build the test harness | ||
execSync(`vite build test/harness`, { stdio: 'inherit' }); | ||
|
||
// Run the tests | ||
execSync(`playwright test`, { stdio: 'inherit' }); | ||
} | ||
} catch (err) { | ||
console.error(err); | ||
process.exit(1); | ||
} |
Oops, something went wrong.