Skip to content
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

chore: read config file location from url params in ui mode #30274

Closed
wants to merge 1 commit into from

Conversation

yury-s
Copy link
Member

@yury-s yury-s commented Apr 6, 2024

Reference #29768

Copy link
Member

@pavelfeldman pavelfeldman left a comment

Choose a reason for hiding this comment

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

I would land the refactoring, but revert the query param.

@@ -411,8 +409,8 @@ class TestServerDispatcher implements TestServerInterface {
}

export async function runUIMode(configFile: string | undefined, options: TraceViewerServerOptions & TraceViewerRedirectOptions): Promise<reporterTypes.FullResult['status'] | 'restarted'> {
return await innerRunTestServer(configFile, options, async (server: HttpServer, cancelPromise: ManualPromise<void>) => {
await installRootRedirect(server, [], { ...options, webApp: 'uiMode.html' });
return await innerRunTestServer(configFile, options, async (server: HttpServer, cancelPromise: ManualPromise<void>, configLocation: ConfigLocation) => {
Copy link
Member

Choose a reason for hiding this comment

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

nit: resolve configFile explicitly instead of fetching it back via the callback

@@ -80,9 +79,8 @@ export const FiltersView: React.FC<{
const copy = new Map(projectFilters);
copy.set(projectName, !copy.get(projectName));
setProjectFilters(copy);
const configFile = testModel?.config?.configFile;
Copy link
Member

Choose a reason for hiding this comment

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

It is safe to use testModel.config.configFile - it will always be there in the UI mode scenario.

Copy link
Contributor

github-actions bot commented Apr 6, 2024

Test results for "tests 1"

3 flaky ⚠️ [chromium-library] › library/tracing.spec.ts:243:5 › should not include trace resources from the previous chunks
⚠️ [firefox-library] › library/tracing.spec.ts:243:5 › should not include trace resources from the previous chunks
⚠️ [chromium-library] › library/tracing.spec.ts:243:5 › should not include trace resources from the previous chunks

26882 passed, 618 skipped
✔️✔️✔️

Merge workflow run.

@yury-s yury-s closed this May 1, 2024
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.

2 participants