Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
405595e
Convert attribute tests
janechu Feb 6, 2026
dfe3a34
Convert element controller test to Playwright
janechu Feb 6, 2026
dad1426
Convert fast-definitions tests to playwright
janechu Feb 6, 2026
984d8d9
Convert the fast-element tests to Playwright
janechu Feb 6, 2026
c9463e1
Convert hydration tests to Playwright
janechu Feb 6, 2026
612084d
Convert di.containerconfiguration to Playwright
janechu Feb 6, 2026
98bcdcb
Convert di.exception tests to Playwright
janechu Feb 6, 2026
b6feffa
Convert DI get tests to Playwright
janechu Feb 10, 2026
2448a1b
Convert DI getAll tests to Playwright
janechu Feb 10, 2026
e812416
Convert the DI integration tests to Playwright
janechu Feb 10, 2026
29b72e2
Remove page.evaluate wrapper
janechu Feb 10, 2026
efeee46
Convert DI tests to Playwright
janechu Feb 11, 2026
45d25c4
Convert the Arrays tests to Playwright
janechu Feb 11, 2026
ecd5e3c
Convert the notifier tests to Playwright
janechu Feb 11, 2026
ac7a815
Convert observable tests to Playwright
janechu Feb 11, 2026
4e46962
Convert update queue tests to Playwright
janechu Feb 11, 2026
a2c97e3
Convert reactive tests to Playwright
janechu Feb 11, 2026
5b7800b
Convert state tests to Playwright
janechu Feb 11, 2026
04160eb
Convert watch tests to Playwright
janechu Feb 11, 2026
71aeebc
Convert the css binding directive tests to Playwright
janechu Feb 11, 2026
fc0ce8f
Convert styles tests to Playwright
janechu Feb 11, 2026
d8e2c0c
Convert binding tests to Playwright
janechu Feb 12, 2026
494dbca
Convert children tests to Playwright
janechu Feb 12, 2026
c766a26
Convert compiler tests to Playwright
janechu Feb 12, 2026
aa533d3
Convert ref tests to Playwright
janechu Feb 12, 2026
b107d84
Convert when directive tests to Playwright
janechu Feb 12, 2026
55831ea
Convert the render tests to Playwright
janechu Feb 13, 2026
89bd28c
Convert repeat tests to Playwright
janechu Feb 13, 2026
95d3f65
Convert slotted tests to Playwright
janechu Feb 13, 2026
24643ee
Convert template tests to Playwright
janechu Feb 13, 2026
f274670
Some whitespace test fixes
janechu Feb 13, 2026
6c3f8f6
Convert view tests to Playwright
janechu Feb 13, 2026
2c577df
Convert metadata tests to Playwright
janechu Feb 13, 2026
070f805
Fix the models test file
janechu Feb 13, 2026
193516a
Update prettier ignore and remove fixture spec test
janechu Feb 13, 2026
408cca0
Remove the Karma tests from running as it errors since there are now 0
janechu Feb 13, 2026
68882c9
Change files
janechu Feb 13, 2026
94bcd4a
Add firefox and webkit to playwright config
janechu Feb 27, 2026
04e7d96
Remove fixme, in future we will have better non-decorator syntax and …
janechu Feb 27, 2026
a990366
Add missing tests
janechu Mar 2, 2026
36e3fcb
Merge branch 'main' into users/janechu/convert-tests-to-playwright
janechu Mar 3, 2026
2e94521
Merge branch 'main' into users/janechu/convert-tests-to-playwright
janechu Mar 4, 2026
b76ba89
Merge branch 'main' into users/janechu/convert-tests-to-playwright
janechu Mar 4, 2026
c10ac56
Initial plan
Copilot Mar 4, 2026
a4f0e62
Enable Prettier and ESLint for spec files and fix all linting errors
Copilot Mar 4, 2026
0f69725
Resolve base branch conflict: restore recognizer.spec.ts and add reco…
Copilot Mar 4, 2026
67f14b7
Fix html template formatting to prevent test failures; add change fil…
Copilot Mar 6, 2026
33f610c
fix templating tests
radium-v Mar 6, 2026
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
4 changes: 0 additions & 4 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# Never lint test files
*.spec.ts
!*.pw.spec.ts

