Skip to content

Commit

Permalink
WIP: Initial desktop-gui config change warning
Browse files Browse the repository at this point in the history
  • Loading branch information
lilaconlee committed Jan 23, 2019
1 parent c223551 commit 6864507
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,8 @@ describe "WarningMessage", ->
.click()
.then ->
expect(@ipc.externalOpen).not.to.be.called

describe "for error type CONFIGURATION_CHANGED", ->
it "renders configuration change message with the correct file name"
it "is not dismissable"
it "can reload the project"
6 changes: 5 additions & 1 deletion packages/desktop-gui/src/projects/projects-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,11 @@ const openProject = (project) => {
})

ipc.onConfigChanged(() => {
reopenProject(project)
// TODO decide if making this "fake" error is reasonable
project.setWarning({
isCypressErr: true,
type: 'CONFIGURATION_CHANGED',
})
})

ipc.onProjectError((__, error) => {
Expand Down
1 change: 1 addition & 0 deletions packages/server/lib/project.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ class Project extends EE

## call our callback function
## when settings change!
## TODO: pass the file path to the config:change event
onSettingsChanged.call(@)
}

Expand Down

0 comments on commit 6864507

Please sign in to comment.