internal: (studio) support creating new test in root suite#32024
internal: (studio) support creating new test in root suite#32024mschile merged 12 commits intorelease/15.0.0from
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for creating a new test in the root suite by tracking a newTestLineNumber instead of driving off suiteId, updates the runner normalization logic, and adjusts the Studio store and event flows to enter Studio mode without rerunning for new tests.
- Runner now sets
onlyTestIdbased onnewTestLineNumberand removescreateEmptyOnlyTest. - Studio store tracks
newTestLineNumber, updates URL parameters, and introducessetActive(isActive)to control panel visibility. - Event manager and aut-iframe entry points are updated to avoid unnecessary reruns when starting Studio for a new test.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/driver/src/cypress/runner.ts | Handle newTestLineNumber in normalizeAll/normalize and drop createEmptyOnlyTest. |
| packages/app/src/store/studio-store.ts | Add newTestLineNumber state, update URL param logic, and rename setInactive to setActive. |
| packages/app/src/runner/event-manager.ts | Replace legacy studioInit (rerun) with setActive(true) for new-test flows. |
| packages/app/src/runner/aut-iframe.ts | Always call studioStore.start in startStudio, removing the loading check. |
Comments suppressed due to low confidence (3)
packages/app/src/store/studio-store.ts:168
- setSuiteId does not clear
newTestLineNumberor include it in the URL parameters, which may leave stale line-number state when switching suites; consider resettingnewTestLineNumberand updating the URL filter here.
this._updateUrlParams(['testId', 'suiteId'])
packages/driver/src/cypress/runner.ts:789
- This new branch handling
newTestLineNumbershould be covered by unit tests to verify thatonlyTestIdis correctly set when the line numbers match.
if (getNewTestLineNumber() && runnable.invocationDetails?.line === getNewTestLineNumber()) {
packages/app/src/store/studio-store.ts:209
- [nitpick] The method name
setActivemay be ambiguous for a boolean setter; consider renaming tosetIsActivefor clearer intent.
setActive (isActive: boolean) {
cypress
|
||||||||||||||||||||||||||||||||||||||||
| Project |
cypress
|
| Branch Review |
mschile/studio/new_test_root_suite_2
|
| Run status |
|
| Run duration | 11m 25s |
| Commit |
|
| Committer | Matthew Schile |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
692
|
| View all changes introduced in this branch ↗︎ | |
UI Coverage
37.91%
|
|
|---|---|
|
|
131
|
|
|
80
|
Accessibility
97.42%
|
|
|---|---|
|
|
3 critical
7 serious
1 moderate
1 minor
|
|
|
62
|
| getCypress().runner.setNewTestLineNumber(this.newTestLineNumber) | ||
| } else { | ||
| if (this.suiteId) { | ||
| getCypress().runner.setOnlySuiteId(this.suiteId) |
There was a problem hiding this comment.
I think this can be removed. It doesn't look like we're doing anything anymore when we set setOnlySuiteId
@mabela416, are you sure you're running all the correct code? I just tried and it worked for me. Screen.Recording.2025-07-16.at.8.58.35.AM.mov |
|
I changed to another project and it worked but i'm not sure why it didn't work on my other project |
Do you have |
I did! but it should work even if |
|
Yes, it should, I'll have to look into it. |
This has been fixed. |
can you check with @emilmilanov and @jennifer-shehane because the figma does not have them and I think there were other controls that they wanted to add in the future |
…new test in root suite (#32024)
…w test in root suite (#32024)
…new test in root suite (#32024)
…w test in root suite (#32024)
…new test in root suite (#32024)
…w test in root suite (#32024)
* chore: updating v8 snapshot cache * index on release/15.0.0: 47bda54 fix: remove 'new' badge from Create from Component, fix parsing (#31457) * index on release/15.0.0: 3b88383 internal: (studio) support creating new test in root suite (#32024) --------- Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com>
* chore: updating v8 snapshot cache * index on release/15.0.0: 47bda54 fix: remove 'new' badge from Create from Component, fix parsing (#31457) * index on release/15.0.0: 3b88383 internal: (studio) support creating new test in root suite (#32024) --------- Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com>
* chore: updating v8 snapshot cache * index on release/15.0.0: 47bda54 fix: remove 'new' badge from Create from Component, fix parsing (#31457) * index on release/15.0.0: 3b88383 internal: (studio) support creating new test in root suite (#32024) --------- Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com>
|
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |


Additional details
reruning and entering Studio mode, we now set Studio toactive, which causes the panel to be displayed but all of the tests are still displayed.suiteId, we now look for thenewTestLineNumberin the url. When found, we find the test that also starts on that line and callsetOnlyTestIdwith the appropriateid.Steps to test
How has the user experience changed?
PR Tasks
cypress-documentation?type definitions?