forked from GladysAssistant/Gladys
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix GladysAssistant#727 : The user should be able to set the timezone…
… used in scenes in the UI (GladysAssistant#856) * Add timezone configuration in parameters in UI * When the timezone is modified, the server reloads all scenes * Translate configuration in UI * Fix tests * Add more tests to the scene.init function
- Loading branch information
1 parent
b1c9318
commit 4312305
Showing
13 changed files
with
378 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
const { expect } = require('chai'); | ||
const EventEmitter = require('events'); | ||
const SceneManager = require('../../../lib/scene'); | ||
|
||
const event = new EventEmitter(); | ||
|
||
describe('SceneManager.init', () => { | ||
it('should init scene with default timezone', async () => { | ||
const variable = { | ||
getValue: () => Promise.resolve(null), | ||
setValue: () => Promise.resolve(null), | ||
}; | ||
const sceneManager = new SceneManager({}, event, {}, {}, variable); | ||
await sceneManager.init(); | ||
expect(sceneManager.timezone).to.equal('Europe/Paris'); | ||
}); | ||
it('should init scene with timezone from variable', async () => { | ||
const variable = { | ||
getValue: () => Promise.resolve('Europe/London'), | ||
setValue: () => Promise.resolve(null), | ||
}; | ||
const sceneManager = new SceneManager({}, event, {}, {}, variable); | ||
await sceneManager.init(); | ||
expect(sceneManager.timezone).to.equal('Europe/London'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters