From 06244f93c493ef740682180eddda3be597994c15 Mon Sep 17 00:00:00 2001 From: astone123 Date: Wed, 6 Aug 2025 10:36:25 -0400 Subject: [PATCH 01/12] internal: (studio) persist telemetry session ID in URL --- .../app/cypress/e2e/studio/studio-cloud.cy.ts | 40 ++++++++++++++++ packages/app/src/store/studio-store.ts | 48 +++++++++++++------ 2 files changed, 74 insertions(+), 14 deletions(-) diff --git a/packages/app/cypress/e2e/studio/studio-cloud.cy.ts b/packages/app/cypress/e2e/studio/studio-cloud.cy.ts index ca8996ccef45..8c1c57466ead 100644 --- a/packages/app/cypress/e2e/studio/studio-cloud.cy.ts +++ b/packages/app/cypress/e2e/studio/studio-cloud.cy.ts @@ -505,4 +505,44 @@ describe('studio functionality', () => { }) }) }) + + it('persists cloudStudioSessionId across page refresh', () => { + launchStudio() + + cy.findByTestId('studio-panel').should('be.visible') + + cy.location().its('hash').should('contain', 'cloudStudioSessionId=') + + let originalSessionId: string + + cy.location('hash').then((hash) => { + const urlParams = new URLSearchParams(hash) + + originalSessionId = urlParams.get('cloudStudioSessionId')! + + expect(originalSessionId).to.be.a('string') + expect(originalSessionId).to.match(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i) + }) + + cy.reload() + + cy.waitForSpecToFinish() + + cy.findByTestId('studio-panel').should('be.visible') + + cy.location().its('hash').should('contain', 'cloudStudioSessionId=') + + cy.location('hash').then((hash) => { + const urlParams = new URLSearchParams(hash) + const persistedSessionId = urlParams.get('cloudStudioSessionId') + + expect(persistedSessionId).to.equal(originalSessionId) + }) + + cy.findByTestId('studio-header-studio-button').click() + + cy.location().its('hash').should('not.contain', 'cloudStudioSessionId=') + + cy.findByTestId('studio-panel').should('not.exist') + }) }) diff --git a/packages/app/src/store/studio-store.ts b/packages/app/src/store/studio-store.ts index 281635c44bb8..b7f0a9d5bb7f 100644 --- a/packages/app/src/store/studio-store.ts +++ b/packages/app/src/store/studio-store.ts @@ -113,8 +113,25 @@ interface StudioRecorderState { newTestLineNumber?: number } +function getUrlParams () { + const url = new URL(window.location.href) + const hashParams = new URLSearchParams(url.hash) + + const testId = hashParams.get('testId') + const suiteId = hashParams.get('suiteId') + const visitUrl = hashParams.get('url') + const newTestLineNumber = hashParams.get('newTestLineNumber') ? Number(hashParams.get('newTestLineNumber')) : undefined + const cloudStudioSessionId = hashParams.get('cloudStudioSessionId') + + return { testId, suiteId, url: visitUrl, newTestLineNumber, cloudStudioSessionId } +} + export const useStudioStore = defineStore('studioRecorder', { state: (): StudioRecorderState => { + // try to restore cloudStudioSessionId from URL parameters + const urlParams = getUrlParams() + const persistedSessionId = urlParams.cloudStudioSessionId || undefined + return { saveModalIsOpen: false, instructionModalIsOpen: false, @@ -128,7 +145,7 @@ export const useStudioStore = defineStore('studioRecorder', { canAccessStudioAI: false, showUrlPrompt: true, cloudStudioRequested: false, - cloudStudioSessionId: undefined, + cloudStudioSessionId: persistedSessionId, newTestLineNumber: undefined, _isStudioCreatedTest: false, } @@ -162,6 +179,12 @@ export const useStudioStore = defineStore('studioRecorder', { setCloudStudioSessionId (cloudStudioSessionId: string) { this.cloudStudioSessionId = cloudStudioSessionId + this._updateUrlParams(['cloudStudioSessionId']) + }, + + clearCloudStudioSessionId () { + this.cloudStudioSessionId = undefined + this._removeUrlParams(['cloudStudioSessionId']) }, setNewTestLineNumber (newTestLineNumber: number) { @@ -222,6 +245,10 @@ export const useStudioStore = defineStore('studioRecorder', { this._initialUrl = studio.url } + if (studio.cloudStudioSessionId) { + this.cloudStudioSessionId = studio.cloudStudioSessionId + } + // if we have an existing test or are creating a new test, we need to start loading // otherwise if we have a suite, we can just set the studio active if (this.testId || studio.newTestLineNumber) { @@ -303,6 +330,7 @@ export const useStudioStore = defineStore('studioRecorder', { this.clearRunnableIds() this._removeUrlParams() this._initialUrl = undefined + this.clearCloudStudioSessionId() }, startSave () { @@ -432,20 +460,12 @@ export const useStudioStore = defineStore('studioRecorder', { }, _getUrlParams () { - const url = new URL(window.location.href) - const hashParams = new URLSearchParams(url.hash) - - const testId = hashParams.get('testId') - const suiteId = hashParams.get('suiteId') - const visitUrl = hashParams.get('url') - const newTestLineNumber = hashParams.get('newTestLineNumber') ? Number(hashParams.get('newTestLineNumber')) : undefined - - return { testId, suiteId, url: visitUrl, newTestLineNumber } + return getUrlParams() }, - _updateUrlParams (filter: string[] = ['testId', 'suiteId', 'url', 'newTestLineNumber']) { + _updateUrlParams (filter: string[] = ['testId', 'suiteId', 'url', 'newTestLineNumber', 'cloudStudioSessionId']) { // if we don't have studio params, we don't need to update them - if (!this.testId && !this.suiteId && !this.url && !this.newTestLineNumber) return + if (!this.testId && !this.suiteId && !this.url && !this.newTestLineNumber && !this.cloudStudioSessionId) return // if we have studio params, we need to remove them before adding them back this._removeUrlParams(filter) @@ -464,7 +484,7 @@ export const useStudioStore = defineStore('studioRecorder', { window.history.replaceState({}, '', url.toString()) }, - _removeUrlParams (filter: string[] = ['testId', 'suiteId', 'url', 'newTestLineNumber']) { + _removeUrlParams (filter: string[] = ['testId', 'suiteId', 'url', 'newTestLineNumber', 'cloudStudioSessionId']) { const url = new URL(window.location.href) const hashParams = new URLSearchParams(url.hash) @@ -477,7 +497,7 @@ export const useStudioStore = defineStore('studioRecorder', { }) // if there are no studio specific params left, we can also remove the studio param - if (!hashParams.has('testId') && !hashParams.has('suiteId') && !hashParams.has('url') && !hashParams.has('newTestLineNumber')) { + if (!hashParams.has('testId') && !hashParams.has('suiteId') && !hashParams.has('url') && !hashParams.has('newTestLineNumber') && !hashParams.has('cloudStudioSessionId')) { hashParams.delete('studio') } From 866c723c7b62c145065d140e650ef1126e4ee870 Mon Sep 17 00:00:00 2001 From: astone123 Date: Mon, 11 Aug 2025 16:28:37 -0400 Subject: [PATCH 02/12] update sessionId name, update assertions --- packages/app/cypress/e2e/studio/studio.cy.ts | 14 +++++++------- packages/app/src/store/studio-store.ts | 18 ++++++++---------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/packages/app/cypress/e2e/studio/studio.cy.ts b/packages/app/cypress/e2e/studio/studio.cy.ts index 9317eb382943..bd3713ed25a3 100644 --- a/packages/app/cypress/e2e/studio/studio.cy.ts +++ b/packages/app/cypress/e2e/studio/studio.cy.ts @@ -664,13 +664,13 @@ describe('studio functionality', () => { it('updates the url with the testId and studio parameters when entering studio with a test', () => { launchStudio() - cy.location().its('hash').should('contain', 'testId=r3').and('contain', 'studio=') + cy.location().its('hash').should('contain', 'testId=r3').and('contain', 'studio=').and('contain', 'sessionId=') }) it('update the url with the suiteId and studio parameters when entering studio with a suite', () => { launchStudio({ createNewTestFromSuite: true }) - cy.location().its('hash').should('contain', 'suiteId=r2').and('contain', 'studio=') + cy.location().its('hash').should('contain', 'suiteId=r2').and('contain', 'studio=').and('contain', 'sessionId=') }) it('updates the studio url parameters and displays the single test view after creating a new test', () => { @@ -678,7 +678,7 @@ describe('studio functionality', () => { // open the studio panel to create a new test in the root suite cy.findByTestId('studio-button').click() - cy.location().its('hash').should('contain', 'suiteId=r1').and('contain', 'studio=') + cy.location().its('hash').should('contain', 'suiteId=r1').and('contain', 'studio=').and('contain', 'sessionId=') // create a new test in the root suite inputNewTestName() @@ -694,7 +694,7 @@ describe('studio functionality', () => { it('does not remove the studio url parameters when saving test changes', () => { launchStudio() - cy.location().its('hash').should('contain', 'testId=r3').and('contain', 'studio=') + cy.location().its('hash').should('contain', 'testId=r3').and('contain', 'studio=').and('contain', 'sessionId=') cy.findByTestId('record-button-recording').should('be.visible') @@ -706,7 +706,7 @@ describe('studio functionality', () => { cy.findByTestId('studio-save-button').click() - cy.location().its('hash').should('contain', 'testId=r3').and('contain', 'studio=') + cy.location().its('hash').should('contain', 'testId=r3').and('contain', 'studio=').and('contain', 'sessionId=') }) it('does not remove the studio url parameters if saving fails', () => { @@ -716,7 +716,7 @@ describe('studio functionality', () => { incrementCounter(0) - cy.location().its('hash').should('contain', 'testId=r3').and('contain', 'studio=') + cy.location().its('hash').should('contain', 'testId=r3').and('contain', 'studio=').and('contain', 'sessionId=') // update the spec on the file system by changing the // test name which will cause the save to fail since @@ -757,7 +757,7 @@ describe('studio functionality', () => { cy.findByTestId('studio-header-studio-button').click() - cy.location().its('hash').and('not.contain', 'testId=').and('not.contain', 'studio=') + cy.location().its('hash').and('not.contain', 'testId=').and('not.contain', 'studio=').and('not.contain', 'sessionId=') }) it('removes the studio url parameters when closing studio new test', () => { diff --git a/packages/app/src/store/studio-store.ts b/packages/app/src/store/studio-store.ts index b7f0a9d5bb7f..2caab9fdfb96 100644 --- a/packages/app/src/store/studio-store.ts +++ b/packages/app/src/store/studio-store.ts @@ -121,7 +121,7 @@ function getUrlParams () { const suiteId = hashParams.get('suiteId') const visitUrl = hashParams.get('url') const newTestLineNumber = hashParams.get('newTestLineNumber') ? Number(hashParams.get('newTestLineNumber')) : undefined - const cloudStudioSessionId = hashParams.get('cloudStudioSessionId') + const cloudStudioSessionId = hashParams.get('sessionId') return { testId, suiteId, url: visitUrl, newTestLineNumber, cloudStudioSessionId } } @@ -179,12 +179,12 @@ export const useStudioStore = defineStore('studioRecorder', { setCloudStudioSessionId (cloudStudioSessionId: string) { this.cloudStudioSessionId = cloudStudioSessionId - this._updateUrlParams(['cloudStudioSessionId']) + this._updateUrlParams(['sessionId']) }, clearCloudStudioSessionId () { this.cloudStudioSessionId = undefined - this._removeUrlParams(['cloudStudioSessionId']) + this._removeUrlParams(['sessionId']) }, setNewTestLineNumber (newTestLineNumber: number) { @@ -231,7 +231,7 @@ export const useStudioStore = defineStore('studioRecorder', { }, setup (config) { - const studio = this._getUrlParams() + const studio = this.getUrlParams() if (studio.newTestLineNumber) { this.setNewTestLineNumber(studio.newTestLineNumber) @@ -459,11 +459,9 @@ export const useStudioStore = defineStore('studioRecorder', { } }, - _getUrlParams () { - return getUrlParams() - }, + getUrlParams, - _updateUrlParams (filter: string[] = ['testId', 'suiteId', 'url', 'newTestLineNumber', 'cloudStudioSessionId']) { + _updateUrlParams (filter: string[] = ['testId', 'suiteId', 'url', 'newTestLineNumber', 'sessionId']) { // if we don't have studio params, we don't need to update them if (!this.testId && !this.suiteId && !this.url && !this.newTestLineNumber && !this.cloudStudioSessionId) return @@ -484,7 +482,7 @@ export const useStudioStore = defineStore('studioRecorder', { window.history.replaceState({}, '', url.toString()) }, - _removeUrlParams (filter: string[] = ['testId', 'suiteId', 'url', 'newTestLineNumber', 'cloudStudioSessionId']) { + _removeUrlParams (filter: string[] = ['testId', 'suiteId', 'url', 'newTestLineNumber', 'sessionId']) { const url = new URL(window.location.href) const hashParams = new URLSearchParams(url.hash) @@ -497,7 +495,7 @@ export const useStudioStore = defineStore('studioRecorder', { }) // if there are no studio specific params left, we can also remove the studio param - if (!hashParams.has('testId') && !hashParams.has('suiteId') && !hashParams.has('url') && !hashParams.has('newTestLineNumber') && !hashParams.has('cloudStudioSessionId')) { + if (!hashParams.has('testId') && !hashParams.has('suiteId') && !hashParams.has('url') && !hashParams.has('newTestLineNumber') && !hashParams.has('sessionId')) { hashParams.delete('studio') } From 3b4b0a01d3ae02fd38fdb5796c6484ffce2c5f07 Mon Sep 17 00:00:00 2001 From: astone123 Date: Mon, 11 Aug 2025 16:44:50 -0400 Subject: [PATCH 03/12] fix url params --- packages/app/src/runner/SpecRunnerOpenMode.vue | 2 +- packages/app/src/store/studio-store.ts | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/app/src/runner/SpecRunnerOpenMode.vue b/packages/app/src/runner/SpecRunnerOpenMode.vue index 8ff277f31d35..19895a993f69 100644 --- a/packages/app/src/runner/SpecRunnerOpenMode.vue +++ b/packages/app/src/runner/SpecRunnerOpenMode.vue @@ -92,7 +92,7 @@ Date: Mon, 11 Aug 2025 17:17:45 -0400 Subject: [PATCH 04/12] fix test --- packages/app/cypress/e2e/studio/studio-cloud.cy.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/app/cypress/e2e/studio/studio-cloud.cy.ts b/packages/app/cypress/e2e/studio/studio-cloud.cy.ts index 8c1c57466ead..af22bd7993d0 100644 --- a/packages/app/cypress/e2e/studio/studio-cloud.cy.ts +++ b/packages/app/cypress/e2e/studio/studio-cloud.cy.ts @@ -506,19 +506,19 @@ describe('studio functionality', () => { }) }) - it('persists cloudStudioSessionId across page refresh', () => { + it('persists sessionId across page refresh', () => { launchStudio() cy.findByTestId('studio-panel').should('be.visible') - cy.location().its('hash').should('contain', 'cloudStudioSessionId=') + cy.location().its('hash').should('contain', 'sessionId=') let originalSessionId: string cy.location('hash').then((hash) => { const urlParams = new URLSearchParams(hash) - originalSessionId = urlParams.get('cloudStudioSessionId')! + originalSessionId = urlParams.get('sessionId')! expect(originalSessionId).to.be.a('string') expect(originalSessionId).to.match(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i) @@ -530,18 +530,18 @@ describe('studio functionality', () => { cy.findByTestId('studio-panel').should('be.visible') - cy.location().its('hash').should('contain', 'cloudStudioSessionId=') + cy.location().its('hash').should('contain', 'sessionId=') cy.location('hash').then((hash) => { const urlParams = new URLSearchParams(hash) - const persistedSessionId = urlParams.get('cloudStudioSessionId') + const persistedSessionId = urlParams.get('sessionId') expect(persistedSessionId).to.equal(originalSessionId) }) cy.findByTestId('studio-header-studio-button').click() - cy.location().its('hash').should('not.contain', 'cloudStudioSessionId=') + cy.location().its('hash').should('not.contain', 'sessionId=') cy.findByTestId('studio-panel').should('not.exist') }) From 292fc6f7f15f66cb5892e542769377cf1fc7dedb Mon Sep 17 00:00:00 2001 From: Adam Stone-Lord Date: Tue, 12 Aug 2025 10:54:11 -0400 Subject: [PATCH 05/12] Update packages/app/src/store/studio-store.ts Co-authored-by: Matt Schile --- packages/app/src/store/studio-store.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/app/src/store/studio-store.ts b/packages/app/src/store/studio-store.ts index e81ddabb7b16..ac9b83242542 100644 --- a/packages/app/src/store/studio-store.ts +++ b/packages/app/src/store/studio-store.ts @@ -121,9 +121,9 @@ function getUrlParams () { const suiteId = hashParams.get('suiteId') const visitUrl = hashParams.get('url') const newTestLineNumber = hashParams.get('newTestLineNumber') ? Number(hashParams.get('newTestLineNumber')) : undefined - const cloudStudioSessionId = hashParams.get('sessionId') + const sessionId = hashParams.get('sessionId') - return { testId, suiteId, url: visitUrl, newTestLineNumber, cloudStudioSessionId } + return { testId, suiteId, url: visitUrl, newTestLineNumber, sessionId } } export const useStudioStore = defineStore('studioRecorder', { From c51482719a21c11dbe25f6b4f0aa06d5409bee45 Mon Sep 17 00:00:00 2001 From: Adam Stone-Lord Date: Tue, 12 Aug 2025 10:54:18 -0400 Subject: [PATCH 06/12] Update packages/app/src/store/studio-store.ts Co-authored-by: Matt Schile --- packages/app/src/store/studio-store.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/app/src/store/studio-store.ts b/packages/app/src/store/studio-store.ts index ac9b83242542..54d40c9936f0 100644 --- a/packages/app/src/store/studio-store.ts +++ b/packages/app/src/store/studio-store.ts @@ -130,7 +130,7 @@ export const useStudioStore = defineStore('studioRecorder', { state: (): StudioRecorderState => { // try to restore cloudStudioSessionId from URL parameters const urlParams = getUrlParams() - const persistedSessionId = urlParams.cloudStudioSessionId || undefined + const persistedSessionId = urlParams.sessionId || undefined return { saveModalIsOpen: false, From cf5994fa9d30c3110b336a5b841f9e89be6686e8 Mon Sep 17 00:00:00 2001 From: Adam Stone-Lord Date: Tue, 12 Aug 2025 10:54:25 -0400 Subject: [PATCH 07/12] Update packages/app/src/store/studio-store.ts Co-authored-by: Matt Schile --- packages/app/src/store/studio-store.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/app/src/store/studio-store.ts b/packages/app/src/store/studio-store.ts index 54d40c9936f0..15f893a50807 100644 --- a/packages/app/src/store/studio-store.ts +++ b/packages/app/src/store/studio-store.ts @@ -177,7 +177,7 @@ export const useStudioStore = defineStore('studioRecorder', { this.canAccessStudioAI = canAccessStudioAI }, - setCloudStudioSessionId (cloudStudioSessionId: string) { + setSessionId (sessionId: string) { this.sessionId = cloudStudioSessionId this._updateUrlParams(['sessionId']) }, From a7db5ac29b7052234d7a050396e0dff9a06d0991 Mon Sep 17 00:00:00 2001 From: Adam Stone-Lord Date: Tue, 12 Aug 2025 10:54:34 -0400 Subject: [PATCH 08/12] Update packages/app/src/store/studio-store.ts Co-authored-by: Matt Schile --- packages/app/src/store/studio-store.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/app/src/store/studio-store.ts b/packages/app/src/store/studio-store.ts index 15f893a50807..0caced3e1f65 100644 --- a/packages/app/src/store/studio-store.ts +++ b/packages/app/src/store/studio-store.ts @@ -178,7 +178,7 @@ export const useStudioStore = defineStore('studioRecorder', { }, setSessionId (sessionId: string) { - this.sessionId = cloudStudioSessionId + this.sessionId = sessionId this._updateUrlParams(['sessionId']) }, From 9bafaeb241c8d9d2ac182e98f18109298fbaee73 Mon Sep 17 00:00:00 2001 From: Adam Stone-Lord Date: Tue, 12 Aug 2025 10:54:41 -0400 Subject: [PATCH 09/12] Update packages/app/src/store/studio-store.ts Co-authored-by: Matt Schile --- packages/app/src/store/studio-store.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/app/src/store/studio-store.ts b/packages/app/src/store/studio-store.ts index 0caced3e1f65..5e85262f4874 100644 --- a/packages/app/src/store/studio-store.ts +++ b/packages/app/src/store/studio-store.ts @@ -182,7 +182,7 @@ export const useStudioStore = defineStore('studioRecorder', { this._updateUrlParams(['sessionId']) }, - clearCloudStudioSessionId () { + clearSessionId () { this.sessionId = undefined this._removeUrlParams(['sessionId']) }, From 41db26014845d21d357f10c63a2f967d7442a6fa Mon Sep 17 00:00:00 2001 From: Adam Stone-Lord Date: Tue, 12 Aug 2025 10:54:49 -0400 Subject: [PATCH 10/12] Update packages/app/src/store/studio-store.ts Co-authored-by: Matt Schile --- packages/app/src/store/studio-store.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/app/src/store/studio-store.ts b/packages/app/src/store/studio-store.ts index 5e85262f4874..b9aa030deacd 100644 --- a/packages/app/src/store/studio-store.ts +++ b/packages/app/src/store/studio-store.ts @@ -250,8 +250,8 @@ export const useStudioStore = defineStore('studioRecorder', { this._initialUrl = studio.url } - if (studio.cloudStudioSessionId) { - this.sessionId = studio.cloudStudioSessionId + if (studio.sessionId) { + this.sessionId = studio.sessionId } // if we have an existing test or are creating a new test, we need to start loading From d81adb1cd59d7087ec9dc2a62d6ad53aef1c2fc1 Mon Sep 17 00:00:00 2001 From: Adam Stone-Lord Date: Tue, 12 Aug 2025 10:55:01 -0400 Subject: [PATCH 11/12] Update packages/app/src/store/studio-store.ts Co-authored-by: Matt Schile --- packages/app/src/store/studio-store.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/app/src/store/studio-store.ts b/packages/app/src/store/studio-store.ts index b9aa030deacd..d15eabd7f9d5 100644 --- a/packages/app/src/store/studio-store.ts +++ b/packages/app/src/store/studio-store.ts @@ -335,7 +335,7 @@ export const useStudioStore = defineStore('studioRecorder', { this.clearRunnableIds() this._removeUrlParams() this._initialUrl = undefined - this.clearCloudStudioSessionId() + this.clearSessionId() }, startSave () { From 5cbf4b202d12b010297306ca38faafae272ddc5b Mon Sep 17 00:00:00 2001 From: astone123 Date: Tue, 12 Aug 2025 11:00:26 -0400 Subject: [PATCH 12/12] update variable names --- packages/app/src/runner/event-manager.ts | 4 ++-- packages/app/src/store/studio-store.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/app/src/runner/event-manager.ts b/packages/app/src/runner/event-manager.ts index a51070b55f2f..67250da46f30 100644 --- a/packages/app/src/runner/event-manager.ts +++ b/packages/app/src/runner/event-manager.ts @@ -281,7 +281,7 @@ export class EventManager { } this.studioStore.setCanAccessStudioAI(canAccessStudioAI) - this.studioStore.setCloudStudioSessionId(cloudStudioSessionId) + this.studioStore.setSessionId(cloudStudioSessionId) // when we enter studio with a new test, we don't want to rerun until // the the test has been created, so we just set the studio active this.studioStore.setActive(true) @@ -298,7 +298,7 @@ export class EventManager { } this.studioStore.setCanAccessStudioAI(canAccessStudioAI) - this.studioStore.setCloudStudioSessionId(cloudStudioSessionId) + this.studioStore.setSessionId(cloudStudioSessionId) rerun() }) }) diff --git a/packages/app/src/store/studio-store.ts b/packages/app/src/store/studio-store.ts index d15eabd7f9d5..9e70ee26b05c 100644 --- a/packages/app/src/store/studio-store.ts +++ b/packages/app/src/store/studio-store.ts @@ -128,7 +128,7 @@ function getUrlParams () { export const useStudioStore = defineStore('studioRecorder', { state: (): StudioRecorderState => { - // try to restore cloudStudioSessionId from URL parameters + // try to restore sessionId from URL parameters const urlParams = getUrlParams() const persistedSessionId = urlParams.sessionId || undefined