-
Notifications
You must be signed in to change notification settings - Fork 3.4k
feat: switch browser runner #19048
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
feat: switch browser runner #19048
Changes from all commits
6c13370
522a4c1
fb0a963
6bf211b
d82b6f3
a0de6fe
d66f55b
4d93159
9de7302
8c497b9
980b1d9
a6f9c11
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,6 +46,14 @@ export class ProjectDataSource { | |
| return specs.filter((spec) => spec.specType === specType) | ||
| } | ||
|
|
||
| async getCurrentSpecByAbsolute (projectRoot: string, absolute: string) { | ||
| // TODO: should cache current specs so we don't need to | ||
| // call findSpecs each time we ask for the current spec. | ||
| const specs = await this.findSpecs(projectRoot, null) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we just use
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can do! |
||
|
|
||
| return specs.find((x) => x.absolute === absolute) | ||
| } | ||
|
|
||
| async getCurrentSpecById (projectRoot: string, base64Id: string) { | ||
| // TODO: should cache current specs so we don't need to | ||
| // call findSpecs each time we ask for the current spec. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -201,8 +201,11 @@ export const mutation = mutationType({ | |
|
|
||
| t.liveMutation('launchOpenProject', { | ||
| description: 'Launches project from open_project global singleton', | ||
| args: { | ||
| specPath: stringArg(), | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, since this mutation is used in other places that don't require routing to a specific spec. |
||
| }, | ||
| resolve: async (_, args, ctx) => { | ||
| await ctx.actions.project.launchProject(ctx.wizardData.chosenTestingType, {}) | ||
| await ctx.actions.project.launchProject(ctx.wizardData.chosenTestingType, {}, args.specPath) | ||
| }, | ||
| }) | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we still need this? You could try removing it and see what happens - I don't know if this is necessary now we launch into unified (no need for a fake spec url to visit).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still need this. It could be removed but it would require refactoring a chunk of server code that is outside the scope of this PR.