# Never lint node_modules
node_modules

Expand Down
3 changes: 0 additions & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
*.spec.ts
!*.pw.spec.ts
*.spec.tsx
**/__tests__
**/__test__
**/.tmp
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Update Karma tests to Playwright",
"packageName": "@microsoft/fast-element",
"email": "7559015+janechu@users.noreply.github.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Enable Prettier and ESLint for spec files",
"packageName": "@microsoft/fast-html",
"email": "198982749+Copilot@users.noreply.github.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Enable Prettier and ESLint for spec files",
"packageName": "@microsoft/fast-router",
"email": "198982749+Copilot@users.noreply.github.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Enable Prettier and ESLint for spec files",
"packageName": "@microsoft/fast-ssr",
"email": "198982749+Copilot@users.noreply.github.com",
"dependentChangeType": "none"
}
4 changes: 1 addition & 3 deletions packages/fast-element/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@ node_modules
# don't lint build output (make sure it's set to your correct build folder name)
dist
# don't lint coverage output
coverage
# don't lint tests
*.spec.*
coverage
1 change: 0 additions & 1 deletion packages/fast-element/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
coverage/*
dist/*
*.spec.ts
2 changes: 1 addition & 1 deletion packages/fast-element/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
"eslint:fix": "eslint . --ext .ts --fix",
"test:playwright": "playwright test",
"test-server": "npx vite test/ --clearScreen false",
"test": "npm run eslint && npm run test-chrome:verbose && npm run doc:ci && npm run doc:exports:ci && npm run test:playwright",
"test": "npm run eslint && npm run doc:ci && npm run doc:exports:ci && npm run test:playwright",
"test-node": "nyc --reporter=lcov --reporter=text-summary --report-dir=coverage/node --temp-dir=coverage/.nyc_output mocha --reporter min --exit dist/esm/__test__/setup-node.js './dist/esm/**/*.spec.js'",
"test-node:verbose": "nyc --reporter=lcov --reporter=text-summary --report-dir=coverage/node --temp-dir=coverage/.nyc_output mocha --reporter spec --exit dist/esm/__test__/setup-node.js './dist/esm/**/*.spec.js'",
"test-chrome": "karma start karma.conf.cjs --browsers=ChromeHeadlessOpt --single-run --coverage",
Expand Down
8 changes: 8 additions & 0 deletions packages/fast-element/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ export default defineConfig({
name: "chromium",
use: { ...devices["Desktop Chrome"] },
},
{
name: "firefox",
use: { ...devices["Desktop Firefox"] },
},
{
name: "webkit",
use: { ...devices["Desktop Safari"] },
},
],
webServer: {
command: "npm run test-server",
Expand Down
49 changes: 49 additions & 0 deletions packages/fast-element/src/components/attributes.pw.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import { expect, test } from "@playwright/test";

test.describe("Attributes", () => {
test("should be properly aggregated across an inheritance hierarchy.", async ({
page,
}) => {
await page.goto("/");

const { componentAAttributesLength, componentBAttributesLength } =
await page.evaluate(async () => {
// @ts-expect-error: Client module.
const { AttributeConfiguration, AttributeDefinition, FASTElement } =
await import("/main.js");

abstract class BaseElement extends FASTElement {
attributeOne = "";
}
// Manually add attribute configuration like @attr decorator does
AttributeConfiguration.locate(BaseElement).push({
property: "attributeOne",
} as any);

class ComponentA extends BaseElement {
attributeTwo = "two-A";
}
// Manually add attribute configuration like @attr decorator does
AttributeConfiguration.locate(ComponentA).push({
property: "attributeTwo",
} as any);

class ComponentB extends BaseElement {
private get attributeTwo(): string {
return "two-B";
}
}

const componentAAttributes = AttributeDefinition.collect(ComponentA);
const componentBAttributes = AttributeDefinition.collect(ComponentB);

return {
componentAAttributesLength: componentAAttributes.length,
componentBAttributesLength: componentBAttributes.length,
};
});

expect(componentAAttributesLength).toBe(2);
expect(componentBAttributesLength).toBe(1);
});
});
32 changes: 0 additions & 32 deletions packages/fast-element/src/components/attributes.spec.ts

This file was deleted.

Loading
Loading