Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
98c5799
Convert attribute tests
janechu Feb 6, 2026
a7007d2
Convert element controller test to Playwright
janechu Feb 6, 2026
4c1a904
Convert fast-definitions tests to playwright
janechu Feb 6, 2026
6bb9397
Convert the fast-element tests to Playwright
janechu Feb 6, 2026
05d66df
Convert hydration tests to Playwright
janechu Feb 6, 2026
f764719
Convert di.containerconfiguration to Playwright
janechu Feb 6, 2026
270d40b
Convert di.exception tests to Playwright
janechu Feb 6, 2026
2394cbe
Convert DI get tests to Playwright
janechu Feb 10, 2026
4138cae
Convert DI getAll tests to Playwright
janechu Feb 10, 2026
2c3f82b
Convert the DI integration tests to Playwright
janechu Feb 10, 2026
1ee81e6
Remove page.evaluate wrapper
janechu Feb 10, 2026
4dfd217
Convert DI tests to Playwright
janechu Feb 11, 2026
c4e20c9
Convert the Arrays tests to Playwright
janechu Feb 11, 2026
976b5cf
Convert the notifier tests to Playwright
janechu Feb 11, 2026
c270229
Convert observable tests to Playwright
janechu Feb 11, 2026
60cdcf6
Convert update queue tests to Playwright
janechu Feb 11, 2026
d57330e
Convert reactive tests to Playwright
janechu Feb 11, 2026
7281af2
Convert state tests to Playwright
janechu Feb 11, 2026
9749b66
Convert watch tests to Playwright
janechu Feb 11, 2026
35f4805
Convert the css binding directive tests to Playwright
janechu Feb 11, 2026
5e615bc
Convert styles tests to Playwright
janechu Feb 11, 2026
e021802
Convert binding tests to Playwright
janechu Feb 12, 2026
1d3ad7c
Convert children tests to Playwright
janechu Feb 12, 2026
b86c19a
Convert compiler tests to Playwright
janechu Feb 12, 2026
e566d0a
Convert ref tests to Playwright
janechu Feb 12, 2026
32ce203
Convert when directive tests to Playwright
janechu Feb 12, 2026
3d43f94
Convert the render tests to Playwright
janechu Feb 13, 2026
cb5eb84
Convert repeat tests to Playwright
janechu Feb 13, 2026
b9571b5
Convert slotted tests to Playwright
janechu Feb 13, 2026
7a741ca
Convert template tests to Playwright
janechu Feb 13, 2026
cc16d3f
Some whitespace test fixes
janechu Feb 13, 2026
5aeea20
Convert view tests to Playwright
janechu Feb 13, 2026
fed59b7
Convert metadata tests to Playwright
janechu Feb 13, 2026
b85769b
Fix the models test file
janechu Feb 13, 2026
c1efe38
Update prettier ignore and remove fixture spec test
janechu Feb 13, 2026
f5a8a6b
Remove the Karma tests from running as it errors since there are now 0
janechu Feb 13, 2026
c36914e
Change files
janechu Feb 13, 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
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
*.spec.ts
!*.pw.spec.ts
*.pw.spec.ts
*.spec.tsx
**/__tests__
**/__test__
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"
}
3 changes: 2 additions & 1 deletion packages/fast-element/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
coverage/*
dist/*
*.spec.ts
*.spec.ts
*.pw.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
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