Skip to content

Commit 3bfa5f4

Browse files
committed
get rid of environment variable
1 parent dcc10f5 commit 3bfa5f4

File tree

3 files changed

+2
-22
lines changed

3 files changed

+2
-22
lines changed

guides/cy-prompt-development.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# `cy.prompt` Development
22

3-
In production, the code used to facilitate the prompt command will be retrieved from the Cloud. While `cy.prompt` is still in its early stages it is hidden behind an environment variable: `CYPRESS_ENABLE_CY_PROMPT` but can also be run against local cloud prompt code via the environment variable: `CYPRESS_LOCAL_CY_PROMPT_PATH`.
3+
In production, the code used to facilitate the prompt command will be retrieved from the Cloud.
44

55
To run against locally developed `cy.prompt`:
66

packages/server/lib/project-base.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ export class ProjectBase extends EE {
162162

163163
this._server = new ServerBase(cfg)
164164
// @ts-expect-error - this will not error when we actually release the experimentalPromptCommand flag
165-
if (process.env.CYPRESS_ENABLE_CY_PROMPT || cfg.experimentalPromptCommand) {
165+
if (cfg.experimentalPromptCommand) {
166166
const cyPromptLifecycleManager = new CyPromptLifecycleManager()
167167

168168
cyPromptLifecycleManager.initializeCyPromptManager({

packages/server/test/unit/project_spec.js

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,6 @@ This option will not have an effect in Some-other-name. Tests that rely on web s
518518
let initializeCyPromptManagerStub
519519

520520
afterEach(function () {
521-
delete process.env.CYPRESS_ENABLE_CY_PROMPT
522521
initializeCyPromptManagerStub.restore()
523522
})
524523

@@ -541,25 +540,6 @@ This option will not have an effect in Some-other-name. Tests that rely on web s
541540
})
542541
})
543542

544-
it('initializes cy prompt lifecycle manager if process.env.CYPRESS_ENABLE_CY_PROMPT is enabled', function () {
545-
this.project.options.record = false
546-
this.project.options.key = undefined
547-
548-
process.env.CYPRESS_ENABLE_CY_PROMPT = 'true'
549-
550-
initializeCyPromptManagerStub = sinon.stub(CyPromptLifecycleManager.prototype, 'initializeCyPromptManager')
551-
552-
return this.project.open()
553-
.then(() => {
554-
expect(initializeCyPromptManagerStub).to.be.calledWith({
555-
cloudDataSource: ctx.cloud,
556-
ctx,
557-
record: false,
558-
key: undefined,
559-
})
560-
})
561-
})
562-
563543
it('does not initialize cy prompt lifecycle manager if experimentalPromptCommand is not enabled', function () {
564544
this.config.projectId = 'abc123'
565545
this.config.experimentalPromptCommand = false

0 commit comments

Comments
 (0)