mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-28 20:22:53 +00:00
it should render custom table class
This commit is contained in:
parent
9430c70d0d
commit
a774718607
40
tests/configs/modules/weather/forecastweather_options.js
Normal file
40
tests/configs/modules/weather/forecastweather_options.js
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
/* Magic Mirror Test config default weather
|
||||||
|
*
|
||||||
|
* By fewieden https://github.com/fewieden
|
||||||
|
*
|
||||||
|
* MIT Licensed.
|
||||||
|
*/
|
||||||
|
|
||||||
|
let config = {
|
||||||
|
port: 8080,
|
||||||
|
ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"],
|
||||||
|
|
||||||
|
language: "en",
|
||||||
|
timeFormat: 12,
|
||||||
|
units: "metric",
|
||||||
|
electronOptions: {
|
||||||
|
webPreferences: {
|
||||||
|
nodeIntegration: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
modules: [
|
||||||
|
{
|
||||||
|
module: "weather",
|
||||||
|
position: "bottom_bar",
|
||||||
|
config: {
|
||||||
|
type: "forecast",
|
||||||
|
location: "Munich",
|
||||||
|
apiKey: "fake key",
|
||||||
|
weatherEndpoint: "/forecast/daily",
|
||||||
|
initialLoadDelay: 3000,
|
||||||
|
showPrecipitationAmount: true,
|
||||||
|
colored: true,
|
||||||
|
tableClass: "myTableClass"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
/*************** DO NOT EDIT THE LINE BELOW ***************/
|
||||||
|
if (typeof module !== "undefined") {module.exports = config;}
|
@ -242,5 +242,18 @@ describe("Weather module", function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe("Configuration Options", function() {
|
||||||
|
before(function() {
|
||||||
|
process.env.MM_CONFIG_FILE = "tests/configs/modules/weather/forecastweather_options.js";
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should render custom table class", async function() {
|
||||||
|
const weather = generateWeatherForecast();
|
||||||
|
await setup([weather, template]);
|
||||||
|
|
||||||
|
await app.client.waitForExist(`.weather table.myTableClass`, 10000);
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user