Skip to content

Commit b907682

Browse files
committed
change test mode variable name, add bypass minimum refresh interval check in test mode
1 parent 2f12e2c commit b907682

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

modules/default/compliments/compliments.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Module.register("compliments", {
4747
this.config.compliments = JSON.parse(response);
4848
this.updateDom();
4949
if (this.config.remoteFileRefreshInterval !== 0){
50-
if(this.config.remoteFileRefreshInterval >= this.refreshMinimumDelay || window.intest) {
50+
if((this.config.remoteFileRefreshInterval >= this.refreshMinimumDelay) || window.mmTestMode == 'true') {
5151
setInterval(async () => {
5252
const response = await this.loadComplimentFile();
5353
this.compliments_new = JSON.parse(response);
@@ -271,14 +271,14 @@ Module.register("compliments", {
271271
this.lastIndexUsed = -1;
272272
}
273273
}
274-
// in test mode only
275-
//if (compliments_test_mode) {
276-
// check for (undocumented) remote file2 to change test new load
274+
// only in test mode
275+
if (window.mmTestMode === 'true') {
276+
// check for (undocumented) remoteFile2 to test new file load
277277
if(this.config.remoteFile2!== null && this.config.remoteFileRefreshInterval!==null){
278-
console.log("running in test");
279-
this.config.remoteFile=this.config.remoteFile2
278+
// switch the file so that next time it will be loaded from a changed file
279+
this.config.remoteFile=this.config.remoteFile2
280280
}
281-
//}
281+
}
282282
return wrapper;
283283
},
284284

0 commit comments

Comments
 (0)