Skip to content

Commit

Permalink
remove requireRestartOnChange for defaultBrowser, prevent bad open mo…
Browse files Browse the repository at this point in the history
…de behavior (#9)

* Update options.ts

* Update DataContext.ts
  • Loading branch information
alexsch01 authored Nov 8, 2024
1 parent 6933638 commit 2a53ba0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 0 additions & 1 deletion packages/config/src/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ const driverConfigOptions: Array<DriverConfigOption> = [
defaultValue: 'cypress/downloads',
validation: validate.isString,
isFolder: true,
requireRestartOnChange: 'browser',
}, {
name: 'e2e',
// e2e runner overrides
Expand Down
7 changes: 5 additions & 2 deletions packages/data-context/src/DataContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,10 @@ export class DataContext {
}

updateCliBrowser (browser: string) {
(this._modeOptions as Partial<AllModeOptions>).browser = browser
this.coreData.cliBrowser = browser
// in open mode, prevent cliBrowser from being changed after browser is opened
if (this.isRunMode || !this.coreData.cliBrowser) {
(this._modeOptions as Partial<AllModeOptions>).browser = browser
this.coreData.cliBrowser = browser
}
}
}

0 comments on commit 2a53ba0

Please sign in to comment.