Skip to content

Conversation

shairez
Copy link

@shairez shairez commented Aug 15, 2025

A big quality of life improvement for component testers

Fixes #37069

@shairez
Copy link
Author

shairez commented Aug 15, 2025

@microsoft-github-policy-service agree

This comment has been minimized.

@yury-s yury-s requested a review from agg23 August 16, 2025 01:26

await test.step('add a "leftover" (no longer existing component and its test file) to the cache and run the test', async () => {

metainfo.components.push({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be an end to end test, and should test the entire flow of building the cache, deleting a component, then running the test and finding that it still works. Don't mutate the metainfo.json manually.

Copy link
Author

@shairez shairez Aug 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@agg23 updated

@shairez shairez force-pushed the pr-fix-ct-cache-deleted-tests branch from 48f9248 to f818161 Compare August 18, 2025 15:53

This comment has been minimized.

componentRegistry.set(c.id, c);
for (const c of oldComponents.values()) {
// Only add old components if their source test file still exists
if (fs.existsSync(c.filename))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it have to be sync? If not, prefer fs.promises.stat

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yury-s updated

@shairez shairez force-pushed the pr-fix-ct-cache-deleted-tests branch 2 times, most recently from 705c7e8 to 5693a80 Compare August 18, 2025 17:48
@shairez shairez force-pushed the pr-fix-ct-cache-deleted-tests branch from 5693a80 to 37e3d37 Compare August 18, 2025 17:48
Copy link
Contributor

Test results for "tests 1"

11 flaky ⚠️ [chromium-library] › library/page-clock.frozen.spec.ts:19 › clock should be frozen `@chromium-ubuntu-22.04-node18`
⚠️ [chromium-library] › library/page-clock.frozen.spec.ts:19 › clock should be frozen `@chromium-ubuntu-22.04-node20`
⚠️ [chromium-library] › library/page-clock.frozen.spec.ts:19 › clock should be frozen `@chromium-ubuntu-22.04-node22`
⚠️ [chromium-library] › library/page-clock.frozen.spec.ts:19 › clock should be frozen `@chromium-ubuntu-22.04-node24`
⚠️ [firefox-library] › library/inspector/cli-codegen-1.spec.ts:1079 › cli codegen › should not throw csp directive violation errors `@firefox-ubuntu-22.04-node18`
⚠️ [firefox-library] › library/inspector/cli-codegen-pick-locator.spec.ts:23 › should inspect locator `@firefox-ubuntu-22.04-node18`
⚠️ [firefox-library] › library/inspector/cli-codegen-pick-locator.spec.ts:35 › should update locator highlight `@firefox-ubuntu-22.04-node18`
⚠️ [firefox-page] › page/page-wait-for-function.spec.ts:104 › should work with strict CSP policy `@firefox-ubuntu-22.04-node18`
⚠️ [installation tests] › playwright-cli-install-should-work.spec.ts:80 › should be able to remove browsers `@package-installations-macos-latest`
⚠️ [chromium-library] › library/inspector/pause.spec.ts:24 › should resume when closing inspector `@ubuntu-22.04-chromium-tip-of-tree`
⚠️ [webkit-library] › library/inspector/cli-codegen-2.spec.ts:24 › cli codegen › should contain open page `@webkit-ubuntu-22.04-node18`

46621 passed, 801 skipped


Merge workflow run.

@mxschmitt mxschmitt requested a review from agg23 August 25, 2025 22:31
@shairez
Copy link
Author

shairez commented Aug 26, 2025

Added the requested changes
Is there anything else missing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Component tests fail when test files and components are deleted but remain in cache
3 participants