it should render custom table class

This commit is contained in:
Felix Wiedenbach 2019-09-13 16:21:12 +02:00
parent 9430c70d0d
commit a774718607
2 changed files with 53 additions and 0 deletions

View 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;}

View File

@ -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);
});
});
});
});