File tree Expand file tree Collapse file tree 3 files changed +73
-0
lines changed
Expand file tree Collapse file tree 3 files changed +73
-0
lines changed Original file line number Diff line number Diff line change 1+ let config = {
2+ address : "0.0.0.0" ,
3+ ipWhitelist : [ ] ,
4+ language : "de" ,
5+ timeFormat : 12 ,
6+
7+ modules : [
8+ {
9+ module : "clock" ,
10+ position : "middle_center" ,
11+ config : {
12+ showWeek : true
13+ }
14+ }
15+ ]
16+ } ;
17+
18+ /*************** DO NOT EDIT THE LINE BELOW ***************/
19+ if ( typeof module !== "undefined" ) {
20+ module . exports = config ;
21+ }
Original file line number Diff line number Diff line change 1+ let config = {
2+ address : "0.0.0.0" ,
3+ ipWhitelist : [ ] ,
4+ language : "de" ,
5+ timeFormat : 12 ,
6+
7+ modules : [
8+ {
9+ module : "clock" ,
10+ position : "middle_center" ,
11+ config : {
12+ showWeek : "short"
13+ }
14+ }
15+ ]
16+ } ;
17+
18+ /*************** DO NOT EDIT THE LINE BELOW ***************/
19+ if ( typeof module !== "undefined" ) {
20+ module . exports = config ;
21+ }
Original file line number Diff line number Diff line change 1+ const helpers = require ( "../helpers/global-setup" ) ;
2+
3+ describe ( "Clock set to german language module" , ( ) => {
4+ afterAll ( async ( ) => {
5+ await helpers . stopApplication ( ) ;
6+ } ) ;
7+
8+ describe ( "with showWeek config enabled" , ( ) => {
9+ beforeAll ( async ( ) => {
10+ await helpers . startApplication ( "tests/configs/modules/clock/de/clock_showWeek.js" ) ;
11+ await helpers . getDocument ( ) ;
12+ } ) ;
13+
14+ it ( "shows week with correct format" , async ( ) => {
15+ const weekRegex = / ^ [ 0 - 9 ] { 1 , 2 } . K a l e n d e r w o c h e $ / ;
16+ await expect ( helpers . testMatch ( ".clock .week" , weekRegex ) ) . resolves . toBe ( true ) ;
17+ } ) ;
18+ } ) ;
19+
20+ describe ( "with showWeek short config enabled" , ( ) => {
21+ beforeAll ( async ( ) => {
22+ await helpers . startApplication ( "tests/configs/modules/clock/de/clock_showWeek_short.js" ) ;
23+ await helpers . getDocument ( ) ;
24+ } ) ;
25+
26+ it ( "shows week with correct format" , async ( ) => {
27+ const weekRegex = / ^ [ 0 - 9 ] { 1 , 2 } K W $ / ;
28+ await expect ( helpers . testMatch ( ".clock .week" , weekRegex ) ) . resolves . toBe ( true ) ;
29+ } ) ;
30+ } ) ;
31+ } ) ;
You can’t perform that action at this time.
0 commit comments